Files
Paradise/code/tests/test_components.dm
warriorstar-orion bb60a027bf unit->game tests, /tg/ assertions and allocations (#27646)
* unit->game tests, /tg/ assertions and allocations

* whoopsies

* fix lint
2024-12-21 21:19:33 +00:00

13 lines
491 B
Plaintext

/datum/game_test/component_duping/Run()
var/list/bad_dms = list()
var/list/bad_dts = list()
for(var/t in typesof(/datum/component))
var/datum/component/comp = t
if(!isnum(initial(comp.dupe_mode)))
bad_dms += t
var/dupe_type = initial(comp.dupe_type)
if(dupe_type && !ispath(dupe_type))
bad_dts += t
if(length(bad_dms) || length(bad_dts))
TEST_FAIL("Components with invalid dupe modes: ([bad_dms.Join(",")]) ||| Components with invalid dupe types: ([bad_dts.Join(",")])")