Files
Bubberstation/code/modules/unit_tests/modsuit.dm
SkyratBot 147f3a296c [MIRROR] some modsuits now have some modules pinned by default [MDB IGNORE] (#18384)
* some modsuits now have some modules pinned by default (#72258)

## About The Pull Request
cleans up some modsuit code i dont like about their modules
removes mod theme blacklists, they are unused and weve not needed them
at all so far
adds support for premade suits to have modules they pin by default
the default pins currently are:

advanced suit: jetpack
loader suit: clamp, magnet, hydraulic arms
mining suit: sphere transformation
safeguard suit: jetpack
magnate suit: advanced jetpack
traitor suit: armor booster, jetpack
elite traitor suit: armor booster, advanced jetpack
nukie suit: armor booster, advanced jetpack
elite nukie suit: armor booster, advanced jetpack
spetsnaz pyro suit: armor booster, advanced jetpack, flamethrower
prototype suit: tether, kinesis
apocryphal suit: jetpack
chrono suit: timestopper, rewinder, timeline jumper, kinesis plus,
timeline eradication
ninja suit: advanced stealth, star dispenser, emp pulse, weapon recall,
adrenaline boost, energy net

## Why It's Good For The Game
quickens some stuff up

## Changelog
🆑
qol: some modsuits now have some modules pinned by default
/🆑

* some modsuits now have some modules pinned by default

* SR modsuits

* word

Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com>
Co-authored-by: John Doe <gamingskeleton3@gmail.com>
2023-01-02 08:15:57 -08:00

26 lines
1.4 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/pre_equipped/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.applied_modules + mod.theme.inbuilt_modules)
module = new module()
complexity += module.complexity
TEST_ASSERT(complexity <= complexity_max, "[modpath] starting modules reach above max complexity.")
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