Files
Bubberstation/code/modules/unit_tests/spell_shapeshift.dm
SkyratBot c68fea7cba [MIRROR] Completely removes proc_holders from existence. Refactors all wizard, xeno, spider, and genetics powers to be actions. Also refactors and sorts ton of accompanying code. [MDB IGNORE] (#14666)
* Completely removes `proc_holders` from existence. Refactors all wizard, xeno, spider, and genetics powers to be actions. Also refactors and sorts ton of accompanying code.

* our changes

* yes

* 0

* Update blackmesa.dmm

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
2022-07-01 20:33:30 +01:00

21 lines
735 B
Plaintext

/**
* Validates that all shapeshift type spells
* have a valid possible_shapes setup.
*/
/datum/unit_test/shapeshift_spell_validity
/datum/unit_test/shapeshift_spell_validity/Run()
var/list/types_to_test = subtypesof(/datum/action/cooldown/spell/shapeshift)
for(var/spell_type in types_to_test)
var/datum/action/cooldown/spell/shapeshift/shift = new spell_type()
if(!LAZYLEN(shift.possible_shapes))
Fail("Shapeshift spell: [shift] ([spell_type]) did not have any possible shapeshift options.")
for(var/shift_type in shift.possible_shapes)
if(!ispath(shift_type, /mob/living))
Fail("Shapeshift spell: [shift] had an invalid / non-living shift type ([shift_type]) in their possible shapes list.")
qdel(shift)