Files
Bubberstation/code/modules/unit_tests/modsuit.dm
SkyratBot 58f82b5161 [MIRROR] [Ready] MODsuits [MDB IGNORE] (#10244)
* [Ready] MODsuits

* we dont need to add these people as codeowners, goodness gracious

* have to remove this because upstream

* part 1 of these fixes

* EEEE

* Update peacekeeper_clothing.dm

* E

* E

* Auto stash before merge of "upstream-merge-59109" and "origin/upstream-merge-59109"

* E

* Update expeditionary_trooper.dm

* more removal

* nice

* modsuti modstui modusuti

* fixes

* E

* ITS MODsuit not HARDSUIT

* more hardsuit references

* MODSUIT NOT HARSUITEDSA

* Maps

* More ,map

* oop

* e

* oo aa

* 0

* ting tang

* Update modsuit_tailsprites.dm

* hi fikou

* bs tech update

Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com>
Co-authored-by: jjpark-kb <55967837+jjpark-kb@users.noreply.github.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
2021-12-25 13:32:49 +00:00

27 lines
1.5 KiB
Plaintext

/// Checks all pre-equipped MODsuit paths to see if they have something set wrong.
/datum/unit_test/modsuit_checks
/datum/unit_test/modsuit_checks/Run()
var/list/paths = typesof(/obj/item/mod/control/pre_equipped)
for(var/modpath in paths)
var/obj/item/mod/control/mod = new modpath()
TEST_ASSERT(mod.theme, "[modpath] spawned without a theme.")
TEST_ASSERT(mod.helmet, "[modpath] spawned without a helmet.")
TEST_ASSERT(mod.chestplate, "[modpath] spawned without a chestplate.")
TEST_ASSERT(mod.gauntlets, "[modpath] spawned without gauntlets.")
TEST_ASSERT(mod.boots, "[modpath] spawned without boots.")
var/list/modules = list()
var/complexity_max = mod.complexity_max
var/complexity = 0
for(var/obj/item/mod/module/module as anything in mod.initial_modules)
module = new module()
complexity += module.complexity
TEST_ASSERT(complexity <= complexity_max, "[modpath] starting modules reach above max complexity.")
TEST_ASSERT(!is_type_in_list(module, mod.theme.module_blacklist), "[modpath] starting modules are in [mod.theme.type] blacklist.")
for(var/obj/item/mod/module/module_to_check as anything in modules)
TEST_ASSERT(!is_type_in_list(module, module_to_check.incompatible_modules), "[modpath] initial module [module.type] is incompatible with initial module [module_to_check.type]")
TEST_ASSERT(!is_type_in_list(module_to_check, module.incompatible_modules), "[modpath] initial module [module.type] is incompatible with initial module [module_to_check.type]")
modules += module