Skip to content

Commit

Permalink
Replace nearly every map grep with a YML file that actually respects …
Browse files Browse the repository at this point in the history
…structure, and fixes the massive amount of failures that were never caught (#2427)

Port of tgstation/tgstation#72372

From original PR:

[Documentation
here](https://github.com/Mothblocks/tgstation/blob/maplint/tools/maplint/README.md)

We should not be using greps to the capacity that we currently are. If
you are not smarter than a parser, then you should not try to beat one.
DMM files should NOT be treated as text files that can be parsed with
any old Unix tool. They are a structured language. Because of our abuse
of greps, check_greps is full of hard to read, hard to maintain checks
that do not consistently work, because they all make very specific
assumptions about how TGM works, which are provably untrue.

This format is mostly straightforward for the lints people write, and
easily extensible to the ones people will want to write.

:cl:
fix: Fixes a bunch of cases of windows not being where they were
supposed to be, tables/chairs stacking on each other, and other very
small stuff you've never noticed before.
/:cl:

---------

Co-authored-by: Mothblocks <[email protected]>
Co-authored-by: Tastyfish <[email protected]>
Co-authored-by: Zephyr <[email protected]>
Co-authored-by: Tim <[email protected]>
Co-authored-by: meemofcourse <[email protected]>
  • Loading branch information
6 people authored Jan 9, 2024
1 parent 1a13a01 commit e06821f
Show file tree
Hide file tree
Showing 152 changed files with 1,254 additions and 84,895 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/ci_suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
run_linters:
if: "!contains(github.event.head_commit.message, '[ci skip]')"
name: Run Linters
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -39,9 +39,11 @@ jobs:
bash tools/ci/install_node.sh
bash tools/ci/install_byond.sh
bash tools/ci/install_spaceman_dmm.sh dreamchecker
cargo install ripgrep --features pcre2
tools/bootstrap/python -c ''
- name: Run Linters
run: |
tools/bootstrap/python -m tools.maplint.source --github
tools/build/build --ci lint tgui-test
bash tools/ci/check_filedirs.sh shiptest.dme
bash tools/ci/check_changelogs.sh
Expand Down
13 changes: 1 addition & 12 deletions _maps/RandomRuins/BeachRuins/beach_ancient_ruin.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -2657,17 +2657,6 @@
light_range = 2
},
/area/ruin/beach/complex)
"Py" = (
/obj/structure/window/reinforced/fulltile,
/obj/structure/grille,
/obj/structure/cable{
icon_state = "0-8"
},
/obj/structure/cable{
icon_state = "0-8"
},
/turf/open/floor/plating,
/area/ruin/beach/complex/wall)
"PD" = (
/obj/structure/cable{
icon_state = "4-8"
Expand Down Expand Up @@ -4857,7 +4846,7 @@ lS
lS
lS
Lt
Py
nt
lS
lS
lS
Expand Down
3 changes: 0 additions & 3 deletions _maps/RandomRuins/BeachRuins/beach_crashed_engineer.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -663,9 +663,6 @@
/turf/open/water/beach,
/area/overmap_encounter/planetoid/beachplanet/explored)
"BF" = (
/obj/structure/cable{
icon_state = "4-8"
},
/obj/structure/cable{
icon_state = "4-8"
},
Expand Down
1 change: 0 additions & 1 deletion _maps/RandomRuins/BeachRuins/beach_ocean_town.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -2871,7 +2871,6 @@
/area/overmap_encounter/planetoid/beachplanet/explored)
"Ip" = (
/obj/structure/table,
/obj/structure/table,
/obj/structure/window,
/obj/structure/window{
dir = 4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@
"uE" = (
/obj/structure/fans/tiny,
/obj/machinery/door/keycard{
name = "NanoTrasen Secure Solutions";
name = "Nanotrasen Secure Solutions";
puzzle_id = "NTB1"
},
/turf/open/floor/wood,
Expand Down
15 changes: 1 addition & 14 deletions _maps/RandomRuins/IceRuins/icemoon_surface_engioutpost.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -209,18 +209,6 @@
/obj/machinery/door/firedoor/border_only,
/turf/open/floor/plating/airless,
/area/ruin)
"aN" = (
/obj/effect/spawner/structure/window/plasma/reinforced,
/obj/machinery/atmospherics/pipe/simple/general/visible,
/obj/machinery/door/firedoor/border_only{
dir = 1
},
/obj/machinery/door/firedoor/border_only{
dir = 1
},
/obj/machinery/door/firedoor/border_only,
/turf/open/floor/plating/airless,
/area/ruin)
"aO" = (
/turf/closed/wall/r_wall/rust,
/area/overmap_encounter/planetoid/ice/explored)
Expand Down Expand Up @@ -1384,7 +1372,6 @@
"dr" = (
/obj/machinery/power/floodlight,
/obj/structure/cable,
/obj/structure/cable,
/turf/open/floor/plating/icemoon,
/area/overmap_encounter/planetoid/ice/explored)
"ds" = (
Expand Down Expand Up @@ -2592,7 +2579,7 @@ av
va
ay
aE
aN
wA
aW
bv
bN
Expand Down
16 changes: 8 additions & 8 deletions _maps/RandomRuins/IceRuins/icemoon_underground_oldstation.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@
/obj/machinery/power/apc{
dir = 1;
name = "Beta Station Main Corridor APC";
pixel_y = 23;
pixel_y = 25;
start_charge = 0
},
/obj/structure/cable{
Expand Down Expand Up @@ -1218,7 +1218,7 @@
/obj/machinery/power/apc{
dir = 1;
name = "Charlie Station Bridge APC";
pixel_y = 23;
pixel_y = 25;
start_charge = 0
},
/obj/effect/decal/cleanable/cobweb,
Expand Down Expand Up @@ -1262,7 +1262,7 @@
/obj/machinery/power/apc{
dir = 1;
name = "Delta Station RnD APC";
pixel_y = 23;
pixel_y = 25;
start_charge = 0
},
/obj/structure/cable{
Expand Down Expand Up @@ -3557,7 +3557,7 @@
/obj/machinery/power/apc{
dir = 1;
name = "Delta Prototype Lab APC";
pixel_y = 23;
pixel_y = 25;
start_charge = 0
},
/obj/structure/cable{
Expand Down Expand Up @@ -4075,7 +4075,7 @@
/obj/machinery/power/apc{
dir = 1;
name = "Beta Station Medbay APC";
pixel_y = 23;
pixel_y = 25;
start_charge = 0
},
/obj/effect/turf_decal/corner/opaque/blue,
Expand Down Expand Up @@ -4388,7 +4388,7 @@
"mQ" = (
/obj/machinery/power/apc{
name = "Beta Station Mining Equipment APC ";
pixel_y = -23;
pixel_y = -25;
start_charge = 0
},
/obj/effect/turf_decal/corner/opaque/brown{
Expand Down Expand Up @@ -6751,7 +6751,7 @@
/obj/machinery/power/apc{
dir = 1;
name = "Charlie Station Kitchen APC";
pixel_y = 23;
pixel_y = 25;
start_charge = 0
},
/obj/machinery/light/small/directional/north,
Expand Down Expand Up @@ -6913,7 +6913,7 @@
/obj/structure/cable,
/obj/machinery/power/apc{
name = "Charlie Station Garden APC ";
pixel_y = -23;
pixel_y = -25;
start_charge = 0
},
/obj/item/reagent_containers/glass/bottle/nutrient/ez,
Expand Down
31 changes: 2 additions & 29 deletions _maps/RandomRuins/JungleRuins/jungle_bombed_starport.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -1640,19 +1640,6 @@
icon_state = "plastitanium_dam2"
},
/area/overmap_encounter/planetoid/jungle/explored)
"lD" = (
/obj/structure/catwalk/over/plated_catwalk,
/obj/structure/cable{
icon_state = "4-8"
},
/obj/structure/cable{
icon_state = "4-8"
},
/obj/machinery/atmospherics/pipe/simple/orange/hidden{
dir = 4
},
/turf/open/floor/plating,
/area/overmap_encounter/planetoid/jungle/explored)
"lG" = (
/obj/effect/decal/cleanable/ash/large,
/obj/structure/flora/rock/pile,
Expand Down Expand Up @@ -7684,20 +7671,6 @@
icon_state = "panelscorched"
},
/area/overmap_encounter/planetoid/jungle/explored)
"ZY" = (
/obj/structure/cable{
icon_state = "4-8"
},
/obj/structure/cable{
icon_state = "4-8"
},
/obj/machinery/atmospherics/pipe/simple/orange/hidden{
dir = 4
},
/turf/open/floor/concrete/reinforced{
light_range = 2
},
/area/overmap_encounter/planetoid/jungle/explored)

(1,1,1) = {"
UE
Expand Down Expand Up @@ -10110,7 +10083,7 @@ Al
Al
Al
pU
ZY
Is
pU
pU
pU
Expand Down Expand Up @@ -11650,7 +11623,7 @@ Nb
ce
ir
kv
lD
Mg
MU
ce
xf
Expand Down
17 changes: 1 addition & 16 deletions _maps/RandomRuins/JungleRuins/jungle_interceptor.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -902,18 +902,6 @@
},
/turf/open/floor/plasteel/tech,
/area/ruin/jungle/interceptor/forehall)
"gQ" = (
/obj/effect/spawner/structure/window/shuttle,
/obj/machinery/door/poddoor/shutters/preopen{
id = "condorwindows";
name = "External Shutters"
},
/obj/machinery/door/poddoor/shutters/preopen{
id = "condorwindows";
name = "External Shutters"
},
/turf/open/floor/plating,
/area/ruin/jungle/interceptor/starhall)
"gR" = (
/obj/effect/decal/remains/robot,
/turf/open/floor/plating/dirt/jungle/dark/lit,
Expand Down Expand Up @@ -1908,7 +1896,6 @@
"pY" = (
/obj/item/stack/ore/salvage/scrapmetal,
/obj/structure/girder,
/obj/structure/girder,
/turf/open/floor/plating/dirt/jungle/dark/lit,
/area/overmap_encounter/planetoid/jungle/explored)
"qa" = (
Expand Down Expand Up @@ -6036,7 +6023,6 @@
/turf/open/floor/plating/dirt/jungle/dark/lit,
/area/overmap_encounter/planetoid/jungle/explored)
"Ya" = (
/obj/structure/catwalk/over/plated_catwalk/dark,
/obj/machinery/door/airlock/maintenance{
dir = 4
},
Expand Down Expand Up @@ -6121,7 +6107,6 @@
icon_state = "2-8"
},
/obj/structure/catwalk/over,
/obj/structure/catwalk/over,
/obj/item/clothing/accessory/armband/engine,
/obj/item/clothing/accessory/armband/engine,
/turf/open/floor/plating/rust,
Expand Down Expand Up @@ -8649,7 +8634,7 @@ vl
vl
cL
lj
gQ
pC
UY
XC
Ih
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,6 @@
"ZM" = (
/obj/structure/girder,
/obj/item/stack/ore/salvage/scraptitanium/five,
/obj/structure/girder/displaced,
/turf/open/floor/plating,
/area/ruin/unpowered/crashsite/pinnance)
"ZO" = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,6 @@
/area/ruin/unpowered/elephant_graveyard)
"bN" = (
/obj/structure/sign/warning/securearea,
/obj/structure/sign/warning/securearea,
/turf/closed/mineral/strong/wasteland,
/area/ruin/unpowered/elephant_graveyard)
"bO" = (
Expand Down
9 changes: 1 addition & 8 deletions _maps/RandomRuins/RockRuins/rockplanet_nomadcrash.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -636,13 +636,6 @@
/obj/item/wirecutters,
/turf/open/floor/plating,
/area/ruin/rockplanet/nanotrasen)
"uu" = (
/obj/machinery/door/airlock/engineering{
dir = 1;
name = "Engineering"
},
/turf/closed/wall,
/area/overmap_encounter/planetoid/rockplanet/explored)
"uB" = (
/turf/open/floor/plasteel/tech,
/area/ruin/rockplanet/nanotrasen)
Expand Down Expand Up @@ -4075,7 +4068,7 @@ iN
tA
iN
aX
uu
tN
eo
eo
tN
Expand Down
8 changes: 4 additions & 4 deletions _maps/RandomRuins/SandRuins/whitesands_surface_chokepoint.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
/mob/living/simple_animal/hostile/nanotrasen/ranged{
atmos_requirements = list("min_oxy"=5,"max_oxy"=0,"min_tox"=0,"max_tox"=0,"min_co2"=0,"max_co2"=999,"min_n2"=0,"max_n2"=0);
damage_coeff = list("brute"=1,"fire"=1,"toxin"=1,"clone"=1,"stamina"=0,"oxygen"=0);
name = "\improper NanoTrasen Stranded Security Officer"
name = "\improper Nanotrasen Stranded Security Officer"
},
/turf/open/floor/plating/asteroid/whitesands/dried,
/area/ruin)
Expand All @@ -38,7 +38,7 @@
atmos_requirements = list("min_oxy"=5,"max_oxy"=0,"min_tox"=0,"max_tox"=0,"min_co2"=0,"max_co2"=999,"min_n2"=0,"max_n2"=0);
damage_coeff = list("brute"=1,"fire"=1,"toxin"=1,"clone"=1,"stamina"=0,"oxygen"=0);
dir = 4;
name = "\improper NanoTrasen Stranded Security Officer"
name = "\improper Nanotrasen Stranded Security Officer"
},
/turf/open/floor/plating/asteroid/whitesands/dried,
/area/ruin)
Expand All @@ -50,7 +50,7 @@
atmos_requirements = list("min_oxy"=5,"max_oxy"=0,"min_tox"=0,"max_tox"=0,"min_co2"=0,"max_co2"=999,"min_n2"=0,"max_n2"=0);
damage_coeff = list("brute"=1,"fire"=1,"toxin"=1,"clone"=1,"stamina"=0,"oxygen"=0);
dir = 8;
name = "\improper NanoTrasen Stranded Security Officer"
name = "\improper Nanotrasen Stranded Security Officer"
},
/turf/open/floor/plating/asteroid/whitesands/dried,
/area/ruin)
Expand Down Expand Up @@ -97,7 +97,7 @@
atmos_requirements = list("min_oxy"=5,"max_oxy"=0,"min_tox"=0,"max_tox"=0,"min_co2"=0,"max_co2"=999,"min_n2"=0,"max_n2"=0);
damage_coeff = list("brute"=1,"fire"=1,"toxin"=1,"clone"=1,"stamina"=0,"oxygen"=0);
dir = 8;
name = "\improper NanoTrasen Stranded Security Officer"
name = "\improper Nanotrasen Stranded Security Officer"
},
/turf/open/floor/plating/asteroid/whitesands/dried,
/area/ruin)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1257,7 +1257,6 @@
dir = 4
},
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,
/turf/open/floor/plasteel,
/area/ruin/powered)
"Fn" = (
Expand Down Expand Up @@ -1555,12 +1554,6 @@
/obj/effect/decal/cleanable/dirt,
/turf/open/floor/plasteel,
/area/ruin/powered)
"No" = (
/obj/machinery/atmospherics/pipe/simple/supply/hidden,
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,
/turf/open/floor/plasteel,
/area/ruin/powered)
"NM" = (
/obj/effect/turf_decal/box,
/obj/effect/decal/cleanable/dirt,
Expand Down Expand Up @@ -2457,7 +2450,7 @@ mQ
BQ
nJ
Dz
No
Dz
Bx
Me
Me
Expand Down
Loading

0 comments on commit e06821f

Please sign in to comment.