Don't sleep in ability.Activate() when breathing fire (#77673)

## About The Pull Request

The global proc `dragon_fire_line` sleeps, and was being called inside
`ability.Activate`
This made the CI fail on a different PR because the mob stopped existing
between activating the ability and triggering its cooldown, which should
not regularly be possible.

The ice whelp refactor author noticed this when using it in a loop but I
guess didn't think about the other implications 😅

## Why It's Good For The Game

Fixes a bug.

## Changelog

Not player facing
This commit is contained in:
Jacquerel
2023-08-19 18:57:50 +00:00
committed by GitHub
parent 713a27e507
commit 04d4e001f1
2 changed files with 4 additions and 2 deletions
@@ -12,7 +12,8 @@
/datum/action/cooldown/mob_cooldown/ice_breath/Activate(atom/target_atom)
var/turf/target_fire_turf = get_ranged_target_turf_direct(owner, target_atom, fire_range)
var/list/burn_turfs = get_line(owner, target_fire_turf) - get_turf(owner)
dragon_fire_line(owner, burn_turfs, frozen = TRUE)
// This proc sleeps
INVOKE_ASYNC(GLOBAL_PROC, GLOBAL_PROC_REF(dragon_fire_line), owner, /* burn_turfs = */ burn_turfs, /* frozen = */ TRUE)
StartCooldown()
return TRUE