mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-15 12:11:45 +00:00
* 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>
27 lines
1.1 KiB
Plaintext
27 lines
1.1 KiB
Plaintext
/**
|
|
* Validates that all spells have a correct
|
|
* invocation type and invocation setup.
|
|
*/
|
|
/datum/unit_test/spell_invocations
|
|
|
|
/datum/unit_test/spell_invocations/Run()
|
|
|
|
var/list/types_to_test = subtypesof(/datum/action/cooldown/spell)
|
|
|
|
for(var/datum/action/cooldown/spell/spell_type as anything in types_to_test)
|
|
var/spell_name = initial(spell_type.name)
|
|
var/invoke_type = initial(spell_type.invocation_type)
|
|
switch(invoke_type)
|
|
if(INVOCATION_EMOTE)
|
|
if(isnull(initial(spell_type.invocation_self_message)))
|
|
Fail("Spell: [spell_name] ([spell_type]) set emote invocation type but did not set a self message.")
|
|
if(isnull(initial(spell_type.invocation)))
|
|
Fail("Spell: [spell_name] ([spell_type]) set emote invocation type but did not set an invocation message.")
|
|
|
|
if(INVOCATION_SHOUT, INVOCATION_WHISPER)
|
|
if(isnull(initial(spell_type.invocation)))
|
|
Fail("Spell: [spell_name] ([spell_type]) set a speaking invocation type but did not set an invocation message.")
|
|
|
|
// INVOCATION_NONE:
|
|
// It doesn't matter what they have set for invocation text. So not it's skipped.
|