mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 02:34:00 +00:00
Chatmessage and gargoyle runtimes (#7863)
This commit is contained in:
@@ -51,6 +51,9 @@ var/list/runechat_image_cache = list()
|
|||||||
/// If we are currently processing animation and cleanup at EOL
|
/// If we are currently processing animation and cleanup at EOL
|
||||||
var/ending_life
|
var/ending_life
|
||||||
|
|
||||||
|
/// deletion timer
|
||||||
|
var/timer_delete
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs a chat message overlay
|
* Constructs a chat message overlay
|
||||||
*
|
*
|
||||||
@@ -72,11 +75,14 @@ var/list/runechat_image_cache = list()
|
|||||||
generate_image(text, target, owner, extra_classes, lifespan)
|
generate_image(text, target, owner, extra_classes, lifespan)
|
||||||
|
|
||||||
/datum/chatmessage/Destroy()
|
/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)
|
UnregisterSignal(owned_by, COMSIG_PARENT_QDELETING)
|
||||||
LAZYREMOVEASSOC(owned_by.seen_messages, message_loc, src)
|
LAZYREMOVEASSOC(owned_by.seen_messages, message_loc, src)
|
||||||
owned_by.images.Remove(message)
|
owned_by.images.Remove(message)
|
||||||
if(message_loc)
|
if(!QDELETED(message_loc))
|
||||||
UnregisterSignal(message_loc, COMSIG_PARENT_QDELETING)
|
UnregisterSignal(message_loc, COMSIG_PARENT_QDELETING)
|
||||||
owned_by = null
|
owned_by = null
|
||||||
message_loc = null
|
message_loc = null
|
||||||
@@ -219,8 +225,7 @@ var/list/runechat_image_cache = list()
|
|||||||
return
|
return
|
||||||
ending_life = TRUE
|
ending_life = TRUE
|
||||||
animate(message, alpha = 0, time = fadetime, flags = ANIMATION_PARALLEL)
|
animate(message, alpha = 0, time = fadetime, flags = ANIMATION_PARALLEL)
|
||||||
spawn(fadetime)
|
timer_delete = QDEL_IN_STOPPABLE(src, fadetime)
|
||||||
qdel(src)
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a message overlay at a defined location for a given speaker
|
* Creates a message overlay at a defined location for a given speaker
|
||||||
|
|||||||
@@ -69,7 +69,7 @@
|
|||||||
original_int = obj_integrity
|
original_int = obj_integrity
|
||||||
name = "[identifier] of [H.name]"
|
name = "[identifier] of [H.name]"
|
||||||
desc = "A very lifelike [identifier] made of [material]."
|
desc = "A very lifelike [identifier] made of [material]."
|
||||||
stored_examine = H.examine()
|
stored_examine = H.examine(H)
|
||||||
description_fluff = H.get_description_fluff()
|
description_fluff = H.get_description_fluff()
|
||||||
|
|
||||||
if (H.buckled)
|
if (H.buckled)
|
||||||
@@ -140,10 +140,9 @@
|
|||||||
if (!gargoyle)
|
if (!gargoyle)
|
||||||
return ..()
|
return ..()
|
||||||
if (can_revert)
|
if (can_revert)
|
||||||
unpetrify(deleting = TRUE)
|
unpetrify(deleting = FALSE) //don't delete if we're already deleting!
|
||||||
else
|
else
|
||||||
visible_message("<span class='warning'>The [identifier] loses shape and crumbles into a pile of [material]!</span>")
|
visible_message("<span class='warning'>The [identifier] loses shape and crumbles into a pile of [material]!</span>")
|
||||||
QDEL_NULL(gargoyle)
|
|
||||||
. = ..()
|
. = ..()
|
||||||
|
|
||||||
/obj/structure/gargoyle/process()
|
/obj/structure/gargoyle/process()
|
||||||
@@ -151,7 +150,7 @@
|
|||||||
qdel(src)
|
qdel(src)
|
||||||
if (gargoyle.loc != src)
|
if (gargoyle.loc != src)
|
||||||
can_revert = TRUE //something's gone wrong, they escaped, lets not qdel them
|
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()
|
/obj/structure/gargoyle/examine_icon()
|
||||||
var/icon/examine_icon = ..()
|
var/icon/examine_icon = ..()
|
||||||
|
|||||||
Reference in New Issue
Block a user