afk-cryo-tweak (#17582)

This commit is contained in:
SteelSlayer
2022-04-07 01:12:55 +01:00
committed by GitHub
parent 9169838bba
commit 4c71a3803b
2 changed files with 24 additions and 6 deletions
+22 -5
View File
@@ -2169,19 +2169,36 @@
else //robot
log_admin("[key_name(usr)] despawned [M] in cryo.")
message_admins("[key_name_admin(usr)] despawned [M] in cryo.")
else if(cryo_ssd(M))
else
var/fast_despawn = FALSE
if(href_list["fast_despawn"])
if(alert(owner, "[M] is an area where players being AFK cryo'd should be despawned immediately. \
Do you wish to immediately de-spawn them, or just continue moving them to the cryopod?", "Cryo or De-Spawn", "De-Spawn", "Move to Cryopod") == "De-Spawn")
fast_despawn = TRUE
if(!cryo_ssd(M))
return
if(human)
var/mob/living/carbon/human/H = M
log_admin("[key_name(usr)] sent [H.job] [H] to cryo.")
message_admins("[key_name_admin(usr)] sent [H.job] [H] to cryo.")
var/msg = "[key_name(usr)] [fast_despawn ? "despawned" : "sent"] [H.job] [H] [fast_despawn ? "in" : "to"] cryo."
log_admin(msg)
message_admins(msg)
else
log_admin("[key_name(usr)] sent [M] to cryo.")
message_admins("[key_name_admin(usr)] sent [M] to cryo.")
var/msg = "[key_name(usr)] [fast_despawn ? "despawned" : "sent"] [M] [fast_despawn ? "in" : "to"] cryo."
log_admin(msg)
message_admins(msg)
if(fast_despawn)
var/obj/machinery/cryopod/P = M.loc // They're already in the cryopod because of `cryo_ssd(M)` above.
P.despawn_occupant()
return
if(href_list["cryoafk"]) // Warn them if they are send to storage and are AFK
to_chat(M, "<span class='danger'>The admins have moved you to cryo storage for being AFK. Please eject yourself (right click, eject) out of the cryostorage if you want to avoid being despawned.</span>")
SEND_SOUND(M, sound('sound/effects/adminhelp.ogg'))
if(M.client)
window_flash(M.client)
else if(href_list["FaxReplyTemplate"])
if(!check_rights(R_ADMIN))
return