mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 02:54:41 +01:00
Defining Part 4 - Code cleanup toward defines (... and the rest) (#19388)
* I wasn't done * nits
This commit is contained in:
@@ -204,7 +204,7 @@ GLOBAL_VAR_INIT(nologevent, 0)
|
||||
else
|
||||
body += "<A href='?_src_=holder;makeanimal=[M.UID()]'>Animalize</A> | "
|
||||
|
||||
if(istype(M, /mob/dead/observer))
|
||||
if(isobserver(M))
|
||||
body += "<A href='?_src_=holder;incarn_ghost=[M.UID()]'>Re-incarnate</a> | "
|
||||
|
||||
if(ispAI(M))
|
||||
@@ -844,7 +844,7 @@ GLOBAL_VAR_INIT(gamma_ship_location, 1) // 0 = station , 1 = space
|
||||
|
||||
/proc/formatJumpTo(location, where="")
|
||||
var/turf/loc
|
||||
if(istype(location,/turf/))
|
||||
if(isturf(location))
|
||||
loc = location
|
||||
else
|
||||
loc = get_turf(location)
|
||||
@@ -854,7 +854,7 @@ GLOBAL_VAR_INIT(gamma_ship_location, 1) // 0 = station , 1 = space
|
||||
|
||||
/proc/formatLocation(location)
|
||||
var/turf/loc
|
||||
if(istype(location,/turf/))
|
||||
if(isturf(location))
|
||||
loc = location
|
||||
else
|
||||
loc = get_turf(location)
|
||||
|
||||
@@ -347,7 +347,7 @@ GLOBAL_LIST_INIT(admin_verbs_maintainer, list(
|
||||
if(!check_rights(R_ADMIN|R_MOD))
|
||||
return
|
||||
|
||||
if(istype(mob,/mob/dead/observer))
|
||||
if(isobserver(mob))
|
||||
//re-enter
|
||||
var/mob/dead/observer/ghost = mob
|
||||
ghost.can_reenter_corpse = 1 //just in-case.
|
||||
|
||||
@@ -375,8 +375,8 @@
|
||||
for(var/obj/item/disk/nuclear/N in GLOB.poi_list)
|
||||
dat += "<tr><td>[N.name], "
|
||||
var/atom/disk_loc = N.loc
|
||||
while(!istype(disk_loc, /turf))
|
||||
if(istype(disk_loc, /mob))
|
||||
while(!isturf(disk_loc))
|
||||
if(ismob(disk_loc))
|
||||
var/mob/M = disk_loc
|
||||
dat += "carried by <a href='?src=[UID()];adminplayeropts=[M.UID()]'>[M.real_name]</a> "
|
||||
if(isobj(disk_loc))
|
||||
|
||||
+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")]"
|
||||
|
||||
@@ -129,7 +129,7 @@
|
||||
var/i = 0
|
||||
for(var/v in sets)
|
||||
if(++i == sets.len)
|
||||
if(istype(temp, /turf) && (v == "x" || v == "y" || v == "z"))
|
||||
if(isturf(temp) && (v == "x" || v == "y" || v == "z"))
|
||||
continue
|
||||
if(!temp.vv_edit_var(v, SDQL_expression(d, set_list[sets])))
|
||||
to_chat(usr, "[temp] rejected your varedit.")
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
if(T.mob)
|
||||
if(isnewplayer(T.mob))
|
||||
targets["(New Player) - [T]"] = T
|
||||
else if(istype(T.mob, /mob/dead/observer))
|
||||
else if(isobserver(T.mob))
|
||||
targets["[T.mob.name](Ghost) - [T]"] = T
|
||||
else
|
||||
targets["[T.mob.real_name](as [T.mob.name]) - [T]"] = T
|
||||
@@ -43,7 +43,7 @@
|
||||
if(T.mob)
|
||||
if(isnewplayer(T.mob))
|
||||
targets["[T] - (New Player)"] = T
|
||||
else if(istype(T.mob, /mob/dead/observer))
|
||||
else if(isobserver(T.mob))
|
||||
targets["[T] - [T.mob.name](Ghost)"] = T
|
||||
else
|
||||
targets["[T] - [T.mob.real_name](as [T.mob.name])"] = T
|
||||
|
||||
@@ -257,7 +257,7 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention)
|
||||
return
|
||||
var/turf/T = mob.loc
|
||||
|
||||
if(!( istype(T, /turf) ))
|
||||
if(!isturf(T))
|
||||
return
|
||||
|
||||
var/datum/gas_mixture/env = T.return_air()
|
||||
@@ -328,7 +328,7 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention)
|
||||
var/mob/choice = input("Choose a player to play the pAI", "Spawn pAI") in available
|
||||
if(!choice)
|
||||
return 0
|
||||
if(!istype(choice, /mob/dead/observer))
|
||||
if(!isobserver(choice))
|
||||
var/confirm = input("[choice.key] isn't ghosting right now. Are you sure you want to yank [choice.p_them()] out of [choice.p_their()] body and place [choice.p_them()] in this pAI?", "Spawn pAI Confirmation", "No") in list("Yes", "No")
|
||||
if(confirm != "Yes")
|
||||
return 0
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
return
|
||||
|
||||
if(ismob(M))
|
||||
if(istype(M, /mob/living/silicon/ai))
|
||||
if(isAI(M))
|
||||
alert("The AI can't be sent to prison you jerk!", null, null, null, null, null)
|
||||
return
|
||||
//strip their stuff before they teleport into a cell :downs:
|
||||
@@ -774,7 +774,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
log_admin("[key_name(usr)] has gibbed [key_name(M)]")
|
||||
message_admins("[key_name_admin(usr)] has gibbed [key_name_admin(M)]", 1)
|
||||
|
||||
if(istype(M, /mob/dead/observer))
|
||||
if(isobserver(M))
|
||||
gibs(M.loc)
|
||||
return
|
||||
|
||||
@@ -790,7 +790,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
|
||||
var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No")
|
||||
if(confirm == "Yes")
|
||||
if(istype(mob, /mob/dead/observer)) // so they don't spam gibs everywhere
|
||||
if(isobserver(mob)) // so they don't spam gibs everywhere
|
||||
return
|
||||
else
|
||||
mob.gib()
|
||||
|
||||
Reference in New Issue
Block a user