Files
Paradise/code/modules/unit_tests/map_templates.dm
AffectedArc07 e1647d0e36 Unit tests!
2021-07-01 22:47:06 +01:00

12 lines
532 B
Plaintext

/datum/unit_test/map_templates/Run()
var/list/datum/map_template/templates = subtypesof(/datum/map_template)
for(var/I in templates)
var/datum/map_template/MT = new I // The new is important here to ensure stuff gets set properly
if(MT.ci_exclude == MT.type)
continue
// Check if it even has a path and if so, does it exist
if(MT.mappath && !fexists(MT.mappath))
Fail("The map file for [MT.type] does not exist!")
if(MT.mappath && !findtext(MT.mappath, ".dmm"))
Fail("The map file for [MT.type] is not a map!")