[MIRROR] Capture crystal sleep()s cleaned up (#11257)

Co-authored-by: Will <7099514+Willburd@users.noreply.github.com>
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-07-26 22:19:50 -07:00
committed by GitHub
parent 36b991b878
commit fce2fd0ff1
3 changed files with 18 additions and 10 deletions

View File

@@ -476,8 +476,13 @@
var/image/coolanimation = image('icons/obj/capture_crystal_vr.dmi', null, "animation")
coolanimation.plane = PLANE_LIGHTING_ABOVE
thing.overlays += coolanimation
sleep(11)
addtimer(CALLBACK(src, PROC_REF(animate_action_finished),thing,coolanimation), 1.1 SECOND, TIMER_DELETE_ME)
/obj/item/capture_crystal/proc/animate_action_finished(atom/thing,var/image/coolanimation)
SHOULD_NOT_OVERRIDE(TRUE)
PROTECTED_PROC(TRUE)
thing.overlays -= coolanimation
qdel(coolanimation)
//IF the crystal somehow ends up in a tummy and digesting with a bound mob who doesn't want to be eaten, let's move them to the ground
/obj/item/capture_crystal/digest_act(var/atom/movable/item_storage = null)