From 45b4960061310f21032340bc3da22333aba6ad07 Mon Sep 17 00:00:00 2001 From: Fluffy <65877598+FluffyGhoster@users.noreply.github.com> Date: Mon, 8 Apr 2024 10:28:27 +0200 Subject: [PATCH] Camera ctags fix and test (#18859) Removed duplicated cameras with ctags, mainly from the old aurora map. Added a scanner for camera ctags uniqueness in the CI. --- .github/workflows/byond.yml | 4 + code/game/machinery/camera/camera.dm | 7 + .../fluffyghost-cameractagsfixandtest.yml | 42 +++++ maps/aurora/aurora-1_centcomm.dmm | 41 ----- maps/aurora/aurora-3_sublevel.dmm | 13 +- maps/aurora/aurora-4_mainlevel.dmm | 152 ------------------ maps/aurora/aurora-5_interstitial.dmm | 4 - maps/event/generic_dock/generic_dock-1.dmm | 37 ----- maps/runtime/runtime-1.dmm | 4 - maps/sccv_horizon/sccv_horizon-2_deck_2.dmm | 4 +- tools/dmm_scanner/scan_camera_ctags.py | 48 ++++++ 11 files changed, 104 insertions(+), 252 deletions(-) create mode 100644 html/changelogs/fluffyghost-cameractagsfixandtest.yml create mode 100644 tools/dmm_scanner/scan_camera_ctags.py diff --git a/.github/workflows/byond.yml b/.github/workflows/byond.yml index d256655dbc3..f740bdca183 100644 --- a/.github/workflows/byond.yml +++ b/.github/workflows/byond.yml @@ -299,6 +299,10 @@ jobs: tools/bootstrap/python -m mapmerge2.dmm_test tools/bootstrap/python -m tools.maplint.source + - name: Scan DMMs + run: | + tools/bootstrap/python -m dmm_scanner.scan_camera_ctags + ########################################### ############## GENERIC TESTS ############## ########################################### diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index 9570b0c337e..7a3a855a0e8 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -47,8 +47,15 @@ for(var/obj/machinery/camera/C in GLOB.cameranet.cameras) var/list/tempnetwork = C.network&src.network if(C != src && C.c_tag == src.c_tag && tempnetwork.len) + + #if !defined(UNIT_TEST) log_mapping_error("The camera [src.c_tag] at [src.x]-[src.y]-[src.z] conflicts with the c_tag of the camera in [C.x]-[C.y]-[C.z]!") + #else + SSunit_tests_config.UT.fail("The camera [src.c_tag] at [src.x]-[src.y]-[src.z] conflicts with the c_tag of the camera in [C.x]-[C.y]-[C.z]!") + + #endif + if(!src.network || src.network.len < 1) if(loc) log_mapping_error("[src.name] in [get_area(src)] (x:[src.x] y:[src.y] z:[src.z] has errored. [src.network?"Empty network list":"Null network list"]") diff --git a/html/changelogs/fluffyghost-cameractagsfixandtest.yml b/html/changelogs/fluffyghost-cameractagsfixandtest.yml new file mode 100644 index 00000000000..3199e433365 --- /dev/null +++ b/html/changelogs/fluffyghost-cameractagsfixandtest.yml @@ -0,0 +1,42 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +# balance +# admin +# backend +# security +# refactor +################################# + +# Your name. +author: FluffyGhost + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - maptweak: "Removed duplicated cameras with ctags, mainly from the old aurora map." + - backend: "Added a scanner for camera ctags uniqueness in the CI." diff --git a/maps/aurora/aurora-1_centcomm.dmm b/maps/aurora/aurora-1_centcomm.dmm index a6140ee9494..9efa2564459 100644 --- a/maps/aurora/aurora-1_centcomm.dmm +++ b/maps/aurora/aurora-1_centcomm.dmm @@ -5960,11 +5960,6 @@ /turf/unsimulated/floor, /area/centcom/spawning) "aNc" = ( -/obj/machinery/camera/network/crescent{ - c_tag = "Crescent Departures"; - dir = 1; - pixel_x = -10 - }, /turf/unsimulated/floor/plating, /area/centcom/spawning) "aNe" = ( @@ -11615,10 +11610,6 @@ /turf/unsimulated/floor, /area/antag/mercenary) "dKe" = ( -/obj/machinery/camera/network/crescent{ - c_tag = "Crescent Bar East"; - dir = 8 - }, /obj/structure/bed/stool/chair/padded/beige, /turf/unsimulated/floor{ icon_state = "wood" @@ -12378,10 +12369,6 @@ /obj/effect/landmark{ name = "tdome2" }, -/obj/machinery/camera/network/thunder{ - c_tag = "Thunderdome - Red Team"; - invisibility = 101 - }, /obj/effect/floor_decal/corner/grey/diagonal{ dir = 4 }, @@ -12805,10 +12792,6 @@ /turf/unsimulated/floor/plating, /area/shuttle/escape) "exm" = ( -/obj/machinery/camera/network/crescent{ - c_tag = "Crescent Arrivals North"; - dir = 8 - }, /obj/effect/floor_decal/corner/green{ dir = 6 }, @@ -15825,10 +15808,6 @@ /turf/unsimulated/floor, /area/centcom/spawning) "goO" = ( -/obj/machinery/camera/network/thunder{ - c_tag = "Thunderdome Arena"; - invisibility = 101 - }, /obj/effect/decal/fake_object/light_source/invisible, /turf/simulated/floor/bluegrid, /area/tdome) @@ -27848,10 +27827,6 @@ }, /area/centcom/specops) "nUK" = ( -/obj/machinery/camera/network/crescent{ - c_tag = "Crescent Arrivals - Holding Cell"; - dir = 4 - }, /obj/structure/bed/stool/chair{ dir = 1 }, @@ -27958,10 +27933,6 @@ /obj/effect/landmark{ name = "tdome1" }, -/obj/machinery/camera/network/thunder{ - c_tag = "Green Team"; - invisibility = 101 - }, /obj/effect/floor_decal/corner/grey/diagonal{ dir = 4 }, @@ -28089,10 +28060,6 @@ /area/centcom/control) "oaC" = ( /obj/structure/table/reinforced/wood, -/obj/machinery/camera/network/crescent{ - c_tag = "Crescent Bar Center"; - pixel_x = 20 - }, /obj/machinery/door/blast/odin{ dir = 4; icon_state = "shutter1"; @@ -38040,10 +38007,6 @@ /obj/effect/floor_decal/corner/red{ dir = 10 }, -/obj/machinery/camera/network/crescent{ - c_tag = "Crescent Arrivals North"; - dir = 8 - }, /turf/unsimulated/floor, /area/centcom/spawning) "vhx" = ( @@ -42153,10 +42116,6 @@ }, /area/antag/burglar) "xFq" = ( -/obj/machinery/camera/network/crescent{ - c_tag = "Shuttle West"; - dir = 4 - }, /turf/simulated/floor/shuttle/dark_blue, /area/shuttle/escape) "xFN" = ( diff --git a/maps/aurora/aurora-3_sublevel.dmm b/maps/aurora/aurora-3_sublevel.dmm index 7c73e758098..32a8b35b38e 100644 --- a/maps/aurora/aurora-3_sublevel.dmm +++ b/maps/aurora/aurora-3_sublevel.dmm @@ -3568,10 +3568,6 @@ /obj/machinery/power/smes/buildable{ RCon_tag = "Substation - Engineering Sublevel" }, -/obj/machinery/camera/network/engineering{ - c_tag = "Engineering - Engineering Substation"; - dir = 8 - }, /turf/simulated/floor, /area/maintenance/substation/engineering_sublevel) "aix" = ( @@ -16779,7 +16775,7 @@ icon_state = "pipe-c" }, /obj/machinery/camera/network/research_outpost{ - c_tag = "Research Sublevel - Xenobiology Cell Alpha"; + c_tag = "Research Sublevel - Xenobiology Cell Alpha 2"; dir = 8; network = list("Research Outpost","Xenobiology") }, @@ -16863,10 +16859,6 @@ d2 = 2; icon_state = "1-2" }, -/obj/machinery/camera/network/medbay{ - c_tag = "Medical - Morgue"; - dir = 8 - }, /obj/machinery/alarm/cold/east, /turf/simulated/floor/tiled{ name = "cooled floor"; @@ -34108,9 +34100,6 @@ /obj/item/clothing/gloves/latex/nitrile/tajara, /obj/item/clothing/gloves/latex/unathi, /obj/item/clothing/gloves/latex/tajara, -/obj/machinery/camera/network/medbay{ - c_tag = "Medical - Secondary Storage" - }, /obj/item/clothing/gloves/latex/vaurca, /turf/simulated/floor/tiled, /area/medical/medbay4) diff --git a/maps/aurora/aurora-4_mainlevel.dmm b/maps/aurora/aurora-4_mainlevel.dmm index d61875ff88f..aa72e8e69ef 100644 --- a/maps/aurora/aurora-4_mainlevel.dmm +++ b/maps/aurora/aurora-4_mainlevel.dmm @@ -769,9 +769,6 @@ /area/maintenance/substation/security) "abL" = ( /obj/structure/table/standard, -/obj/machinery/camera/network/medbay{ - c_tag = "Medical - Operating Room 1" - }, /obj/item/clothing/glasses/safety/goggles, /obj/effect/floor_decal/corner_wide/paleblue{ dir = 5 @@ -1369,10 +1366,6 @@ "acS" = ( /obj/structure/table/standard, /obj/item/clothing/glasses/safety/goggles, -/obj/machinery/camera/network/medbay{ - c_tag = "Medical - Operating Room 2"; - dir = 1 - }, /obj/effect/floor_decal/corner_wide/paleblue{ dir = 10 }, @@ -1654,9 +1647,6 @@ "adw" = ( /obj/machinery/portable_atmospherics/canister/nitrogen, /obj/machinery/atmospherics/portables_connector, -/obj/machinery/camera/network/research{ - c_tag = "Research - Server Room" - }, /turf/simulated/floor/carpet/rubber, /area/server) "adx" = ( @@ -1960,9 +1950,6 @@ /obj/machinery/atmospherics/pipe/simple/hidden/supply{ dir = 4 }, -/obj/machinery/camera/network/security{ - c_tag = "Security - Corridor Camera 6" - }, /turf/simulated/floor/tiled/ramp/bottom{ dir = 4 }, @@ -2511,10 +2498,6 @@ pixel_y = 5 }, /obj/item/pen, -/obj/machinery/camera/network/security{ - c_tag = "Security - Interrogation Observation"; - dir = 4 - }, /turf/simulated/floor/tiled, /area/security/brig) "aeZ" = ( @@ -2721,10 +2704,6 @@ d2 = 2; icon_state = "1-2" }, -/obj/machinery/camera/network/security{ - c_tag = "Security - Corridor Camera 1"; - dir = 4 - }, /obj/effect/floor_decal/corner/dark_blue{ dir = 9 }, @@ -3264,10 +3243,6 @@ dir = 4 }, /obj/machinery/light, -/obj/machinery/camera/network/research{ - c_tag = "Research - Corridor Camera 3"; - dir = 1 - }, /obj/effect/floor_decal/corner_wide/mauve, /turf/simulated/floor/tiled/white, /area/rnd/research) @@ -4733,10 +4708,6 @@ dir = 4; icon_state = "tube_empty" }, -/obj/machinery/camera/network/engineering{ - c_tag = "Engineering - Drone Fabrication"; - dir = 8 - }, /obj/machinery/light_switch{ pixel_x = 26 }, @@ -5346,10 +5317,6 @@ /area/maintenance/engineering) "akM" = ( /obj/structure/disposalpipe/segment, -/obj/machinery/camera/network/security{ - c_tag = "Security - Corridor Camera 2"; - dir = 8 - }, /turf/simulated/floor/tiled, /area/security/brig) "akN" = ( @@ -6568,10 +6535,6 @@ /turf/simulated/floor/carpet, /area/crew_quarters/bar) "ano" = ( -/obj/machinery/camera/network/research{ - c_tag = "Research - Exploratory Chemistry"; - dir = 1 - }, /obj/machinery/chemical_dispenser/full{ dir = 8 }, @@ -8622,10 +8585,6 @@ d2 = 8; icon_state = "4-8" }, -/obj/machinery/camera/network/engineering{ - c_tag = "Engineering - SMES Room"; - dir = 1 - }, /turf/simulated/floor/tiled, /area/engineering/engine_smes) "arf" = ( @@ -9193,10 +9152,6 @@ /obj/effect/floor_decal/corner_wide/mauve{ dir = 9 }, -/obj/machinery/camera/network/research{ - c_tag = "Research - Research Storage"; - dir = 4 - }, /obj/structure/table/rack{ dir = 8; }, @@ -10992,10 +10947,6 @@ dir = 1 }, /obj/machinery/light, -/obj/machinery/camera/network/security{ - c_tag = "Security - Corridor Camera 7"; - dir = 1 - }, /obj/effect/floor_decal/corner/dark_blue{ dir = 10 }, @@ -18030,10 +17981,6 @@ icon_state = "4-8" }, /obj/machinery/light, -/obj/machinery/camera/network/security{ - c_tag = "Security - Corridor Camera 4"; - dir = 1 - }, /obj/effect/floor_decal/corner/dark_blue{ dir = 10 }, @@ -18796,10 +18743,6 @@ /obj/effect/floor_decal/industrial/warning, /obj/machinery/power/apc/south, /obj/structure/cable/green, -/obj/machinery/camera/network/engineering{ - c_tag = "Engineering - Engine Airlock"; - dir = 1 - }, /turf/simulated/floor/tiled, /area/engineering/engine_airlock) "aHw" = ( @@ -19577,10 +19520,6 @@ dir = 8; icon_state = "tube_empty" }, -/obj/machinery/camera/network/security{ - c_tag = "Security - Corridor Camera 3"; - dir = 4 - }, /obj/effect/floor_decal/corner/dark_blue{ dir = 9 }, @@ -20225,9 +20164,6 @@ /obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{ dir = 4 }, -/obj/machinery/camera/network/security{ - c_tag = "Security - Lobby Desk" - }, /obj/structure/table/standard, /obj/item/stack/packageWrap, /obj/item/device/hand_labeler, @@ -20291,10 +20227,6 @@ /turf/simulated/floor/tiled, /area/security/warden) "aJO" = ( -/obj/machinery/camera/network/security{ - c_tag = "Security - Warden's Office"; - dir = 1 - }, /obj/machinery/requests_console/south{ department = "Warden's Desk"; departmentType = 5 @@ -22222,10 +22154,6 @@ dir = 8; icon_state = "tube_empty" }, -/obj/machinery/camera/network/security{ - c_tag = "Security - Head of Security's Office"; - dir = 4 - }, /obj/item/modular_computer/console/preset/security/hos, /turf/simulated/floor/tiled/dark, /area/crew_quarters/heads/hos) @@ -23951,10 +23879,6 @@ dir = 1; icon_state = "pipe-c" }, -/obj/machinery/camera/network/engineering{ - c_tag = "Engineering - Chief Engineer's Office"; - dir = 8 - }, /obj/structure/cable/green{ d1 = 2; d2 = 4; @@ -26073,10 +25997,6 @@ /area/security/lobby) "aTP" = ( /obj/machinery/light, -/obj/machinery/camera/network/security{ - c_tag = "Security - Lobby"; - dir = 1 - }, /obj/effect/floor_decal/corner/dark_blue{ dir = 9 }, @@ -28543,9 +28463,6 @@ /turf/simulated/floor/tiled, /area/hallway/primary/port) "aYh" = ( -/obj/machinery/camera/network/research{ - c_tag = "Research - Corridor Camera 1" - }, /obj/machinery/alarm/east, /obj/effect/floor_decal/corner_wide/mauve{ dir = 6 @@ -30447,10 +30364,6 @@ dir = 1 }, /obj/machinery/alarm/north, -/obj/machinery/camera/network/medbay{ - c_tag = "Medical - Chemistry Lab Bravo"; - dir = 4 - }, /obj/effect/floor_decal/corner/orange/full{ dir = 8 }, @@ -30502,10 +30415,6 @@ dir = 1 }, /obj/machinery/alarm/north, -/obj/machinery/camera/network/medbay{ - c_tag = "Medical - Chemistry Lab Alpha"; - dir = 8 - }, /obj/effect/floor_decal/corner/orange/full{ dir = 1 }, @@ -30683,9 +30592,6 @@ /area/crew_quarters/medbreak) "bcl" = ( /obj/machinery/vending/cigarette, -/obj/machinery/camera/network/medbay{ - c_tag = "Medical - Staff Smoking Lounge" - }, /turf/simulated/floor/tiled/dark, /area/crew_quarters/medbreak) "bcm" = ( @@ -34038,10 +33944,6 @@ /obj/item/module/power_control, /obj/item/airlock_electronics, /obj/structure/table/steel, -/obj/machinery/camera/network/engineering{ - c_tag = "Engineering - Technical Storage"; - dir = 1 - }, /turf/simulated/floor/plating, /area/storage/tech) "bit" = ( @@ -34508,10 +34410,6 @@ pixel_x = 5; pixel_y = -4 }, -/obj/machinery/camera/network/medbay{ - c_tag = "Medical - Examination Office 1"; - dir = 4 - }, /obj/structure/table/standard, /obj/item/paper_scanner, /turf/simulated/floor/carpet/cyan, @@ -34652,9 +34550,6 @@ /area/crew_quarters/heads/cmo) "bjp" = ( /obj/structure/closet/secure_closet/CMO, -/obj/machinery/camera/network/medbay{ - c_tag = "Medical - CMO's Office" - }, /obj/item/clothing/suit/storage/toggle/labcoat/cmoalt2, /obj/item/clothing/gloves/latex/nitrile/tajara, /obj/item/clothing/gloves/latex/nitrile/unathi, @@ -37413,10 +37308,6 @@ "boK" = ( /obj/structure/table/standard, /obj/item/device/radio/intercom/north, -/obj/machinery/camera/network/medbay{ - c_tag = "Medical - Main Storage"; - dir = 8 - }, /obj/item/storage/firstaid/adv{ pixel_x = 5; pixel_y = 5 @@ -38889,10 +38780,6 @@ }, /obj/effect/floor_decal/industrial/outline/yellow, /obj/effect/floor_decal/industrial/warning, -/obj/machinery/camera/network/medbay{ - c_tag = "Medical - General Treatment 1"; - dir = 8 - }, /obj/structure/table/standard, /obj/item/device/mass_spectrometer, /obj/item/auto_cpr, @@ -43079,10 +42966,6 @@ /obj/structure/sign/nosmoking_1{ pixel_x = -32 }, -/obj/machinery/camera/network/research{ - c_tag = "Research - Research Director's Office"; - dir = 4 - }, /obj/machinery/light{ dir = 8; icon_state = "tube_empty" @@ -47325,9 +47208,6 @@ /turf/simulated/floor/tiled/white, /area/rnd/telesci) "bLk" = ( -/obj/machinery/camera/network/research{ - c_tag = "Research - Telescience" - }, /obj/effect/floor_decal/corner_wide/mauve{ dir = 5 }, @@ -48241,10 +48121,6 @@ /turf/simulated/floor/plating, /area/maintenance/research_port) "bNk" = ( -/obj/machinery/camera/network/research{ - c_tag = "Research - Telescience Test Chamber A"; - dir = 4 - }, /turf/simulated/floor/reinforced, /area/rnd/telesci) "bNl" = ( @@ -55744,9 +55620,6 @@ /obj/effect/floor_decal/corner/brown{ dir = 5 }, -/obj/machinery/camera/network/mining{ - c_tag = "Mining - Locker Room" - }, /obj/structure/extinguisher_cabinet/north, /turf/simulated/floor/tiled, /area/outpost/mining_main/eva) @@ -56266,10 +56139,6 @@ /obj/effect/floor_decal/corner/brown{ dir = 6 }, -/obj/machinery/camera/network/mining{ - c_tag = "Mining - Production Room"; - dir = 8 - }, /turf/simulated/floor/tiled, /area/outpost/mining_main/refinery) "cgi" = ( @@ -56854,10 +56723,6 @@ /obj/effect/floor_decal/corner/brown{ dir = 9 }, -/obj/machinery/camera/network/mining{ - c_tag = "Mining - Suit Storage"; - dir = 4 - }, /obj/machinery/mineral/rigpress, /turf/simulated/floor/tiled, /area/outpost/mining_main/eva) @@ -58975,11 +58840,6 @@ /turf/simulated/floor/plating, /area/maintenance/substation/supply) "eXU" = ( -/obj/machinery/camera/network/security{ - c_tag = "Security - Interrogation"; - dir = 4; - network = list("Brig","Interrogation") - }, /obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{ dir = 6 }, @@ -63401,10 +63261,6 @@ }, /obj/machinery/light, /obj/item/device/taperecorder, -/obj/machinery/camera/network/security{ - c_tag = "Security - Investigations Office"; - dir = 1 - }, /turf/simulated/floor/tiled/dark, /area/security/forensics_office) "nxq" = ( @@ -64227,10 +64083,6 @@ /turf/simulated/floor/plating, /area/crew_quarters/kitchen) "pdM" = ( -/obj/machinery/camera/network/research{ - c_tag = "Research - Research & Development"; - dir = 4 - }, /obj/structure/table/standard, /obj/item/stack/material/steel{ amount = 50 @@ -65602,10 +65454,6 @@ /obj/machinery/atmospherics/pipe/simple/hidden{ dir = 10 }, -/obj/machinery/camera/network/medbay{ - c_tag = "Medical - Cryogenics Control"; - dir = 8 - }, /turf/simulated/floor/plating, /area/medical/cryo) "rut" = ( diff --git a/maps/aurora/aurora-5_interstitial.dmm b/maps/aurora/aurora-5_interstitial.dmm index 6055c02c9b2..4e07360c84b 100644 --- a/maps/aurora/aurora-5_interstitial.dmm +++ b/maps/aurora/aurora-5_interstitial.dmm @@ -2527,10 +2527,6 @@ /obj/structure/sign/nosmoking_2{ pixel_x = -32 }, -/obj/machinery/camera/network/security{ - c_tag = "Security - Classroom"; - dir = 4 - }, /turf/simulated/floor/wood, /area/security/training_theoretical) "gq" = ( diff --git a/maps/event/generic_dock/generic_dock-1.dmm b/maps/event/generic_dock/generic_dock-1.dmm index 06c66e769c4..f8d712fd47a 100644 --- a/maps/event/generic_dock/generic_dock-1.dmm +++ b/maps/event/generic_dock/generic_dock-1.dmm @@ -339,10 +339,6 @@ /turf/template_noop, /area/template_noop) "aix" = ( -/obj/machinery/camera/network/crescent{ - c_tag = "Crescent Arrivals - Holding Cell"; - dir = 4 - }, /turf/unsimulated/floor{ icon_state = "dark_preview" }, @@ -1598,11 +1594,6 @@ /turf/unsimulated/floor, /area/centcom/spawning) "aNc" = ( -/obj/machinery/camera/network/crescent{ - c_tag = "Crescent Departures"; - dir = 1; - pixel_x = -10 - }, /turf/unsimulated/floor/plating, /area/centcom/spawning) "aNs" = ( @@ -4371,10 +4362,6 @@ }, /area/centcom/specops) "dXz" = ( -/obj/machinery/camera/network/crescent{ - c_tag = "Crescent Bar East"; - dir = 8 - }, /turf/unsimulated/floor{ icon_state = "wood" }, @@ -4496,10 +4483,6 @@ /obj/effect/landmark{ name = "tdome2" }, -/obj/machinery/camera/network/thunder{ - c_tag = "Thunderdome - Red Team"; - invisibility = 101 - }, /obj/effect/floor_decal/corner/grey/diagonal{ dir = 4 }, @@ -4766,10 +4749,6 @@ /turf/unsimulated/floor/plating, /area/shuttle/escape) "exm" = ( -/obj/machinery/camera/network/crescent{ - c_tag = "Crescent Arrivals North"; - dir = 8 - }, /obj/effect/floor_decal/corner/green{ dir = 6 }, @@ -5121,10 +5100,6 @@ /obj/effect/floor_decal/corner/red{ dir = 10 }, -/obj/machinery/camera/network/crescent{ - c_tag = "Crescent Arrivals North"; - dir = 8 - }, /obj/effect/landmark/force_spawnpoint{ job_tag = "Visitor" }, @@ -6255,10 +6230,6 @@ /turf/unsimulated/floor, /area/centcom/spawning) "goO" = ( -/obj/machinery/camera/network/thunder{ - c_tag = "Thunderdome Arena"; - invisibility = 101 - }, /obj/effect/decal/fake_object/light_source/invisible, /turf/simulated/floor/bluegrid, /area/tdome) @@ -12191,10 +12162,6 @@ /obj/effect/landmark{ name = "tdome1" }, -/obj/machinery/camera/network/thunder{ - c_tag = "Green Team"; - invisibility = 101 - }, /obj/effect/floor_decal/corner/grey/diagonal{ dir = 4 }, @@ -12286,10 +12253,6 @@ /area/centcom/control) "oaC" = ( /obj/structure/table/reinforced/wood, -/obj/machinery/camera/network/crescent{ - c_tag = "Crescent Bar Center"; - pixel_x = 20 - }, /obj/machinery/door/blast/odin{ dir = 4; icon_state = "shutter1"; diff --git a/maps/runtime/runtime-1.dmm b/maps/runtime/runtime-1.dmm index d87807ff64f..2fd228a360f 100644 --- a/maps/runtime/runtime-1.dmm +++ b/maps/runtime/runtime-1.dmm @@ -508,10 +508,6 @@ /obj/item/screwdriver, /obj/item/wirecutters, /obj/structure/table/standard, -/obj/machinery/camera/network/engineering{ - c_tag = "Engineering - Technical Storage"; - dir = 1 - }, /obj/machinery/firealarm/south, /turf/simulated/floor/plating, /area/engineering) diff --git a/maps/sccv_horizon/sccv_horizon-2_deck_2.dmm b/maps/sccv_horizon/sccv_horizon-2_deck_2.dmm index 9d976acb919..a8a0f8a1ae0 100644 --- a/maps/sccv_horizon/sccv_horizon-2_deck_2.dmm +++ b/maps/sccv_horizon/sccv_horizon-2_deck_2.dmm @@ -35127,7 +35127,7 @@ }, /obj/item/reagent_containers/weldpack, /obj/machinery/camera/network/supply{ - c_tag = "Operations - Machinist Workshop Starboard"; + c_tag = "Operations - Machinist Workshop Starboard 2"; dir = 1 }, /obj/item/stack/material/glass{ @@ -49826,7 +49826,7 @@ req_access = list(29) }, /obj/machinery/camera/network/supply{ - c_tag = "Operations - Machinist Workshop Starboard"; + c_tag = "Operations - Machinist Workshop Starboard 3"; dir = 1 }, /turf/simulated/floor/tiled, diff --git a/tools/dmm_scanner/scan_camera_ctags.py b/tools/dmm_scanner/scan_camera_ctags.py new file mode 100644 index 00000000000..bef3b304e15 --- /dev/null +++ b/tools/dmm_scanner/scan_camera_ctags.py @@ -0,0 +1,48 @@ +import os +import sys +import re + +def _self_test(): + + cameras_ctags = [] + conflicting_camera_ctags = [] + + for dirpath, dirnames, filenames in os.walk('.'): + if '.git' in dirnames: + dirnames.remove('.git') + continue + + for filename in filenames: + if filename.endswith('.dmm'): + fullpath = os.path.join(dirpath, filename) + + with open(fullpath, 'r', encoding="utf-8") as file: + lines = file.readlines() + + for line in lines: + match = re.match(r'^\t?c_tag = \"(.+)\"', line) + + if match: + # print(match.group(0)) + if match.group(1) not in cameras_ctags: + cameras_ctags.append(match.group(1)) + else: + if match.group(1) not in conflicting_camera_ctags: + conflicting_camera_ctags.append(match.group(1)) + + + if conflicting_camera_ctags: + raise ValueError(f'Duplicate c_tag found in {fullpath}: {conflicting_camera_ctags}') + + else: + + print(f"The following c_tags are defined in the various DMMs: {cameras_ctags}") + + +def _main(): + if len(sys.argv) == 1: + return _self_test() + + +if __name__ == '__main__': + _main()