Chatmessage and gargoyle runtimes (#7863)

This commit is contained in:
Raeschen
2024-03-02 10:33:08 +01:00
committed by GitHub
parent be2695c2cd
commit c95227ffb5
2 changed files with 12 additions and 8 deletions

View File

@@ -51,6 +51,9 @@ var/list/runechat_image_cache = list()
/// If we are currently processing animation and cleanup at EOL
var/ending_life
/// deletion timer
var/timer_delete
/**
* Constructs a chat message overlay
*
@@ -72,11 +75,14 @@ var/list/runechat_image_cache = list()
generate_image(text, target, owner, extra_classes, lifespan)
/datum/chatmessage/Destroy()
if(owned_by)
if(timer_delete)
deltimer(timer_delete)
timer_delete = null
if(!QDELETED(owned_by))
UnregisterSignal(owned_by, COMSIG_PARENT_QDELETING)
LAZYREMOVEASSOC(owned_by.seen_messages, message_loc, src)
owned_by.images.Remove(message)
if(message_loc)
if(!QDELETED(message_loc))
UnregisterSignal(message_loc, COMSIG_PARENT_QDELETING)
owned_by = null
message_loc = null
@@ -219,8 +225,7 @@ var/list/runechat_image_cache = list()
return
ending_life = TRUE
animate(message, alpha = 0, time = fadetime, flags = ANIMATION_PARALLEL)
spawn(fadetime)
qdel(src)
timer_delete = QDEL_IN_STOPPABLE(src, fadetime)
/**
* Creates a message overlay at a defined location for a given speaker

View File

@@ -69,7 +69,7 @@
original_int = obj_integrity
name = "[identifier] of [H.name]"
desc = "A very lifelike [identifier] made of [material]."
stored_examine = H.examine()
stored_examine = H.examine(H)
description_fluff = H.get_description_fluff()
if (H.buckled)
@@ -140,10 +140,9 @@
if (!gargoyle)
return ..()
if (can_revert)
unpetrify(deleting = TRUE)
unpetrify(deleting = FALSE) //don't delete if we're already deleting!
else
visible_message("<span class='warning'>The [identifier] loses shape and crumbles into a pile of [material]!</span>")
QDEL_NULL(gargoyle)
. = ..()
/obj/structure/gargoyle/process()
@@ -151,7 +150,7 @@
qdel(src)
if (gargoyle.loc != src)
can_revert = TRUE //something's gone wrong, they escaped, lets not qdel them
unpetrify(FALSE)
unpetrify(deal_damage = FALSE, deleting = TRUE)
/obj/structure/gargoyle/examine_icon()
var/icon/examine_icon = ..()