Merge pull request #774 from tigercat2000/cryoalert

Minor cryostorage fix, admin-related feature of cryostorage
This commit is contained in:
ZomgPonies
2015-04-09 16:22:08 -04:00
+22
View File
@@ -451,6 +451,10 @@
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
else //because why the fuck would you keep going if the mob isn't in the pod
user << "<span class='notice'>You stop putting [M] into the cryopod.</span>"
return
if(orient_right)
icon_state = "[occupied_icon_state]-r"
else
@@ -458,9 +462,17 @@
M << "<span class='notice'>[on_enter_occupant_message]</span>"
M << "<span class='notice'><b>If you ghost, log out or close your client now, your character will shortly be permanently removed from the round.</b></span>"
occupant = M
time_entered = world.time
if(findtext("[M.key]","@",1,2))
var/FT = replacetext(M.key, "@", "")
for(var/mob/dead/observer/Gh in respawnable_list) //this may not be foolproof but it seemed like a better option than 'in world'
if(Gh.key == FT)
if(Gh.client && Gh.client.holder) //just in case someone has a byond name with @ at the start, which I don't think is even possible but whatever
Gh << "<span style='color: #800080;font-weight: bold;font-size:4;'>Warning: Your body has entered cryostorage.</span>"
// Book keeping!
var/turf/location = get_turf(src)
log_admin("[key_name_admin(M)] has entered a stasis pod. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[location.x];Y=[location.y];Z=[location.z]'>JMP</a>)")
@@ -530,6 +542,9 @@
if(L.client)
L.client.perspective = EYE_PERSPECTIVE
L.client.eye = src
else
user << "<span class='notice'>You stop [L == user ? "climbing into the cryo pod." : "putting [L] into the cryo pod."]</span>"
return
if(orient_right)
icon_state = "[occupied_icon_state]-r"
@@ -541,6 +556,13 @@
occupant = L
time_entered = world.time
if(findtext("[L.key]","@",1,2))
var/FT = replacetext(L.key, "@", "")
for(var/mob/dead/observer/Gh in respawnable_list) //this may not be foolproof but it seemed like a better option than 'in world'
if(Gh.key == FT)
if(Gh.client && Gh.client.holder) //just in case someone has a byond name with @ at the start, which I don't think is even possible but whatever
Gh << "<span style='color: #800080;font-weight: bold;font-size:4;'>Warning: Your body has entered cryostorage.</span>"
// Book keeping!
log_admin("[key_name_admin(L)] has entered a stasis pod. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)")
message_admins("<span class='notice'>[key_name_admin(L)] has entered a stasis pod.</span>")