From fdfb5aeb6e3233cdbec866ce70cc99db192b9159 Mon Sep 17 00:00:00 2001 From: alexkar598 <25136265+alexkar598@users.noreply.github.com> Date: Fri, 28 May 2021 13:04:26 -0400 Subject: [PATCH 1/6] Update cryopod.dm --- code/game/machinery/cryopod.dm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index 00d1f699ad02..4b7787edae51 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -213,9 +213,6 @@ GLOBAL_LIST_INIT(typecache_cryoitems, typecacheof(list( var/mob/living/mob_occupant = occupant if(mob_occupant && mob_occupant.stat != DEAD) to_chat(occupant, "You feel cool air surround you. You go numb as your senses turn inward.") - var/offer = alert(mob_occupant, "Do you want to offer yourself to ghosts?", "Ghost Offer", "Yes", "No") - if(offer == "Yes" && offer_control(occupant)) - return if(!occupant) //Check they still exist return if(mob_occupant.client)//if they're logged in @@ -223,6 +220,11 @@ GLOBAL_LIST_INIT(typecache_cryoitems, typecacheof(list( else addtimer(VARSET_CALLBACK(src, ready, TRUE), time_till_despawn) + if(mob_occupant.client) + var/offer = alert(mob_occupant, "Do you want to offer yourself to ghosts?", "Ghost Offer", "Yes", "No") + if(offer == "Yes" && offer_control(occupant)) + return + /obj/machinery/cryopod/open_machine() ..() icon_state = "cryopod-open" @@ -406,4 +408,4 @@ GLOBAL_LIST_INIT(typecache_cryoitems, typecacheof(list( name = "[name] ([occupant.name])" log_admin("[key_name(target)] entered a stasis pod.") message_admins("[key_name_admin(target)] entered a stasis pod. (JMP)") - add_fingerprint(target) \ No newline at end of file + add_fingerprint(target) From b47900073bbda13f1914ae9c617012613e5b0bf1 Mon Sep 17 00:00:00 2001 From: alexkar598 <25136265+alexkar598@users.noreply.github.com> Date: Fri, 28 May 2021 13:07:58 -0400 Subject: [PATCH 2/6] Update cryopod.dm --- code/game/machinery/cryopod.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index 4b7787edae51..113d3f10293c 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -170,7 +170,7 @@ GLOBAL_LIST_INIT(typecache_cryoitems, typecacheof(list( var/on_store_name = "Cryogenic Oversight" // 5 minutes-ish safe period before being despawned. - var/time_till_despawn = 5 MINUTES // This is reduced to 30 seconds if a player manually enters cryo + var/time_till_despawn = 5 MINUTES // This is reduced to 60 seconds if a player manually enters cryo var/obj/machinery/computer/cryopod/control_computer var/cooldown = FALSE @@ -216,7 +216,7 @@ GLOBAL_LIST_INIT(typecache_cryoitems, typecacheof(list( if(!occupant) //Check they still exist return if(mob_occupant.client)//if they're logged in - addtimer(VARSET_CALLBACK(src, ready, TRUE), (time_till_despawn * 0.1)) // This gives them 30 seconds + addtimer(VARSET_CALLBACK(src, ready, TRUE), (time_till_despawn * 0.2)) // This gives them 60 seconds else addtimer(VARSET_CALLBACK(src, ready, TRUE), time_till_despawn) From 3a3381400a76d720257d088495be7b7b10dc89c8 Mon Sep 17 00:00:00 2001 From: alexkar598 <25136265+alexkar598@users.noreply.github.com> Date: Fri, 28 May 2021 13:13:55 -0400 Subject: [PATCH 3/6] Reverts back the timer change and instead cancel the timer if someone says yes --- code/game/machinery/cryopod.dm | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index 113d3f10293c..3e4c6757846c 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -170,7 +170,7 @@ GLOBAL_LIST_INIT(typecache_cryoitems, typecacheof(list( var/on_store_name = "Cryogenic Oversight" // 5 minutes-ish safe period before being despawned. - var/time_till_despawn = 5 MINUTES // This is reduced to 60 seconds if a player manually enters cryo + var/time_till_despawn = 5 MINUTES // This is reduced to 30 seconds if a player manually enters cryo var/obj/machinery/computer/cryopod/control_computer var/cooldown = FALSE @@ -216,15 +216,13 @@ GLOBAL_LIST_INIT(typecache_cryoitems, typecacheof(list( if(!occupant) //Check they still exist return if(mob_occupant.client)//if they're logged in - addtimer(VARSET_CALLBACK(src, ready, TRUE), (time_till_despawn * 0.2)) // This gives them 60 seconds + var/offertimer = addtimer(VARSET_CALLBACK(src, ready, TRUE), (time_till_despawn * 0.1), TIMER_STOPPABLE) // This gives them 30 seconds + if(alert(mob_occupant, "Do you want to offer yourself to ghosts?", "Ghost Offer", "Yes", "No")) + deltimer(offertimer) + offer_control(occupant) else addtimer(VARSET_CALLBACK(src, ready, TRUE), time_till_despawn) - if(mob_occupant.client) - var/offer = alert(mob_occupant, "Do you want to offer yourself to ghosts?", "Ghost Offer", "Yes", "No") - if(offer == "Yes" && offer_control(occupant)) - return - /obj/machinery/cryopod/open_machine() ..() icon_state = "cryopod-open" From ac0402b6ac2cfcc468e477457ebda98e5eccf866 Mon Sep 17 00:00:00 2001 From: alexkar598 <25136265+alexkar598@users.noreply.github.com> Date: Fri, 28 May 2021 13:16:12 -0400 Subject: [PATCH 4/6] Restarts the timer if offer to ghost fails --- code/game/machinery/cryopod.dm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index 3e4c6757846c..79fdb6f76f51 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -218,8 +218,10 @@ GLOBAL_LIST_INIT(typecache_cryoitems, typecacheof(list( if(mob_occupant.client)//if they're logged in var/offertimer = addtimer(VARSET_CALLBACK(src, ready, TRUE), (time_till_despawn * 0.1), TIMER_STOPPABLE) // This gives them 30 seconds if(alert(mob_occupant, "Do you want to offer yourself to ghosts?", "Ghost Offer", "Yes", "No")) - deltimer(offertimer) - offer_control(occupant) + deltimer(offertimer) //Player wants to offer, cancel the timer + if(!offer_control(occupant)) + //Player is a jackass that noone wants the body of, restart the timer + addtimer(VARSET_CALLBACK(src, ready, TRUE), (time_till_despawn * 0.1)) else addtimer(VARSET_CALLBACK(src, ready, TRUE), time_till_despawn) From 38a86a9f166f3023760aac229ce59593688acc93 Mon Sep 17 00:00:00 2001 From: alexkar598 <25136265+alexkar598@users.noreply.github.com> Date: Sun, 6 Jun 2021 15:35:12 -0400 Subject: [PATCH 5/6] Update cryopod.dm --- code/game/machinery/cryopod.dm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index 79fdb6f76f51..19254cf5af26 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -170,7 +170,8 @@ GLOBAL_LIST_INIT(typecache_cryoitems, typecacheof(list( var/on_store_name = "Cryogenic Oversight" // 5 minutes-ish safe period before being despawned. - var/time_till_despawn = 5 MINUTES // This is reduced to 30 seconds if a player manually enters cryo + var/time_till_despawn = 15 MINUTES // Time if a player gets forced into cryo + var/time_till_despawn_online = 30 SECONDS // Time if a player manually enters cryo var/obj/machinery/computer/cryopod/control_computer var/cooldown = FALSE @@ -216,7 +217,7 @@ GLOBAL_LIST_INIT(typecache_cryoitems, typecacheof(list( if(!occupant) //Check they still exist return if(mob_occupant.client)//if they're logged in - var/offertimer = addtimer(VARSET_CALLBACK(src, ready, TRUE), (time_till_despawn * 0.1), TIMER_STOPPABLE) // This gives them 30 seconds + var/offertimer = addtimer(VARSET_CALLBACK(src, ready, TRUE), time_till_despawn_online, TIMER_STOPPABLE) if(alert(mob_occupant, "Do you want to offer yourself to ghosts?", "Ghost Offer", "Yes", "No")) deltimer(offertimer) //Player wants to offer, cancel the timer if(!offer_control(occupant)) From 46f3d2d2f6b092e62ca82ed3d88b487ec2309534 Mon Sep 17 00:00:00 2001 From: alexkar598 <25136265+alexkar598@users.noreply.github.com> Date: Wed, 9 Jun 2021 22:12:07 -0400 Subject: [PATCH 6/6] Bugfix --- code/game/machinery/cryopod.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index 19254cf5af26..5c4c524c2194 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -218,7 +218,7 @@ GLOBAL_LIST_INIT(typecache_cryoitems, typecacheof(list( return if(mob_occupant.client)//if they're logged in var/offertimer = addtimer(VARSET_CALLBACK(src, ready, TRUE), time_till_despawn_online, TIMER_STOPPABLE) - if(alert(mob_occupant, "Do you want to offer yourself to ghosts?", "Ghost Offer", "Yes", "No")) + if(alert(mob_occupant, "Do you want to offer yourself to ghosts?", "Ghost Offer", "Yes", "No") == "Yes") deltimer(offertimer) //Player wants to offer, cancel the timer if(!offer_control(occupant)) //Player is a jackass that noone wants the body of, restart the timer