Admin 'Cryo SSDs' Verb

Adds a 'Cryo SSDs' verb for admins.
This takes all humans on the station who have been SSD for 10 minutes or
more, and are not immune, and puts them in the cryopods. The idea is
that it allows admins an easily way to clean up large numbers of SSD
crew on the station. SSD crew who are off-station, dead, or
pulled/restrained in some way are immune to this.

As a side benefit, this PR also refactors cryopod.dm, removing "loc ="
calls, and turning the process of entering a cryopod into a proc.
This commit is contained in:
Kyep
2017-06-11 21:29:59 -07:00
parent 536ddad052
commit 1b995319fa
5 changed files with 88 additions and 36 deletions
+1
View File
@@ -79,6 +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,
)
var/list/admin_verbs_ban = list(
/client/proc/unban_panel,
+52
View File
@@ -882,6 +882,58 @@ 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()
set category = "Admin"
set name = "Cryo SSDs"
set desc = "Sends SSD players to cryo"
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()
for(var/mob/living/carbon/human/H in living_mob_list)
if(!H.player_logged)
continue
if(!H.last_logout)
continue
if((H.last_logout + 6000) > world.time)
continue
if(!is_station_level(H.z))
continue
if(!isLivingSSD(H))
continue
if(H.anchored)
continue
if(H.stunned)
continue
if(H.handcuffed)
continue
if(H.buckled)
continue
if(H.pulledby)
continue
people_to_cryo += H
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
var/people_cryoed = 0
for(var/mob/living/carbon/human/T in people_to_cryo)
if(free_cryopods.len)
target_cryopod = safepick(free_cryopods)
if(target_cryopod.check_occupant_allowed(T))
target_cryopod.take_occupant(T, 1)
people_cryoed++
to_chat(usr, "<span class='warning'>Sent [people_cryoed] people to cryostorage.</span>")
log_admin("[key_name(usr)] sent SSDs to cryo.")
message_admins("[key_name_admin(usr)] sent SSDs to cryo.")
feedback_add_details("admin_verb","SSDCRY") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/toggle_ert_calling()
set category = "Event"
set name = "Toggle ERT"