Defining Part 4 - Code cleanup toward defines (... and the rest) (#19388)

* I wasn't done

* nits
This commit is contained in:
Vi3trice
2022-10-28 19:28:23 +02:00
committed by GitHub
parent 9400729a28
commit 03ce2920e1
127 changed files with 268 additions and 257 deletions
+1 -1
View File
@@ -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.")
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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
+3 -3
View File
@@ -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()