diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index 1eaed483f8e..274e238c182 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -716,3 +716,18 @@ qdel(R.module) return ..() + +/proc/cryo_ssd(var/mob/living/carbon/person_to_cryo) + if(istype(person_to_cryo.loc, /obj/machinery/cryopod)) + return 0 + var/list/free_cryopods = list() + for(var/obj/machinery/cryopod/P in machines) + if(!P.occupant && istype(get_area(P), /area/crew_quarters/sleep)) + free_cryopods += P + var/obj/machinery/cryopod/target_cryopod = null + if(free_cryopods.len) + target_cryopod = safepick(free_cryopods) + if(target_cryopod.check_occupant_allowed(person_to_cryo)) + target_cryopod.take_occupant(person_to_cryo, 1) + return 1 + return 0 \ No newline at end of file diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index d7de6dd6844..ed8d8d1d7a9 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -105,6 +105,9 @@ var/global/nologevent = 0 Bless | Smite "} + if(isLivingSSD(M)) + if(!istype(M.loc, /obj/machinery/cryopod)) + body += {" | Cryo "} if(M.client) if(!istype(M, /mob/new_player)) diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 07328008574..db1c39aeb1a 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -79,7 +79,7 @@ var/list/admin_verbs_admin = list( /client/proc/reset_all_tcs, /*resets all telecomms scripts*/ /client/proc/toggle_mentor_chat, /client/proc/toggle_advanced_interaction, /*toggle admin ability to interact with not only machines, but also atoms such as buttons and doors*/ - /client/proc/cryo_ssds, + /client/proc/list_ssds, ) var/list/admin_verbs_ban = list( /client/proc/unban_panel, diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index b43001f3abc..d3c95454c33 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -1944,6 +1944,20 @@ if(logmsg) log_admin("[key_name(owner)] answered [key_name(M)]'s prayer with a smiting: [logmsg]") message_admins("[key_name_admin(owner)] answered [key_name_admin(M)]'s prayer with a smiting: [logmsg]") + else if(href_list["cryossd"]) + if(!check_rights(R_ADMIN)) + return + var/mob/living/carbon/human/H = locateUID(href_list["cryossd"]) + if(!istype(H)) + to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human") + return + if(!isLivingSSD(H)) + to_chat(usr, "This can only be used on living, SSD players.") + return + var/success = cryo_ssd(H) + if(success) + log_admin("[key_name(usr)] sent [H.job] [H] to cryo.") + message_admins("[key_name_admin(usr)] sent [H.job] [H] to cryo.") else if(href_list["FaxReplyTemplate"]) if(!check_rights(R_ADMIN)) return diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index da2c998dc79..997589c2e9e 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -882,57 +882,27 @@ Traitors and the like can also be revived with the previous role mostly intact. message_admins("[key_name_admin(usr)] blanked all telecomms scripts.") feedback_add_details("admin_verb","RAT") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! -/client/proc/cryo_ssds() +/client/proc/list_ssds() set category = "Admin" - set name = "Cryo SSDs" - set desc = "Sends SSD players to cryo" + set name = "List SSDs" + set desc = "Lists SSD players" if(!check_rights(R_ADMIN)) return - var/confirm = alert(src, "You sure you want to teleport 10+m SSD players into cryo?", "Confirm", "Yes", "No") - if(confirm != "Yes") - return - - var/list/people_to_cryo = list() + var/msg = "
| [H.key] | [H] | [H.job] | [mins_ssd] mins | [get_area(H)] | PP | " + msg += "Cryo |