A PR about runtime errors

This commit is contained in:
Ghommie
2020-02-02 05:43:38 +01:00
parent 133da9bdef
commit fedb05b3be
6 changed files with 21 additions and 22 deletions
+4 -3
View File
@@ -343,12 +343,12 @@ GLOBAL_PROTECT(admin_verbs_hideable)
set category = "Admin"
set name = "Aghost"
if(!holder)
return
return FALSE
if(isobserver(mob))
//re-enter
var/mob/dead/observer/ghost = mob
if(!ghost.mind || !ghost.mind.current) //won't do anything if there is no body
return
return FALSE
if(!ghost.can_reenter_corpse)
log_admin("[key_name(usr)] re-entered corpse")
message_admins("[key_name_admin(usr)] re-entered corpse")
@@ -357,6 +357,7 @@ GLOBAL_PROTECT(admin_verbs_hideable)
SSblackbox.record_feedback("tally", "admin_verb", 1, "Admin Reenter") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
else if(isnewplayer(mob))
to_chat(src, "<font color='red'>Error: Aghost: Can't admin-ghost whilst in the lobby. Join or Observe first.</font>")
return FALSE
else
//ghostize
log_admin("[key_name(usr)] admin ghosted.")
@@ -366,7 +367,7 @@ GLOBAL_PROTECT(admin_verbs_hideable)
if(body && !body.key)
body.key = "@[key]" //Haaaaaaaack. But the people have spoken. If it breaks; blame adminbus
SSblackbox.record_feedback("tally", "admin_verb", 1, "Admin Ghost") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return TRUE
/client/proc/invisimin()
set name = "Invisimin"
+4 -4
View File
@@ -1983,8 +1983,8 @@
var/atom/movable/AM = locate(href_list["adminplayerobservefollow"])
var/client/C = usr.client
if(!isobserver(usr))
C.admin_ghost()
if(!isobserver(usr) && !C.admin_ghost())
return
var/mob/dead/observer/A = C.mob
A.ManualFollow(AM)
@@ -2006,8 +2006,8 @@
var/z = text2num(href_list["Z"])
var/client/C = usr.client
if(!isobserver(usr))
C.admin_ghost()
if(!isobserver(usr) && !C.admin_ghost())
return
sleep(2)
C.jumptocoord(x,y,z)