From e0c29416f152d87fe9a895e689ece9fc8a0b672c Mon Sep 17 00:00:00 2001 From: Mark Suckerberg Date: Mon, 8 Jan 2024 08:43:38 -0600 Subject: [PATCH] more --- .../JungleRuins/jungle_bombed_starport.dmm | 16 +------------- .../JungleRuins/jungle_interceptor.dmm | 2 -- .../lavaland_surface_elephant_graveyard.dmm | 1 - _maps/RandomRuins/SpaceRuins/excavator_DK.dmm | 9 +------- _maps/RandomRuins/SpaceRuins/fueldepot.dmm | 14 ++---------- _maps/RandomRuins/SpaceRuins/oldstation.dmm | 17 +------------- _maps/RandomRuins/SpaceRuins/onehalf.dmm | 19 +--------------- .../wasteplanet_abandoned_mechbay.dmm | 21 +----------------- _maps/outpost/hangar/nt_asteroid_20x20.dmm | 7 ------ _maps/outpost/hangar/nt_asteroid_40x20.dmm | 18 --------------- _maps/shuttles/inteq/inteq_talos.dmm | 4 ---- .../shuttles/nanotrasen/nanotrasen_mimir.dmm | 22 +++++++++++++------ tools/maplint/lints/multiple_cables.yml | 2 +- tools/maplint/lints/multiple_catwalk.yml | 4 ++++ tools/maplint/lints/multiple_signs.yml | 4 ++++ tools/maplint/source/lint.py | 15 +++++++++++++ 16 files changed, 46 insertions(+), 129 deletions(-) create mode 100644 tools/maplint/lints/multiple_catwalk.yml create mode 100644 tools/maplint/lints/multiple_signs.yml diff --git a/_maps/RandomRuins/JungleRuins/jungle_bombed_starport.dmm b/_maps/RandomRuins/JungleRuins/jungle_bombed_starport.dmm index fb76348642fc..c8cd0dfd8964 100644 --- a/_maps/RandomRuins/JungleRuins/jungle_bombed_starport.dmm +++ b/_maps/RandomRuins/JungleRuins/jungle_bombed_starport.dmm @@ -7671,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 @@ -10097,7 +10083,7 @@ Al Al Al pU -ZY +Is pU pU pU diff --git a/_maps/RandomRuins/JungleRuins/jungle_interceptor.dmm b/_maps/RandomRuins/JungleRuins/jungle_interceptor.dmm index dc9dd2dfb7f8..ae980c270cdd 100644 --- a/_maps/RandomRuins/JungleRuins/jungle_interceptor.dmm +++ b/_maps/RandomRuins/JungleRuins/jungle_interceptor.dmm @@ -6023,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 }, @@ -6108,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, diff --git a/_maps/RandomRuins/LavaRuins/lavaland_surface_elephant_graveyard.dmm b/_maps/RandomRuins/LavaRuins/lavaland_surface_elephant_graveyard.dmm index 6b6b4aac357a..9babc1631c8f 100644 --- a/_maps/RandomRuins/LavaRuins/lavaland_surface_elephant_graveyard.dmm +++ b/_maps/RandomRuins/LavaRuins/lavaland_surface_elephant_graveyard.dmm @@ -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" = ( diff --git a/_maps/RandomRuins/SpaceRuins/excavator_DK.dmm b/_maps/RandomRuins/SpaceRuins/excavator_DK.dmm index f2814f388455..865f979ff820 100644 --- a/_maps/RandomRuins/SpaceRuins/excavator_DK.dmm +++ b/_maps/RandomRuins/SpaceRuins/excavator_DK.dmm @@ -133,14 +133,8 @@ /obj/item/stack/sheet/plasteel, /turf/open/space, /area/ruin/space) -"vm" = ( -/obj/structure/catwalk, -/obj/structure/catwalk, -/turf/open/space, -/area/ruin/space/derelict) "vC" = ( /obj/structure/catwalk, -/obj/structure/catwalk, /obj/structure/cable{ icon_state = "2-8" }, @@ -354,7 +348,6 @@ /area/ruin/space/derelict) "ZB" = ( /obj/structure/catwalk, -/obj/structure/catwalk, /obj/structure/cable{ icon_state = "1-8" }, @@ -1309,7 +1302,7 @@ Dz EE Pq Dz -vm +nA nA gD nA diff --git a/_maps/RandomRuins/SpaceRuins/fueldepot.dmm b/_maps/RandomRuins/SpaceRuins/fueldepot.dmm index 57c775daed04..478e36ffe5bb 100644 --- a/_maps/RandomRuins/SpaceRuins/fueldepot.dmm +++ b/_maps/RandomRuins/SpaceRuins/fueldepot.dmm @@ -312,11 +312,6 @@ /obj/effect/decal/cleanable/dirt/dust, /turf/open/floor/plating, /area/ruin/unpowered) -"kp" = ( -/obj/structure/lattice, -/obj/structure/catwalk, -/turf/open/space, -/area/ruin/unpowered) "kN" = ( /obj/structure/catwalk, /obj/machinery/atmospherics/pipe/simple/orange{ @@ -542,11 +537,6 @@ }, /turf/open/floor/plating/airless, /area/ruin/unpowered) -"sE" = ( -/obj/structure/catwalk, -/obj/structure/lattice, -/turf/open/space, -/area/ruin/unpowered) "sU" = ( /obj/effect/decal/cleanable/dirt/dust, /obj/effect/decal/cleanable/dirt/dust, @@ -2547,7 +2537,7 @@ XL XL XL Ut -sE +Ut ln ln ZO @@ -3215,7 +3205,7 @@ ZO ZO ZO ZO -kp +Ut ZO ZO ln diff --git a/_maps/RandomRuins/SpaceRuins/oldstation.dmm b/_maps/RandomRuins/SpaceRuins/oldstation.dmm index d47da8e7a81c..1b9136861194 100644 --- a/_maps/RandomRuins/SpaceRuins/oldstation.dmm +++ b/_maps/RandomRuins/SpaceRuins/oldstation.dmm @@ -4344,9 +4344,6 @@ /obj/effect/decal/cleanable/dirt, /obj/machinery/atmospherics/pipe/simple/scrubbers/hidden, /obj/machinery/atmospherics/pipe/simple/supply/hidden, -/obj/structure/cable{ - icon_state = "1-2" - }, /obj/structure/cable{ icon_state = "1-2" }, @@ -4598,18 +4595,6 @@ icon_state = "platingdmg1" }, /area/ruin/space/has_grav/ancientstation/betastorage) -"mU" = ( -/obj/effect/decal/cleanable/dirt, -/obj/machinery/atmospherics/pipe/simple/supply/hidden, -/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden, -/obj/structure/cable{ - icon_state = "1-2" - }, -/obj/structure/cable{ - icon_state = "1-2" - }, -/turf/open/floor/plasteel/airless, -/area/ruin/space/has_grav/ancientstation/betacorridor) "mV" = ( /obj/effect/decal/cleanable/dirt, /turf/open/floor/plasteel/airless, @@ -9098,7 +9083,7 @@ iT gr lZ mp -mU +nq nq nG ox diff --git a/_maps/RandomRuins/SpaceRuins/onehalf.dmm b/_maps/RandomRuins/SpaceRuins/onehalf.dmm index 625193f27e35..d613f4bcf8f8 100644 --- a/_maps/RandomRuins/SpaceRuins/onehalf.dmm +++ b/_maps/RandomRuins/SpaceRuins/onehalf.dmm @@ -2161,23 +2161,6 @@ /obj/item/stack/rods, /turf/open/space/basic, /area/space/nearstation) -"VW" = ( -/obj/effect/turf_decal/solarpanel, -/obj/machinery/power/solar, -/obj/structure/cable{ - icon_state = "0-8" - }, -/obj/structure/cable{ - icon_state = "0-4" - }, -/obj/structure/cable{ - icon_state = "0-8" - }, -/obj/structure/cable{ - icon_state = "0-4" - }, -/turf/open/floor/plating/airless, -/area/space/nearstation) "Wc" = ( /obj/effect/gibspawner, /mob/living/simple_animal/hostile/construct/wraith/hostile, @@ -3748,7 +3731,7 @@ aa aa aa aH -VW +Ga aH aa aH diff --git a/_maps/RandomRuins/WasteRuins/wasteplanet_abandoned_mechbay.dmm b/_maps/RandomRuins/WasteRuins/wasteplanet_abandoned_mechbay.dmm index 5b3bedb82a7d..554816ddc75d 100644 --- a/_maps/RandomRuins/WasteRuins/wasteplanet_abandoned_mechbay.dmm +++ b/_maps/RandomRuins/WasteRuins/wasteplanet_abandoned_mechbay.dmm @@ -2319,9 +2319,6 @@ /turf/open/floor/concrete/slab_1, /area/ruin/wasteplanet/abandoned_mechbay/mainhall) "Bm" = ( -/obj/structure/cable{ - icon_state = "0-2" - }, /obj/structure/cable{ icon_state = "0-2" }, @@ -4065,22 +4062,6 @@ }, /turf/open/floor/plasteel/tech, /area/ruin/wasteplanet/abandoned_mechbay/mechlab) -"Xp" = ( -/obj/effect/turf_decal/trimline/opaque/neutral/line{ - pixel_y = 8 - }, -/obj/structure/cable{ - icon_state = "4-8" - }, -/obj/structure/cable{ - icon_state = "4-8" - }, -/obj/machinery/atmospherics/pipe/simple/supply/hidden/layer2{ - dir = 4 - }, -/obj/machinery/atmospherics/pipe/manifold4w/scrubbers/hidden/layer4, -/turf/open/floor/concrete/slab_1, -/area/ruin/wasteplanet/abandoned_mechbay/mainhall) "Xy" = ( /obj/machinery/atmospherics/pipe/simple/scrubbers/hidden/layer4{ dir = 4 @@ -5597,7 +5578,7 @@ qf lf LH cu -Xp +uM ZD rt bn diff --git a/_maps/outpost/hangar/nt_asteroid_20x20.dmm b/_maps/outpost/hangar/nt_asteroid_20x20.dmm index a587c352be82..c3d35afcea10 100644 --- a/_maps/outpost/hangar/nt_asteroid_20x20.dmm +++ b/_maps/outpost/hangar/nt_asteroid_20x20.dmm @@ -66,7 +66,6 @@ /obj/effect/turf_decal/industrial/warning{ dir = 8 }, -/obj/structure/catwalk/over/plated_catwalk, /obj/effect/decal/cleanable/dirt, /obj/effect/turf_decal/industrial/warning{ dir = 4 @@ -464,7 +463,6 @@ /area/hangar) "mV" = ( /obj/structure/catwalk/over/plated_catwalk, -/obj/structure/catwalk/over/plated_catwalk, /obj/machinery/atmospherics/pipe/simple/general{ dir = 5 }, @@ -712,7 +710,6 @@ /obj/effect/turf_decal/industrial/warning{ dir = 10 }, -/obj/structure/catwalk/over/plated_catwalk, /obj/effect/decal/cleanable/dirt, /obj/effect/turf_decal/industrial/warning{ dir = 10 @@ -1129,7 +1126,6 @@ /obj/effect/turf_decal/industrial/warning/corner{ dir = 1 }, -/obj/structure/catwalk/over/plated_catwalk, /obj/effect/decal/cleanable/dirt, /obj/effect/decal/cleanable/glass, /obj/machinery/atmospherics/pipe/simple/general{ @@ -1199,7 +1195,6 @@ /obj/effect/turf_decal/industrial/warning{ dir = 8 }, -/obj/structure/catwalk/over/plated_catwalk, /obj/effect/decal/cleanable/dirt, /obj/machinery/atmospherics/pipe/simple/general, /turf/open/floor/plating{ @@ -1735,7 +1730,6 @@ /obj/effect/turf_decal/industrial/warning{ dir = 8 }, -/obj/structure/catwalk/over/plated_catwalk, /obj/effect/decal/cleanable/blood/old, /obj/machinery/atmospherics/pipe/simple/general, /turf/open/floor/plating{ @@ -1880,7 +1874,6 @@ /obj/effect/turf_decal/industrial/warning/corner{ dir = 8 }, -/obj/structure/catwalk/over/plated_catwalk, /obj/effect/decal/cleanable/dirt, /obj/effect/turf_decal/industrial/warning/corner, /obj/effect/turf_decal/industrial/warning/corner{ diff --git a/_maps/outpost/hangar/nt_asteroid_40x20.dmm b/_maps/outpost/hangar/nt_asteroid_40x20.dmm index fd918bf6b74c..959b27a5dd98 100644 --- a/_maps/outpost/hangar/nt_asteroid_40x20.dmm +++ b/_maps/outpost/hangar/nt_asteroid_40x20.dmm @@ -98,7 +98,6 @@ "dN" = ( /obj/structure/catwalk/over/plated_catwalk, /obj/effect/decal/cleanable/dirt, -/obj/structure/catwalk/over/plated_catwalk, /obj/effect/decal/cleanable/dirt, /obj/machinery/atmospherics/pipe/simple/general, /turf/open/floor/plating{ @@ -134,10 +133,6 @@ /area/hangar) "eH" = ( /obj/structure/catwalk/over/plated_catwalk, -/obj/structure/sign/poster/contraband/energy_swords{ - pixel_y = -32 - }, -/obj/structure/catwalk/over/plated_catwalk, /obj/structure/sign/poster/contraband/energy_swords{ pixel_y = -32 }, @@ -267,7 +262,6 @@ "hs" = ( /obj/structure/catwalk/over/plated_catwalk, /obj/effect/decal/cleanable/dirt, -/obj/structure/catwalk/over/plated_catwalk, /obj/effect/decal/cleanable/dirt, /obj/machinery/atmospherics/pipe/simple/general{ dir = 6 @@ -352,7 +346,6 @@ /area/hangar) "ka" = ( /obj/structure/catwalk/over/plated_catwalk, -/obj/structure/catwalk/over/plated_catwalk, /obj/machinery/atmospherics/pipe/simple/general{ dir = 4 }, @@ -416,7 +409,6 @@ /obj/machinery/light/directional/north, /obj/effect/decal/cleanable/dirt, /obj/effect/decal/cleanable/dirt, -/obj/structure/catwalk/over/plated_catwalk, /obj/effect/decal/cleanable/dirt, /obj/effect/decal/cleanable/dirt, /obj/machinery/atmospherics/pipe/simple/general{ @@ -491,7 +483,6 @@ dir = 1 }, /obj/effect/decal/cleanable/dirt, -/obj/structure/catwalk/over/plated_catwalk, /obj/effect/turf_decal/industrial/warning{ dir = 1 }, @@ -860,7 +851,6 @@ "ug" = ( /obj/structure/catwalk/over/plated_catwalk, /obj/effect/decal/cleanable/dirt, -/obj/structure/catwalk/over/plated_catwalk, /obj/effect/decal/cleanable/dirt, /obj/machinery/atmospherics/pipe/simple/general{ dir = 4 @@ -1150,7 +1140,6 @@ /obj/structure/catwalk/over/plated_catwalk, /obj/effect/decal/cleanable/dirt, /obj/effect/decal/cleanable/dirt, -/obj/structure/catwalk/over/plated_catwalk, /obj/effect/decal/cleanable/dirt, /obj/effect/decal/cleanable/dirt, /obj/machinery/atmospherics/pipe/simple/general{ @@ -1437,7 +1426,6 @@ "JF" = ( /obj/structure/catwalk/over/plated_catwalk, /obj/effect/decal/cleanable/dirt, -/obj/structure/catwalk/over/plated_catwalk, /obj/effect/decal/cleanable/dirt, /obj/machinery/atmospherics/pipe/simple/general{ dir = 6 @@ -1521,7 +1509,6 @@ /area/hangar) "Ly" = ( /obj/structure/catwalk/over/plated_catwalk, -/obj/structure/catwalk/over/plated_catwalk, /obj/machinery/atmospherics/pipe/simple/general, /turf/open/floor/plating{ icon_state = "panelscorched"; @@ -1597,7 +1584,6 @@ /obj/structure/catwalk/over/plated_catwalk, /obj/effect/decal/cleanable/dirt, /obj/effect/decal/cleanable/dirt, -/obj/structure/catwalk/over/plated_catwalk, /obj/effect/decal/cleanable/dirt, /obj/effect/decal/cleanable/dirt, /obj/machinery/atmospherics/pipe/simple/general, @@ -1692,10 +1678,8 @@ }, /area/hangar) "QA" = ( -/obj/structure/catwalk/over/plated_catwalk, /obj/machinery/light/directional/east, /obj/structure/catwalk/over/plated_catwalk, -/obj/machinery/light/directional/east, /obj/machinery/atmospherics/pipe/simple/general, /turf/open/floor/plating{ icon_state = "panelscorched"; @@ -1915,7 +1899,6 @@ dir = 1 }, /obj/effect/decal/cleanable/dirt, -/obj/structure/catwalk/over/plated_catwalk, /obj/effect/turf_decal/industrial/warning{ dir = 4 }, @@ -2014,7 +1997,6 @@ /obj/structure/railing{ layer = 3.1 }, -/obj/structure/catwalk/over/plated_catwalk, /obj/effect/turf_decal/spline/fancy/opaque/black, /obj/machinery/atmospherics/pipe/simple/general, /turf/open/floor/plating{ diff --git a/_maps/shuttles/inteq/inteq_talos.dmm b/_maps/shuttles/inteq/inteq_talos.dmm index 3bd00f00ed9a..dfc829d40320 100644 --- a/_maps/shuttles/inteq/inteq_talos.dmm +++ b/_maps/shuttles/inteq/inteq_talos.dmm @@ -5929,14 +5929,10 @@ /obj/effect/turf_decal/industrial/fire{ dir = 4 }, -/obj/effect/spawner/structure/window/plasma/reinforced/plastitanium, /obj/machinery/door/poddoor/shutters{ id = "talos_engine_shutter" }, /obj/effect/spawner/structure/window/plasma/reinforced/plastitanium, -/obj/machinery/door/poddoor/shutters{ - id = "talos_engine_shutter" - }, /turf/open/floor/plating, /area/ship/engineering/engine) "Mf" = ( diff --git a/_maps/shuttles/nanotrasen/nanotrasen_mimir.dmm b/_maps/shuttles/nanotrasen/nanotrasen_mimir.dmm index 58763ddd82df..8f7fb343e1a4 100644 --- a/_maps/shuttles/nanotrasen/nanotrasen_mimir.dmm +++ b/_maps/shuttles/nanotrasen/nanotrasen_mimir.dmm @@ -70,6 +70,16 @@ }, /turf/open/floor/plasteel/tech/grid, /area/ship/maintenance/port) +"aC" = ( +/obj/structure/window/reinforced/spawner{ + dir = 4 + }, +/obj/machinery/conveyor{ + id = "prison_scrap"; + dir = 1 + }, +/turf/open/floor/plating, +/area/ship/engineering/engine) "aE" = ( /obj/structure/table, /obj/machinery/door/window, @@ -6249,8 +6259,7 @@ output_dir = 1 }, /obj/machinery/conveyor{ - id = "prison_scrap"; - dir = 1 + id = "prison_scrap" }, /obj/structure/window/reinforced/spawner{ dir = 8 @@ -6335,10 +6344,6 @@ /turf/open/floor/plasteel/sepia, /area/ship/crew/hydroponics) "KI" = ( -/obj/machinery/conveyor/inverted{ - id = "prison_scrap"; - dir = 1 - }, /obj/machinery/mineral/stacking_machine{ output_dir = 2; input_dir = 1 @@ -6346,6 +6351,9 @@ /obj/structure/window/reinforced/spawner{ dir = 8 }, +/obj/machinery/conveyor{ + id = "prison_scrap" + }, /turf/open/floor/plating, /area/ship/engineering/engine) "KM" = ( @@ -9119,7 +9127,7 @@ yz tY jS TO -TO +aC Kk wm Jy diff --git a/tools/maplint/lints/multiple_cables.yml b/tools/maplint/lints/multiple_cables.yml index 4344fb958cbf..5c063dae727d 100644 --- a/tools/maplint/lints/multiple_cables.yml +++ b/tools/maplint/lints/multiple_cables.yml @@ -2,4 +2,4 @@ help: "Duplicated/overlapping cables detected." /obj/structure/cable: banned_neighbors: /obj/structure/cable: - identical: true + matching_vars: [icon_state] diff --git a/tools/maplint/lints/multiple_catwalk.yml b/tools/maplint/lints/multiple_catwalk.yml new file mode 100644 index 000000000000..4e5f23c0224d --- /dev/null +++ b/tools/maplint/lints/multiple_catwalk.yml @@ -0,0 +1,4 @@ +/obj/structure/catwalk: + banned_neighbors: + - /obj/structure/catwalk + - /obj/structure/lattice diff --git a/tools/maplint/lints/multiple_signs.yml b/tools/maplint/lints/multiple_signs.yml new file mode 100644 index 000000000000..d942a842fc70 --- /dev/null +++ b/tools/maplint/lints/multiple_signs.yml @@ -0,0 +1,4 @@ +/obj/structure/sign: + banned_neighbors: + /obj/structure/sign: + matching_vars: [pixel_x, pixel_y] diff --git a/tools/maplint/source/lint.py b/tools/maplint/source/lint.py index ee86d29be52b..061ccd28cdbf 100644 --- a/tools/maplint/source/lint.py +++ b/tools/maplint/source/lint.py @@ -45,6 +45,7 @@ class BannedNeighbor: identical: bool = False typepath: Optional[TypepathExtra] = None pattern: Optional[re.Pattern] = None + matching_vars: list[str] = [] def __init__(self, typepath, data = {}): if typepath.upper() != typepath: @@ -59,12 +60,26 @@ def __init__(self, typepath, data = {}): self.identical = data.pop("identical") expect(isinstance(self.identical, bool), "identical must be a boolean.") + if "matching_vars" in data: + self.matching_vars = data.pop("matching_vars") + expect(isinstance(self.matching_vars, list), "matching_vars must be a list of variables.") + if "pattern" in data: self.pattern = re.compile(data.pop("pattern")) expect(len(data) == 0, f"Unknown key in banned neighbor: {', '.join(data.keys())}.") def matches(self, identified: Content, neighbor: Content): + if len(self.matching_vars) > 0: + if self.typepath is not None and not self.typepath.matches_path(neighbor.path): + return False + + for variable in self.matching_vars: + if identified.var_edits.get(variable) != neighbor.var_edits.get(variable): + return False + + return True + if self.identical: if identified.path != neighbor.path: return False