Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions code/game/machinery/cryopod.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -213,13 +214,15 @@ GLOBAL_LIST_INIT(typecache_cryoitems, typecacheof(list(
var/mob/living/mob_occupant = occupant
if(mob_occupant && mob_occupant.stat != DEAD)
to_chat(occupant, "<span class='boldnotice'>You feel cool air surround you. You go numb as your senses turn inward.</span>")
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
addtimer(VARSET_CALLBACK(src, ready, TRUE), (time_till_despawn * 0.1)) // 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") == "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
addtimer(VARSET_CALLBACK(src, ready, TRUE), (time_till_despawn * 0.1))
else
addtimer(VARSET_CALLBACK(src, ready, TRUE), time_till_despawn)

Expand Down Expand Up @@ -406,4 +409,4 @@ GLOBAL_LIST_INIT(typecache_cryoitems, typecacheof(list(
name = "[name] ([occupant.name])"
log_admin("<span class='notice'>[key_name(target)] entered a stasis pod.</span>")
message_admins("[key_name_admin(target)] entered a stasis pod. (<A HREF='?_src_=holder;[HrefToken()];adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)")
add_fingerprint(target)
add_fingerprint(target)