From 874f7faf76385f6934d6a31f47fb48d72e0daa96 Mon Sep 17 00:00:00 2001 From: Will <7099514+Willburd@users.noreply.github.com> Date: Sun, 22 Feb 2026 02:17:35 -0500 Subject: [PATCH] Smes validity test (#19214) * smes test * oop * fix * talon plz --- code/modules/unit_tests/map_tests.dm | 19 +++++++++++++++++++ maps/offmap_vr/talon/talon_v2.dmm | 8 ++++---- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/code/modules/unit_tests/map_tests.dm b/code/modules/unit_tests/map_tests.dm index b4ca7ef2514..77b93144889 100644 --- a/code/modules/unit_tests/map_tests.dm +++ b/code/modules/unit_tests/map_tests.dm @@ -187,3 +187,22 @@ TEST_ASSERT(L.target_down, "[T.x].[T.y].[T.z]: Map - Ladder allows downward movement, but had no ladder beneath it") TEST_ASSERT(!T.density, "[L.x].[L.y].[L.z]: Map - Ladder is inside a wall") + +/// Test the smes on the map +/datum/unit_test/smes_validity + +/datum/unit_test/smes_validity/Run() + var/failed = FALSE + var/list/used_tags = list() + + for(var/obj/machinery/power/smes/buildable/unit in world) + if(unit.RCon_tag == initial(unit.RCon_tag)) + continue + if(unit.RCon_tag in used_tags) + TEST_NOTICE(src, "[unit.x].[unit.y].[unit.z]: Map - Smes has an already used RCon_tag: \"[unit.RCon_tag]\"") + failed = TRUE + continue + used_tags += unit.RCon_tag + + if(failed) + TEST_FAIL("Map has smes with duplicated RCon_tag") diff --git a/maps/offmap_vr/talon/talon_v2.dmm b/maps/offmap_vr/talon/talon_v2.dmm index fe1e6bb980b..356c8618177 100644 --- a/maps/offmap_vr/talon/talon_v2.dmm +++ b/maps/offmap_vr/talon/talon_v2.dmm @@ -1920,7 +1920,7 @@ dir = 1 }, /obj/machinery/power/smes/buildable/offmap_spawn{ - RCon_tag = "Talon Port SMES" + RCon_tag = "Talon SMES Primary" }, /obj/structure/cable/green{ icon_state = "0-4" @@ -3920,7 +3920,7 @@ /area/talon_v2/crew_quarters/sec_room) "mT" = ( /obj/machinery/power/smes/buildable/offmap_spawn{ - RCon_tag = "Talon Port SMES" + RCon_tag = "Talon Boat SMES" }, /obj/structure/cable/yellow, /turf/simulated/floor/tiled/techfloor, @@ -9511,7 +9511,7 @@ /area/talon_v2/crew_quarters/sec_room) "GP" = ( /obj/machinery/power/smes/buildable/offmap_spawn{ - RCon_tag = "Talon Port SMES" + RCon_tag = "Talon SMES Secondary" }, /obj/structure/cable/green{ icon_state = "0-4" @@ -12329,7 +12329,7 @@ pixel_y = -32 }, /obj/machinery/power/smes/buildable/offmap_spawn{ - RCon_tag = "Talon Port SMES" + RCon_tag = "Talon SMES Tertiary" }, /obj/structure/cable/green{ icon_state = "0-4"