[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)

View File

@@ -113,8 +113,7 @@
var/image/coolanimation = image('icons/obj/glamour.dmi', null, "animation")
coolanimation.plane = PLANE_LIGHTING_ABOVE
thing.overlays += coolanimation
sleep(14)
thing.overlays -= coolanimation
addtimer(CALLBACK(src, PROC_REF(animate_action_finished),thing,coolanimation), 1.4 SECOND, TIMER_DELETE_ME)
//Face of Glamour (creates a clone of a target)

View File

@@ -558,13 +558,17 @@
if((state == 1) && owner && (owner.stat == DEAD))
update_state(2)
visible_message(span_warning("The [name] begins flashing red."))
sleep(30)
visible_message(span_warning("The [name] shatters into dust!"))
if(owner_c)
to_chat(owner_c, span_notice("A signal is sent notifying of your demise by \the [name]."))
update_state(3)
name = "broken [initial(name)]"
desc = "This seems like a necklace, but the actual pendant is missing."
addtimer(CALLBACK(src, PROC_REF(shatter_into_dust)), 3 SECONDS, TIMER_DELETE_ME)
/obj/item/clothing/accessory/collar/khcrystal/proc/shatter_into_dust()
SHOULD_NOT_OVERRIDE(TRUE)
PRIVATE_PROC(TRUE)
visible_message(span_warning("The [name] shatters into dust!"))
if(owner_c)
to_chat(owner_c, span_notice("A signal is sent notifying of your demise by \the [name].")) // CHOMPEdit
update_state(3)
name = "broken [initial(name)]"
desc = "This seems like a necklace, but the actual pendant is missing."
/obj/item/clothing/accessory/collar/khcrystal/proc/update_state(var/tostate)
state = tostate