Smes validity test (#19214)

* smes test

* oop

* fix

* talon plz
This commit is contained in:
Will
2026-02-22 02:17:35 -05:00
committed by GitHub
parent ee2bbde7b8
commit 874f7faf76
2 changed files with 23 additions and 4 deletions
+19
View File
@@ -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")