From 0fe87e66d6a2cd0257c65bef1fe8cda80f2d07e6 Mon Sep 17 00:00:00 2001 From: MrMelbert <51863163+MrMelbert@users.noreply.github.com> Date: Thu, 13 Oct 2022 22:32:03 -0500 Subject: [PATCH] Fixes some incorrect `before_cast`s (personality commune, revenant) (#70339) before_cast returns a bitflag, shouldn't return a bool. Bools will break it, TRUE especially cause it's the same as CANCEL_CAST. See Fixes tesla blast #69394 Fixes #70302 I'll see if this can be unit tested as well --- code/modules/antagonists/revenant/revenant_abilities.dm | 2 +- code/modules/spells/spell_types/self/personality_commune.dm | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/code/modules/antagonists/revenant/revenant_abilities.dm b/code/modules/antagonists/revenant/revenant_abilities.dm index 8b6619f68c7..b848d6618ad 100644 --- a/code/modules/antagonists/revenant/revenant_abilities.dm +++ b/code/modules/antagonists/revenant/revenant_abilities.dm @@ -195,7 +195,7 @@ /datum/action/cooldown/spell/aoe/revenant/before_cast(mob/living/simple_animal/revenant/cast_on) . = ..() if(. & SPELL_CANCEL_CAST) - return FALSE + return if(locked) if(!cast_on.unlock(unlock_amount)) diff --git a/code/modules/spells/spell_types/self/personality_commune.dm b/code/modules/spells/spell_types/self/personality_commune.dm index 67e794c9668..aef16cab31a 100644 --- a/code/modules/spells/spell_types/self/personality_commune.dm +++ b/code/modules/spells/spell_types/self/personality_commune.dm @@ -36,8 +36,6 @@ reset_cooldown() return . | SPELL_CANCEL_CAST - return TRUE - // Pillaged and adapted from telepathy code /datum/action/cooldown/spell/personality_commune/cast(mob/living/cast_on) . = ..()