mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 03:27:05 +01:00
Defining Part 4 - Code cleanup toward defines (... and the rest) (#19388)
* I wasn't done * nits
This commit is contained in:
+35
-35
@@ -380,7 +380,7 @@
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
|
||||
var/mob/M = locateUID(href_list["mob"])
|
||||
if(!istype(M, /mob))
|
||||
if(!ismob(M))
|
||||
to_chat(usr, "<span class='warning'>This can only be used on instances of type /mob</span>")
|
||||
return
|
||||
|
||||
@@ -427,7 +427,7 @@
|
||||
return
|
||||
|
||||
var/mob/M = locateUID(href_list["jobban2"])
|
||||
if(!istype(M, /mob))
|
||||
if(!ismob(M))
|
||||
to_chat(usr, "<span class='warning'>This can only be used on instances of type /mob</span>")
|
||||
return
|
||||
|
||||
@@ -654,7 +654,7 @@
|
||||
if(!check_rights(R_BAN)) return
|
||||
|
||||
var/mob/M = locateUID(href_list["jobban4"])
|
||||
if(!istype(M, /mob))
|
||||
if(!ismob(M))
|
||||
to_chat(usr, "<span class='warning'>This can only be used on instances of type /mob</span>")
|
||||
return
|
||||
|
||||
@@ -866,7 +866,7 @@
|
||||
return
|
||||
|
||||
var/mob/M = locateUID(href_list["newban"])
|
||||
if(!istype(M, /mob))
|
||||
if(!ismob(M))
|
||||
return
|
||||
var/ban_ckey_param = href_list["dbbanaddckey"]
|
||||
|
||||
@@ -967,7 +967,7 @@
|
||||
return
|
||||
|
||||
var/mob/M = locateUID(href_list["mute"])
|
||||
if(!istype(M, /mob)) return
|
||||
if(!ismob(M)) return
|
||||
if(!M.client) return
|
||||
|
||||
var/mute_type = href_list["mute_type"]
|
||||
@@ -1087,7 +1087,7 @@
|
||||
if(!check_rights(R_SERVER|R_EVENT)) return
|
||||
|
||||
var/mob/M = locateUID(href_list["forcespeech"])
|
||||
if(!istype(M, /mob))
|
||||
if(!ismob(M))
|
||||
to_chat(usr, "<span class='warning'>This can only be used on instances of type /mob</span>")
|
||||
return
|
||||
|
||||
@@ -1105,10 +1105,10 @@
|
||||
return
|
||||
|
||||
var/mob/M = locateUID(href_list["sendtoprison"])
|
||||
if(!istype(M, /mob))
|
||||
if(!ismob(M))
|
||||
to_chat(usr, "<span class='warning'>This can only be used on instances of type /mob</span>")
|
||||
return
|
||||
if(istype(M, /mob/living/silicon/ai))
|
||||
if(isAI(M))
|
||||
to_chat(usr, "<span class='warning'>This cannot be used on instances of type /mob/living/silicon/ai</span>")
|
||||
return
|
||||
|
||||
@@ -1178,7 +1178,7 @@
|
||||
|
||||
var/mob/M = locateUID(href_list["eraseflavortext"])
|
||||
|
||||
if(!istype(M, /mob))
|
||||
if(!ismob(M))
|
||||
to_chat(usr, "<span class='warning'>This can only be used on instances of type /mob</span>")
|
||||
return
|
||||
|
||||
@@ -1209,7 +1209,7 @@
|
||||
|
||||
var/mob/M = locateUID(href_list["userandomname"])
|
||||
|
||||
if(!istype(M, /mob))
|
||||
if(!ismob(M))
|
||||
to_chat(usr, "<span class='warning'>This can only be used on instances of type /mob</span>")
|
||||
return
|
||||
|
||||
@@ -1244,10 +1244,10 @@
|
||||
return
|
||||
|
||||
var/mob/M = locateUID(href_list["tdome1"])
|
||||
if(!istype(M, /mob))
|
||||
if(!ismob(M))
|
||||
to_chat(usr, "<span class='warning'>This can only be used on instances of type /mob</span>")
|
||||
return
|
||||
if(istype(M, /mob/living/silicon/ai))
|
||||
if(isAI(M))
|
||||
to_chat(usr, "<span class='warning'>This cannot be used on instances of type /mob/living/silicon/ai</span>")
|
||||
return
|
||||
|
||||
@@ -1276,10 +1276,10 @@
|
||||
return
|
||||
|
||||
var/mob/M = locateUID(href_list["tdome2"])
|
||||
if(!istype(M, /mob))
|
||||
if(!ismob(M))
|
||||
to_chat(usr, "<span class='warning'>This can only be used on instances of type /mob</span>")
|
||||
return
|
||||
if(istype(M, /mob/living/silicon/ai))
|
||||
if(isAI(M))
|
||||
to_chat(usr, "<span class='warning'>This cannot be used on instances of type /mob/living/silicon/ai</span>")
|
||||
return
|
||||
|
||||
@@ -1308,10 +1308,10 @@
|
||||
return
|
||||
|
||||
var/mob/M = locateUID(href_list["tdomeadmin"])
|
||||
if(!istype(M, /mob))
|
||||
if(!ismob(M))
|
||||
to_chat(usr, "<span class='warning'>This can only be used on instances of type /mob</span>")
|
||||
return
|
||||
if(istype(M, /mob/living/silicon/ai))
|
||||
if(isAI(M))
|
||||
to_chat(usr, "<span class='warning'>This cannot be used on instances of type /mob/living/silicon/ai</span>")
|
||||
return
|
||||
|
||||
@@ -1332,10 +1332,10 @@
|
||||
return
|
||||
|
||||
var/mob/M = locateUID(href_list["tdomeobserve"])
|
||||
if(!istype(M, /mob))
|
||||
if(!ismob(M))
|
||||
to_chat(usr, "<span class='warning'>This can only be used on instances of type /mob</span>")
|
||||
return
|
||||
if(istype(M, /mob/living/silicon/ai))
|
||||
if(isAI(M))
|
||||
to_chat(usr, "<span class='warning'>This cannot be used on instances of type /mob/living/silicon/ai</span>")
|
||||
return
|
||||
|
||||
@@ -1439,10 +1439,10 @@
|
||||
return
|
||||
|
||||
var/mob/M = locateUID(href_list["aroomwarp"])
|
||||
if(!istype(M, /mob))
|
||||
if(!ismob(M))
|
||||
to_chat(usr, "<span class='warning'>This can only be used on instances of type /mob</span>")
|
||||
return
|
||||
if(istype(M, /mob/living/silicon/ai))
|
||||
if(isAI(M))
|
||||
to_chat(usr, "<span class='warning'>This cannot be used on instances of type /mob/living/silicon/ai</span>")
|
||||
return
|
||||
|
||||
@@ -1584,7 +1584,7 @@
|
||||
else if(href_list["adminplayeropts"])
|
||||
var/mob/M = locateUID(href_list["adminplayeropts"])
|
||||
|
||||
if(!istype(M, /mob))
|
||||
if(!ismob(M))
|
||||
to_chat(usr, "<span class='warning'>This can only be used on instances of type /mob</span>")
|
||||
return
|
||||
|
||||
@@ -1598,7 +1598,7 @@
|
||||
C.admin_ghost()
|
||||
var/mob/M = locateUID(href_list["adminplayerobservefollow"])
|
||||
|
||||
if(!istype(M, /mob))
|
||||
if(!ismob(M))
|
||||
to_chat(usr, "<span class='warning'>This can only be used on instances of type /mob</span>")
|
||||
return
|
||||
|
||||
@@ -1719,7 +1719,7 @@
|
||||
else if(href_list["adminmoreinfo"])
|
||||
var/mob/M = locateUID(href_list["adminmoreinfo"])
|
||||
|
||||
if(!istype(M, /mob))
|
||||
if(!ismob(M))
|
||||
to_chat(usr, "<span class='warning'>This can only be used on instances of type /mob</span>")
|
||||
return
|
||||
|
||||
@@ -1792,7 +1792,7 @@
|
||||
|
||||
var/mob/M = locateUID(href_list["CentcommReply"])
|
||||
|
||||
if(!istype(M, /mob))
|
||||
if(!ismob(M))
|
||||
to_chat(usr, "<span class='warning'>This can only be used on instances of type /mob</span>")
|
||||
return
|
||||
|
||||
@@ -1804,7 +1804,7 @@
|
||||
|
||||
var/mob/M = locateUID(href_list["SyndicateReply"])
|
||||
|
||||
if(!istype(M, /mob))
|
||||
if(!ismob(M))
|
||||
to_chat(usr, "<span class='warning'>This can only be used on instances of type /mob</span>")
|
||||
return
|
||||
|
||||
@@ -1816,7 +1816,7 @@
|
||||
|
||||
var/mob/M = locateUID(href_list["HeadsetMessage"])
|
||||
|
||||
if(!istype(M, /mob))
|
||||
if(!ismob(M))
|
||||
to_chat(usr, "<span class='warning'>This can only be used on instances of type /mob</span>")
|
||||
return
|
||||
|
||||
@@ -2499,7 +2499,7 @@
|
||||
if(!check_rights(R_ADMIN | R_MOD | R_MENTOR))
|
||||
return
|
||||
var/mob/M = locateUID(href_list["getplaytimewindow"])
|
||||
if(!istype(M, /mob))
|
||||
if(!ismob(M))
|
||||
to_chat(usr, "<span class='warning'>This can only be used on instances of type /mob</span>")
|
||||
return
|
||||
cmd_mentor_show_exp_panel(M.client)
|
||||
@@ -2508,7 +2508,7 @@
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
|
||||
var/mob/M = locateUID(href_list["jumpto"])
|
||||
if(!istype(M, /mob))
|
||||
if(!ismob(M))
|
||||
to_chat(usr, "<span class='warning'>This can only be used on instances of type /mob</span>")
|
||||
return
|
||||
usr.client.jumptomob(M)
|
||||
@@ -2518,7 +2518,7 @@
|
||||
|
||||
if(alert(usr, "Confirm?", "Message", "Yes", "No") != "Yes") return
|
||||
var/mob/M = locateUID(href_list["getmob"])
|
||||
if(!istype(M, /mob))
|
||||
if(!ismob(M))
|
||||
to_chat(usr, "<span class='warning'>This can only be used on instances of type /mob</span>")
|
||||
return
|
||||
usr.client.Getmob(M)
|
||||
@@ -2527,7 +2527,7 @@
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
|
||||
var/mob/M = locateUID(href_list["sendmob"])
|
||||
if(!istype(M, /mob))
|
||||
if(!ismob(M))
|
||||
to_chat(usr, "<span class='warning'>This can only be used on instances of type /mob</span>")
|
||||
return
|
||||
usr.client.sendmob(M)
|
||||
@@ -2536,7 +2536,7 @@
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
|
||||
var/mob/M = locateUID(href_list["narrateto"])
|
||||
if(!istype(M, /mob))
|
||||
if(!ismob(M))
|
||||
to_chat(usr, "<span class='warning'>This can only be used on instances of type /mob</span>")
|
||||
return
|
||||
usr.client.cmd_admin_direct_narrate(M)
|
||||
@@ -2546,7 +2546,7 @@
|
||||
return
|
||||
|
||||
var/mob/M = locateUID(href_list["subtlemessage"])
|
||||
if(!istype(M, /mob))
|
||||
if(!ismob(M))
|
||||
to_chat(usr, "<span class='warning'>This can only be used on instances of type /mob</span>")
|
||||
return
|
||||
usr.client.cmd_admin_subtle_message(M)
|
||||
@@ -2559,7 +2559,7 @@
|
||||
return
|
||||
|
||||
var/mob/M = locateUID(href_list["traitor"])
|
||||
if(!istype(M, /mob))
|
||||
if(!ismob(M))
|
||||
to_chat(usr, "<span class='warning'>This can only be used on instances of type /mob</span>")
|
||||
return
|
||||
show_traitor_panel(M)
|
||||
@@ -2664,7 +2664,7 @@
|
||||
O.dir = obj_dir
|
||||
if(obj_name)
|
||||
O.name = obj_name
|
||||
if(istype(O,/mob))
|
||||
if(ismob(O))
|
||||
var/mob/M = O
|
||||
M.real_name = obj_name
|
||||
if(where == "inhand" && isliving(usr) && isitem(O))
|
||||
@@ -3407,7 +3407,7 @@
|
||||
var/mob/living/silicon/ai/A = target
|
||||
if(A.client && A.eyeobj) // No point following clientless AI eyes
|
||||
. += "|[ADMIN_FLW(A.eyeobj,"EYE")]"
|
||||
else if(istype(target, /mob/dead/observer))
|
||||
else if(isobserver(target))
|
||||
var/mob/dead/observer/O = target
|
||||
if(O.mind && O.mind.current)
|
||||
. += "|[ADMIN_FLW(O.mind.current,"BDY")]"
|
||||
|
||||
Reference in New Issue
Block a user