From 5b6fe2a31b76415af2ac615c3aec3d8dc8d076b6 Mon Sep 17 00:00:00 2001 From: Geeves Date: Sun, 8 Dec 2019 13:03:33 +0200 Subject: [PATCH] Cryo time_till_despawn adjustment (#7603) --- code/game/machinery/cryopod.dm | 27 ++++++++++++++------------ html/changelogs/geeves - cryoGhost.yml | 7 +++++++ 2 files changed, 22 insertions(+), 12 deletions(-) create mode 100644 html/changelogs/geeves - cryoGhost.yml diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index 82171003ff6..1295b1f7971 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -168,10 +168,11 @@ var/allow_occupant_types = list(/mob/living/carbon/human) var/disallow_occupant_types = list() - var/mob/occupant = null // Person waiting to be despawned. - var/time_till_despawn = 9000 // 15 minutes-ish safe period before being despawned. - var/time_entered = 0 // Used to keep track of the safe period. - var/obj/item/device/radio/intercom/announce // + var/mob/occupant = null // Person waiting to be despawned. + var/time_till_despawn = 1200 // Two minute safe period before being despawned. + var/time_till_force_cryo = 3000 // Five minutes safe period until they're despawned even if active. + var/time_entered = 0 // Used to keep track of the safe period. + var/obj/item/device/radio/intercom/announce var/obj/machinery/computer/cryopod/control_computer var/last_no_computer_message = 0 @@ -254,15 +255,17 @@ //Lifted from Unity stasis.dm and refactored. ~Zuhayr /obj/machinery/cryopod/machinery_process() if(occupant) - //Allow a ten minute gap between entering the pod and actually despawning. + //Allow a two minute gap between entering the pod and actually despawning. if((world.time - time_entered < time_till_despawn) && occupant.ckey) return + if(!control_computer) + if(!find_control_computer(urgent=1)) + return - if(!occupant.client && occupant.stat<2) //Occupant is living and has no client. - if(!control_computer) - if(!find_control_computer(urgent=1)) - return + if(!occupant.client && occupant.stat != DEAD) //Occupant is living and has no client. + despawn_occupant() + else if(world.time - time_entered > time_till_force_cryo) despawn_occupant() // This function can not be undone; do not call this unless you are sure @@ -375,7 +378,7 @@ icon_state = occupied_icon_state to_chat(M, "[on_enter_occupant_message]") - to_chat(M, "If you ghost, log out or close your client now, your character will shortly be permanently removed from the round.") + to_chat(M, span("danger", "Press Ghost in the OOC tab to cryo, your character will shortly be removed from the round and the slot you occupy will be freed.")) set_occupant(M) time_entered = world.time @@ -437,7 +440,7 @@ icon_state = occupied_icon_state to_chat(L, "You feel cool air surround you. You go numb as your senses turn inward.") - to_chat(L, "If you ghost, log out or close your client now, your character will shortly be permanently removed from the round.") + to_chat(L, span("danger", "Press Ghost in the OOC tab to cryo, your character will shortly be removed from the round and the slot you occupy will be freed.")) occupant = L time_entered = world.time @@ -513,7 +516,7 @@ icon_state = occupied_icon_state to_chat(usr, "[on_enter_occupant_message]") - to_chat(usr, "If you ghost, log out or close your client now, your character will shortly be permanently removed from the round.") + to_chat(usr, span("danger", "Press Ghost in the OOC tab to cryo, your character will shortly be removed from the round and the slot you occupy will be freed.")) time_entered = world.time diff --git a/html/changelogs/geeves - cryoGhost.yml b/html/changelogs/geeves - cryoGhost.yml new file mode 100644 index 00000000000..e720eb948ff --- /dev/null +++ b/html/changelogs/geeves - cryoGhost.yml @@ -0,0 +1,7 @@ +author: Geeves + +delete-after: True + +changes: + - tweak: "The safety timeperiod between entering cryo and being cryo'd has been changed from 10 minutes to 2 minutes, due to people not ghosting." + - rscadd: "If you are in cryo for 5 minutes, you will be despawned even if you're still logged on."