From 4db3adf5df81c64033364e2dc10253a61ba1675b Mon Sep 17 00:00:00 2001 From: SabreML <57483089+SabreML@users.noreply.github.com> Date: Wed, 3 Jan 2024 21:02:32 +0000 Subject: [PATCH 1/3] The fix + the testing verb I used --- code/modules/mob/dead/observer/observer.dm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 529d13636b2d..723c8c978132 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -1235,8 +1235,17 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp . += "" if(timeofdeath) - . += "Time Since Death: [duration2text_sec(world.time - timeofdeath)]" + var/time_since_death = debug_var + var/format = (time_since_death >= 1 HOURS ? "hh:mm:ss" : "mm:ss") + . += "Time Since Death: [gameTimestamp(format, time_since_death)]" + +/mob/dead/observer/var/debug_var +/mob/dead/observer/verb/debug_thing() + set category = "Ghost" + set name = "debug thing" + + debug_var += 10 MINUTES /proc/message_ghosts(message) for(var/mob/dead/observer/O as anything in GLOB.observer_list) From 2f12e5ae76b1b9ef7a32edb0030defa3e054b425 Mon Sep 17 00:00:00 2001 From: SabreML <57483089+SabreML@users.noreply.github.com> Date: Wed, 3 Jan 2024 21:04:39 +0000 Subject: [PATCH 2/3] debug verb removal --- code/modules/mob/dead/observer/observer.dm | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 723c8c978132..e9cc043cf6b3 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -1235,17 +1235,11 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp . += "" if(timeofdeath) - var/time_since_death = debug_var + var/time_since_death = world.time - timeofdeath var/format = (time_since_death >= 1 HOURS ? "hh:mm:ss" : "mm:ss") . += "Time Since Death: [gameTimestamp(format, time_since_death)]" -/mob/dead/observer/var/debug_var -/mob/dead/observer/verb/debug_thing() - set category = "Ghost" - set name = "debug thing" - - debug_var += 10 MINUTES /proc/message_ghosts(message) for(var/mob/dead/observer/O as anything in GLOB.observer_list) From a6bd01698488c7e8bba1e633d3b1b728edd9b9b9 Mon Sep 17 00:00:00 2001 From: SabreML <57483089+SabreML@users.noreply.github.com> Date: Wed, 3 Jan 2024 22:01:51 +0000 Subject: [PATCH 3/3] The better version thank you drulikar --- code/modules/mob/dead/observer/observer.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index e9cc043cf6b3..3108a09e62b5 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -1238,7 +1238,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp var/time_since_death = world.time - timeofdeath var/format = (time_since_death >= 1 HOURS ? "hh:mm:ss" : "mm:ss") - . += "Time Since Death: [gameTimestamp(format, time_since_death)]" + . += "Time Since Death: [time2text(time_since_death, format)]" /proc/message_ghosts(message)