From d107f06ee3ec827ce75e064dcbe2a41896f9b6c9 Mon Sep 17 00:00:00 2001 From: Qwertytoforty <52090703+Qwertytoforty@users.noreply.github.com> Date: Mon, 27 May 2024 11:25:27 -0400 Subject: [PATCH] [s] maint drones no longer can endlessly ghost and respawn (#25651) * [s] maint drones no longer can endlessly ghost and respawn * comment improvement * she trues on my false till I 0 --- code/modules/mob/dead/observer/observer_base.dm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/dead/observer/observer_base.dm b/code/modules/mob/dead/observer/observer_base.dm index 1a96a63de3e..b4063747662 100644 --- a/code/modules/mob/dead/observer/observer_base.dm +++ b/code/modules/mob/dead/observer/observer_base.dm @@ -238,7 +238,11 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp return if(HAS_TRAIT(M, TRAIT_RESPAWNABLE)) - ghostize(1) + if(isdrone(M))//We do not punish maint drones for leaving early, *but* we don't want them ghosting, finding damage, respawning / rentering over and over. + var/mob/dead/observer/ghost = ghostize(FALSE) // FALSE parameter stops them re-entering their body + ghost.timeofdeath = world.time // Because the living mob won't have a time of death and we want the respawn timer to work properly. + return + ghostize(TRUE) return if(P) if(TOO_EARLY_TO_GHOST) @@ -267,11 +271,11 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp if(warningmsg) // Not respawnable - var/mob/dead/observer/ghost = ghostize(0) // 0 parameter stops them re-entering their body + var/mob/dead/observer/ghost = ghostize(FALSE) // FALSE parameter stops them re-entering their body ghost.timeofdeath = world.time // Because the living mob won't have a time of death and we want the respawn timer to work properly. else // Respawnable - ghostize(1) + ghostize(TRUE) // If mob in cryopod, despawn mob if(P)