From 2d5a7e40b9cb139c0ca63447e0ed079ea3e0738b Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Fri, 6 Oct 2023 23:41:55 +0200 Subject: [PATCH] [MIRROR] Fixes an issue with COMSIG_MOB_ABILITY_STARTED for spells [MDB IGNORE] (#24137) * Fixes an issue with COMSIG_MOB_ABILITY_STARTED for spells (#78775) ## About The Pull Request The signal `COMSIG_MOB_ABILITY_STARTED` is used by both cooldown actions and spells, which are a subtype of cooldown actions. However, cooldown actions pass two values, `src` and the action's target. Spells only passed `src`, even though its the exact same signal. This caused issues with the ability telegraph component, as it has to interrupt the casting of spells and actions to add a delay, and most if not all spells won't work without the target being passed with the signal. Closes #78715. ## Why It's Good For The Game It caused bugs and is just bad design in general. ## Changelog :cl: fix: Ice whelps can now use spells given to them by admins, and people who have polymorphed into ice whelps can now polymorph back to normal. /:cl: * Fixes an issue with COMSIG_MOB_ABILITY_STARTED for spells --------- Co-authored-by: GPeckman <21979502+GPeckman@users.noreply.github.com> --- code/modules/spells/spell.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/spells/spell.dm b/code/modules/spells/spell.dm index f03cd4927f8..5bc39b389b3 100644 --- a/code/modules/spells/spell.dm +++ b/code/modules/spells/spell.dm @@ -140,7 +140,7 @@ // Where the cast chain starts /datum/action/cooldown/spell/PreActivate(atom/target) - if(SEND_SIGNAL(owner, COMSIG_MOB_ABILITY_STARTED, src) & COMPONENT_BLOCK_ABILITY_START) + if(SEND_SIGNAL(owner, COMSIG_MOB_ABILITY_STARTED, src, target) & COMPONENT_BLOCK_ABILITY_START) return FALSE if(target == owner) target = get_caster_from_target(target)