mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 19:47:22 +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()
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
return adjacent_turfs
|
||||
|
||||
/atom/movable/proc/air_update_turf(command = 0)
|
||||
if(!istype(loc,/turf) && command)
|
||||
if(!isturf(loc) && command)
|
||||
return
|
||||
for(var/turf/T in locs) // used by double wide doors and other nonexistant multitile structures
|
||||
T.air_update_turf(command)
|
||||
@@ -114,7 +114,7 @@
|
||||
SSair.add_to_active(src,command)
|
||||
|
||||
/atom/movable/proc/move_update_air(turf/T)
|
||||
if(istype(T,/turf))
|
||||
if(isturf(T))
|
||||
T.air_update_turf(1)
|
||||
air_update_turf(1)
|
||||
|
||||
|
||||
@@ -129,13 +129,13 @@
|
||||
return
|
||||
if(!ismob(O)) //humans only
|
||||
return
|
||||
if(istype(O, /mob/living/simple_animal) || istype(O, /mob/living/silicon)) //animals and robutts dont fit
|
||||
if(isanimal(O) || issilicon(O)) //animals and robutts dont fit
|
||||
return
|
||||
if(!ishuman(user) && !isrobot(user)) //No ghosts or mice putting people into the sleeper
|
||||
return
|
||||
if(user.loc==null) // just in case someone manages to get a closet into the blue light dimension, as unlikely as that seems
|
||||
return
|
||||
if(!istype(user.loc, /turf) || !istype(O.loc, /turf)) // are you in a container/closet/pod/etc?
|
||||
if(!isturf(user.loc) || !isturf(O.loc)) // are you in a container/closet/pod/etc?
|
||||
return
|
||||
if(occupant)
|
||||
to_chat(user, "<span class='boldnotice'>The cryo cell is already occupied!</span>")
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
/obj/machinery/atmospherics/meter/examine(mob/user)
|
||||
var/t = "A gas flow meter. "
|
||||
|
||||
if(get_dist(user, src) > 3 && !(istype(user, /mob/living/silicon/ai) || istype(user, /mob/dead)))
|
||||
if(get_dist(user, src) > 3 && !(isAI(user) || istype(user, /mob/dead)))
|
||||
t += "<span class='boldnotice'>You are too far away to read it.</span>"
|
||||
|
||||
else if(stat & (NOPOWER|BROKEN))
|
||||
@@ -122,7 +122,7 @@
|
||||
. = list(t)
|
||||
|
||||
/obj/machinery/atmospherics/meter/Click()
|
||||
if(istype(usr, /mob/living/silicon/ai)) // ghosts can call ..() for examine
|
||||
if(isAI(usr)) // ghosts can call ..() for examine
|
||||
usr.examinate(src)
|
||||
return 1
|
||||
|
||||
|
||||
@@ -288,7 +288,7 @@ GLOBAL_DATUM_INIT(_preloader, /datum/dmm_suite/preloader, new())
|
||||
var/mlen = members.len - 1
|
||||
while(index <= mlen) // Last item is an /area
|
||||
var/underlay
|
||||
if(istype(T, /turf)) // I blame this on the stupid clown who coded the BYOND map editor
|
||||
if(isturf(T)) // I blame this on the stupid clown who coded the BYOND map editor
|
||||
underlay = T.appearance
|
||||
T = instance_atom(members[index], members_attributes[index], xcrd, ycrd, zcrd) // instance new turf
|
||||
if(ispath(members[index], /turf))
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
var/ctrl_click = pa.Find("ctrl")
|
||||
var/alt_click = pa.Find("alt")
|
||||
|
||||
if(istype(object,/turf) && left_click && !alt_click && !ctrl_click)
|
||||
if(isturf(object) && left_click && !alt_click && !ctrl_click)
|
||||
var/turf/T = object
|
||||
if(isspaceturf(object))
|
||||
T.ChangeTurf(/turf/simulated/floor/plasteel)
|
||||
@@ -41,10 +41,10 @@
|
||||
T.ChangeTurf(/turf/simulated/wall)
|
||||
else if(isobj(object))
|
||||
qdel(object)
|
||||
else if(istype(object,/turf) && alt_click && left_click)
|
||||
else if(isturf(object) && alt_click && left_click)
|
||||
log_admin("Build Mode: [key_name(user)] built an airlock at ([object.x],[object.y],[object.z])")
|
||||
new/obj/machinery/door/airlock(get_turf(object))
|
||||
else if(istype(object,/turf) && ctrl_click && left_click)
|
||||
else if(isturf(object) && ctrl_click && left_click)
|
||||
var/obj/structure/window/reinforced/WIN = new/obj/structure/window/reinforced(get_turf(object))
|
||||
WIN.setDir(BM.build_dir)
|
||||
log_admin("Build Mode: [key_name(user)] built a window at ([object.x],[object.y],[object.z])")
|
||||
|
||||
@@ -340,7 +340,7 @@ BLIND // can't see anything
|
||||
if(H.w_uniform == src)
|
||||
H.update_suit_sensors()
|
||||
|
||||
else if(istype(src.loc, /mob))
|
||||
else if(ismob(src.loc))
|
||||
switch(sensor_mode)
|
||||
if(SUIT_SENSOR_OFF)
|
||||
for(var/mob/V in viewers(user, 1))
|
||||
|
||||
@@ -73,12 +73,12 @@
|
||||
return
|
||||
|
||||
var/turf/location = loc
|
||||
if(istype(location, /mob/))
|
||||
if(ismob(location))
|
||||
var/mob/living/carbon/human/M = location
|
||||
if(M.l_hand == src || M.r_hand == src || M.head == src)
|
||||
location = M.loc
|
||||
|
||||
if(istype(location, /turf))
|
||||
if(isturf(location))
|
||||
location.hotspot_expose(700, 1)
|
||||
|
||||
/obj/item/clothing/head/cakehat/attack_self(mob/user)
|
||||
|
||||
@@ -195,7 +195,7 @@
|
||||
if(!M.anchored && (M.flags & CONDUCT))
|
||||
step_towards(M,src)
|
||||
for(var/mob/living/silicon/S in orange(2,src))
|
||||
if(istype(S, /mob/living/silicon/ai)) continue
|
||||
if(isAI(S)) continue
|
||||
step_towards(S,src)
|
||||
for(var/mob/living/carbon/human/machine/M in orange(2,src))
|
||||
step_towards(M,src)
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
return
|
||||
if(prob(shake_chance))
|
||||
for(var/mob/M in range(10, src))
|
||||
if(!M.stat && !istype(M, /mob/living/silicon/ai))
|
||||
if(!M.stat && !isAI(M))
|
||||
shake_camera(M, 3, 1)
|
||||
playsound(loc, 'sound/effects/meteorimpact.ogg', 40, 1)
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
if(!M.mind || !M.client || M.client.inactivity > 10 * 10 * 60) // longer than 10 minutes AFK counts them as inactive
|
||||
continue
|
||||
|
||||
if(istype(M, /mob/living/silicon/robot))
|
||||
if(isrobot(M))
|
||||
var/mob/living/silicon/robot/R = M
|
||||
if(R.module && (R.module.name == "engineering robot module"))
|
||||
active_with_role["Engineer"]++
|
||||
|
||||
@@ -1004,7 +1004,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/machinery/hydroponics/attack_animal(mob/living/user)
|
||||
if(istype(user, /mob/living/simple_animal/diona))
|
||||
if(isnymph(user))
|
||||
if(weedlevel > 0)
|
||||
user.adjust_nutrition(weedlevel * 15)
|
||||
adjustWeeds(-10)
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
target.visible_message("<span class='warning'>[user] smacks [target] in the forehead!</span>")
|
||||
|
||||
//its the staff of healing code..hush
|
||||
if(istype(target,/mob))
|
||||
if(ismob(target))
|
||||
var/old_stat = target.stat
|
||||
if(isanimal(target) && target.stat == DEAD)
|
||||
var/mob/living/simple_animal/O = target
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
if(!loaded)
|
||||
return
|
||||
if(isliving(target) && proximity_flag)
|
||||
if(istype(target, /mob/living/simple_animal))
|
||||
if(isanimal(target))
|
||||
var/mob/living/simple_animal/M = target
|
||||
if(M.sentience_type != revive_type)
|
||||
to_chat(user, "<span class='info'>[src] does not work on this sort of creature.</span>")
|
||||
@@ -27,7 +27,7 @@
|
||||
M.faction = list("neutral")
|
||||
M.revive()
|
||||
M.can_collar = TRUE
|
||||
if(istype(target, /mob/living/simple_animal/hostile))
|
||||
if(ishostile(target))
|
||||
var/mob/living/simple_animal/hostile/H = M
|
||||
if(malfunctioning)
|
||||
H.faction |= list("lazarus", "\ref[user]")
|
||||
|
||||
@@ -548,10 +548,11 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
set name = "Analyze Air"
|
||||
set category = "Ghost"
|
||||
|
||||
if(!istype(usr, /mob/dead/observer)) return
|
||||
if(!isobserver(usr))
|
||||
return
|
||||
|
||||
// Shamelessly copied from the Gas Analyzers
|
||||
if(!( istype(usr.loc, /turf) ))
|
||||
if(!isturf(usr.loc))
|
||||
return
|
||||
|
||||
var/datum/gas_mixture/environment = usr.loc.return_air()
|
||||
@@ -617,7 +618,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
if(A.client && A.eyeobj) // No point following clientless AI eyes
|
||||
. += "|<a href='byond://?src=[ghost.UID()];follow=[A.eyeobj.UID()]'>eye</a>"
|
||||
return
|
||||
else if(istype(target, /mob/dead/observer))
|
||||
else if(isobserver(target))
|
||||
var/mob/dead/observer/O = target
|
||||
. = "<a href='byond://?src=[ghost.UID()];follow=[target.UID()]'>follow</a>"
|
||||
if(O.mind && O.mind.current)
|
||||
|
||||
@@ -11,6 +11,6 @@
|
||||
|
||||
/mob/dead/observer/handle_speaker_name(mob/speaker = null, vname, hard_to_hear)
|
||||
var/speaker_name = ..()
|
||||
if(speaker && (speaker_name != speaker.real_name) && !isAI(speaker) && !istype(speaker, /mob/living/automatedannouncer)) //Announce computer and various stuff that broadcasts doesn't use it's real name but AI's can't pretend to be other mobs.
|
||||
if(speaker && (speaker_name != speaker.real_name) && !isAI(speaker) && !isAutoAnnouncer(speaker)) //Announce computer and various stuff that broadcasts doesn't use it's real name but AI's can't pretend to be other mobs.
|
||||
speaker_name = "[speaker.real_name] ([speaker_name])"
|
||||
return speaker_name
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
/obj/item/holder/process()
|
||||
|
||||
if(istype(loc,/turf) || !(contents.len))
|
||||
if(isturf(loc) || !(contents.len))
|
||||
|
||||
for(var/mob/M in contents)
|
||||
|
||||
|
||||
@@ -598,7 +598,7 @@
|
||||
M.show_message("[message_start_dead] [message_body]", 2)
|
||||
|
||||
for(var/mob/living/S in GLOB.alive_mob_list)
|
||||
if(drone_only && !istype(S,/mob/living/silicon/robot/drone))
|
||||
if(drone_only && !isdrone(S))
|
||||
continue
|
||||
else if(isAI(S))
|
||||
message_start = "<i><span class='game say'>[name], <a href='byond://?src=[S.UID()];track=\ref[speaker]'><span class='name'>[speaker.name]</span></a>"
|
||||
|
||||
@@ -6,7 +6,7 @@ As such, they can either help or harm other aliens. Help works like the human he
|
||||
In all, this is a lot like the monkey code. /N
|
||||
*/
|
||||
/mob/living/carbon/alien/attack_alien(mob/living/carbon/alien/M)
|
||||
if(istype(loc, /turf) && istype(loc.loc, /area/start))
|
||||
if(isturf(loc) && istype(loc.loc, /area/start))
|
||||
to_chat(M, "No attacking people at spawn, you jackass.")
|
||||
return
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/brain/say_understands(other)//Goddamn is this hackish, but this say code is so odd
|
||||
if(istype(other, /mob/living/silicon/ai))
|
||||
if(isAI(other))
|
||||
if(!(container && istype(container, /obj/item/mmi)))
|
||||
return 0
|
||||
else
|
||||
@@ -28,12 +28,12 @@
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
if(istype(other, /mob/living/silicon/pai))
|
||||
if(ispAI(other))
|
||||
if(!(container && istype(container, /obj/item/mmi)))
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
if(istype(other, /mob/living/silicon/robot))
|
||||
if(isrobot(other))
|
||||
if(!(container && istype(container, /obj/item/mmi)))
|
||||
return 0
|
||||
else
|
||||
|
||||
@@ -308,7 +308,7 @@ This function restores all organs.
|
||||
|
||||
/mob/living/carbon/human/proc/HealDamage(zone, brute, burn)
|
||||
var/obj/item/organ/external/E = get_organ(zone)
|
||||
if(istype(E, /obj/item/organ/external))
|
||||
if(isorgan(E))
|
||||
if(E.heal_damage(brute, burn))
|
||||
UpdateDamageIcon()
|
||||
else
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
|
||||
//These only pertain to common. Languages are handled by mob/say_understands()
|
||||
if(!speaking)
|
||||
if(istype(other, /mob/living/simple_animal/diona))
|
||||
if(isnymph(other))
|
||||
if(other.languages.len >= 2) //They've sucked down some blood and can speak common now.
|
||||
return 1
|
||||
if(issilicon(other))
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
"is pulling themselves apart!")
|
||||
|
||||
/datum/species/diona/can_understand(mob/other)
|
||||
if(istype(other, /mob/living/simple_animal/diona))
|
||||
if(isnymph(other))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
return ..()
|
||||
|
||||
/atom/proc/move_camera_by_click()
|
||||
if(istype(usr, /mob/living/silicon/ai))
|
||||
if(isAI(usr))
|
||||
var/mob/living/silicon/ai/AI = usr
|
||||
if(AI.eyeobj && (AI.client.eye == AI.eyeobj) && (AI.eyeobj.z == z))
|
||||
AI.cameraFollow = null
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
else
|
||||
track = "[speaker_name] ([jobname])"
|
||||
else
|
||||
if(istype(follow_target, /mob/living/simple_animal/bot))
|
||||
if(isbot(follow_target))
|
||||
track = "<a href='byond://?src=[UID()];trackbot=\ref[follow_target]'>[speaker_name] ([jobname])</a>"
|
||||
else
|
||||
mob_to_track = speaker
|
||||
|
||||
@@ -252,7 +252,7 @@
|
||||
visible_message("<span class='notice'>[src] folds outwards, expanding into a mobile form.</span>", "<span class='notice'>You fold outwards, expanding into a mobile form.</span>")
|
||||
|
||||
/mob/living/silicon/pai/proc/force_fold_out()
|
||||
if(istype(card.loc, /mob))
|
||||
if(ismob(card.loc))
|
||||
var/mob/holder = card.loc
|
||||
holder.unEquip(card)
|
||||
else if(istype(card.loc, /obj/item/pda))
|
||||
|
||||
@@ -272,7 +272,7 @@
|
||||
|
||||
/proc/robot_healthscan(mob/user, mob/living/M)
|
||||
var/scan_type
|
||||
if(istype(M, /mob/living/silicon/robot))
|
||||
if(isrobot(M))
|
||||
scan_type = "robot"
|
||||
else if(ishuman(M))
|
||||
scan_type = "prosthetics"
|
||||
|
||||
@@ -678,7 +678,7 @@ GLOBAL_LIST_INIT(robot_verbs_default, list(
|
||||
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/stack/cable_coil) && user.a_intent == INTENT_HELP && (wiresexposed || istype(src, /mob/living/silicon/robot/drone)))
|
||||
if(istype(W, /obj/item/stack/cable_coil) && user.a_intent == INTENT_HELP && (wiresexposed || isdrone(src)))
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
if(!getFireLoss())
|
||||
to_chat(user, "<span class='notice'>Nothing to fix!</span>")
|
||||
|
||||
@@ -770,7 +770,7 @@
|
||||
|
||||
/// Checks whether this item is a module of the robot it is located in.
|
||||
/obj/item/proc/is_robot_module()
|
||||
if(!istype(loc, /mob/living/silicon/robot))
|
||||
if(!isrobot(loc))
|
||||
return FALSE
|
||||
|
||||
var/mob/living/silicon/robot/R = loc
|
||||
|
||||
@@ -61,9 +61,9 @@
|
||||
if(!speaking)
|
||||
if(iscarbon(other))
|
||||
return 1
|
||||
if(istype(other, /mob/living/silicon))
|
||||
if(issilicon(other))
|
||||
return 1
|
||||
if(istype(other, /mob/living/simple_animal/bot))
|
||||
if(isbot(other))
|
||||
return 1
|
||||
if(isbrain(other))
|
||||
return 1
|
||||
|
||||
@@ -445,15 +445,15 @@
|
||||
var/atom/U = (istype(target, /atom/movable) ? target.loc : target)
|
||||
if((!( U ) || !( T )))
|
||||
return
|
||||
while(!(istype(U, /turf)))
|
||||
while(!isturf(U))
|
||||
U = U.loc
|
||||
if(!(istype(T, /turf)))
|
||||
if(!isturf(T))
|
||||
return
|
||||
|
||||
if(!projectile)
|
||||
return
|
||||
|
||||
if(!(istype(U, /turf)))
|
||||
if(!isturf(U))
|
||||
return
|
||||
var/obj/item/projectile/A = new projectile(loc)
|
||||
playsound(loc, shoot_sound, 50, 1)
|
||||
|
||||
@@ -215,7 +215,7 @@
|
||||
|
||||
if(target)
|
||||
if(path.len == 0)
|
||||
if(!istype(target, /turf/))
|
||||
if(!isturf(target))
|
||||
var/turf/TL = get_turf(target)
|
||||
path = get_path_to(src, TL, /turf/proc/Distance_cardinal, 0, 30, id=access_card,simulated_only = 0)
|
||||
else
|
||||
@@ -236,7 +236,7 @@
|
||||
start_eattile(target)
|
||||
else if(istype(target, /obj/item/stack/sheet/metal))
|
||||
start_maketile(target)
|
||||
else if(istype(target, /turf/) && emagged < 2)
|
||||
else if(isturf(target) && emagged < 2)
|
||||
repair(target)
|
||||
else if(emagged == 2 && isfloorturf(target))
|
||||
var/turf/simulated/floor/F = target
|
||||
|
||||
@@ -687,7 +687,7 @@
|
||||
if(wires.is_cut(WIRE_MOB_AVOIDANCE)) // usually just bumps, but if avoidance disabled knock over mobs
|
||||
var/mob/living/L = obs
|
||||
if(ismob(L))
|
||||
if(istype(L,/mob/living/silicon/robot))
|
||||
if(isrobot(L))
|
||||
visible_message("<span class='danger'>[src] bumps into [L]!</span>")
|
||||
else
|
||||
if(!paicard)
|
||||
|
||||
@@ -156,7 +156,7 @@
|
||||
|
||||
var/hasMobs = FALSE
|
||||
for(var/atom/A in D.contents)
|
||||
if(istype(A, /mob/) || istype(A, /obj/item/holder))
|
||||
if(ismob(A) || istype(A, /obj/item/holder))
|
||||
hasMobs = TRUE
|
||||
if(!hasMobs)
|
||||
D.status_flags &= ~PASSEMOTES
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
gold_core_spawnable = FRIENDLY_SPAWN
|
||||
|
||||
/mob/living/simple_animal/lizard/decompile_act(obj/item/matter_decompiler/C, mob/user)
|
||||
if(!istype(user, /mob/living/silicon/robot/drone))
|
||||
if(!isdrone(user))
|
||||
user.visible_message("<span class='notice'>[user] sucks [src] into its decompiler. There's a horrible crunching noise.</span>", \
|
||||
"<span class='warning'>It's a bit of a struggle, but you manage to suck [src] into your decompiler. It makes a series of visceral crunching noises.</span>")
|
||||
new/obj/effect/decal/cleanable/blood/splatter(get_turf(src))
|
||||
|
||||
@@ -209,7 +209,7 @@
|
||||
to_chat(src, "<span class='warning'>[src] tries to pick you up, but you wriggle free of their grasp!</span>")
|
||||
|
||||
/mob/living/simple_animal/mouse/decompile_act(obj/item/matter_decompiler/C, mob/user)
|
||||
if(!(istype(user, /mob/living/silicon/robot/drone)))
|
||||
if(!isdrone(user))
|
||||
user.visible_message("<span class='notice'>[user] sucks [src] into its decompiler. There's a horrible crunching noise.</span>", \
|
||||
"<span class='warning'>It's a bit of a struggle, but you manage to suck [src] into your decompiler. It makes a series of visceral crunching noises.</span>")
|
||||
new/obj/effect/decal/cleanable/blood/splatter(get_turf(src))
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
var/list/mice = list()
|
||||
for(var/HM in .)
|
||||
//Yum a tasty mouse
|
||||
if(istype(HM, /mob/living/simple_animal/mouse))
|
||||
if(ismouse(HM))
|
||||
mice += HM
|
||||
if(isliving(HM))
|
||||
living_mobs += HM
|
||||
@@ -54,7 +54,7 @@
|
||||
return mice
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/poison/snake/AttackingTarget()
|
||||
if(istype(target, /mob/living/simple_animal/mouse))
|
||||
if(ismouse(target))
|
||||
visible_message("<span class='notice'>[name] consumes [target] in a single gulp!</span>", "<span class='notice'>You consume [target] in a single gulp!</span>")
|
||||
QDEL_NULL(target)
|
||||
adjustHealth(-2)
|
||||
|
||||
@@ -202,7 +202,7 @@
|
||||
walk(src,0)
|
||||
spawn(50)
|
||||
if(busy == SPINNING_COCOON)
|
||||
if(cocoon_target && istype(cocoon_target.loc, /turf) && get_dist(src,cocoon_target) <= 1)
|
||||
if(cocoon_target && isturf(cocoon_target.loc) && get_dist(src,cocoon_target) <= 1)
|
||||
var/obj/structure/spider/cocoon/C = new(cocoon_target.loc)
|
||||
var/large_cocoon = 0
|
||||
C.pixel_x = cocoon_target.pixel_x
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
. += "However, this one appears appears less wild in nature, and calmer around people."
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/elite/AttackingTarget()
|
||||
if(istype(target, /mob/living/simple_animal/hostile))
|
||||
if(ishostile(target))
|
||||
var/mob/living/simple_animal/hostile/M = target
|
||||
if(faction_check_mob(M))
|
||||
return FALSE
|
||||
|
||||
@@ -149,7 +149,7 @@
|
||||
if(noms in totalWormSegments)
|
||||
return //Trying to eat part of self.
|
||||
|
||||
if(istype(noms, /turf))
|
||||
if(isturf(noms))
|
||||
if(iswallturf(noms))
|
||||
W = noms
|
||||
nomDelay *= 2
|
||||
|
||||
@@ -143,7 +143,7 @@
|
||||
// nesting in a hallway would be very stupid - crew would find and kill you almost instantly
|
||||
var/numhostiles = 0
|
||||
for(var/mob/living/H in oview(10, src))
|
||||
if(!istype(H, /mob/living/simple_animal/hostile/poison/terror_spider))
|
||||
if(!isterrorspider(H))
|
||||
if(H.stat != DEAD)
|
||||
numhostiles += 1
|
||||
// nesting RIGHT NEXT TO SOMEONE is even worse
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
client.click_intercept.InterceptClickOn(src, params, A)
|
||||
return
|
||||
|
||||
if(!istype(loc, /turf)) // If we're inside a card machine or something similar then you're stuck.
|
||||
if(!isturf(loc)) // If we're inside a card machine or something similar then you're stuck.
|
||||
return
|
||||
|
||||
name = spirit_name
|
||||
|
||||
@@ -157,7 +157,7 @@
|
||||
var/omsg = replacetext(message, "<B>[src]</B> ", "")
|
||||
var/list/listening_obj = new
|
||||
for(var/atom/movable/A in view(range, src))
|
||||
if(istype(A, /mob))
|
||||
if(ismob(A))
|
||||
var/mob/M = A
|
||||
for(var/obj/O in M.contents)
|
||||
listening_obj |= O
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
return 0
|
||||
|
||||
/proc/ispet(A)
|
||||
if(istype(A, /mob/living/simple_animal))
|
||||
if(isanimal(A))
|
||||
var/mob/living/simple_animal/SA = A
|
||||
if(SA.can_collar)
|
||||
return 1
|
||||
@@ -529,7 +529,7 @@ GLOBAL_LIST_INIT(intents, list(INTENT_HELP,INTENT_DISARM,INTENT_GRAB,INTENT_HARM
|
||||
if(M.stat != DEAD && check_rights(R_ADMIN|R_MOD,0,M))
|
||||
follow = "([admin_jump_link(subject)]) "
|
||||
var/mob/dead/observer/DM
|
||||
if(istype(subject, /mob/dead/observer))
|
||||
if(isobserver(subject))
|
||||
DM = subject
|
||||
if(check_rights(R_ADMIN|R_MOD, FALSE, M)) // What admins see
|
||||
lname = "[keyname][(DM?.client.prefs.toggles2 & PREFTOGGLE_2_ANON) ? (@"[ANON]") : (DM ? "" : "^")] ([name])"
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
/obj/item/paper/examine(mob/user)
|
||||
. = ..()
|
||||
if(user.is_literate())
|
||||
if(in_range(user, src) || istype(user, /mob/dead/observer))
|
||||
if(in_range(user, src) || isobserver(user))
|
||||
show_content(user)
|
||||
else
|
||||
. += "<span class='notice'>You have to go closer if you want to read it.</span>"
|
||||
@@ -400,7 +400,7 @@
|
||||
else if(h_user.head == src)
|
||||
h_user.unEquip(src)
|
||||
h_user.put_in_hands(B)
|
||||
else if(!istype(src.loc, /turf))
|
||||
else if(!isturf(src.loc))
|
||||
src.loc = get_turf(h_user)
|
||||
if(h_user.client) h_user.client.screen -= src
|
||||
h_user.put_in_hands(B)
|
||||
|
||||
@@ -193,7 +193,7 @@
|
||||
update_icon()
|
||||
else
|
||||
to_chat(usr, "<span class='notice'>You need to hold it in your hands to change pages.</span>")
|
||||
if(istype(loc, /mob))
|
||||
if(ismob(loc))
|
||||
attack_self(loc)
|
||||
|
||||
/obj/item/paper_bundle/AltClick(mob/user)
|
||||
|
||||
@@ -154,9 +154,9 @@
|
||||
if(ishuman(copymob)) //Suit checks are in check_mob
|
||||
var/mob/living/carbon/human/H = copymob
|
||||
temp_img = icon('icons/obj/butts.dmi', H.dna.species.butt_sprite)
|
||||
else if(istype(copymob,/mob/living/silicon/robot/drone))
|
||||
else if(isdrone(copymob))
|
||||
temp_img = icon('icons/obj/butts.dmi', "drone")
|
||||
else if(istype(copymob,/mob/living/simple_animal/diona))
|
||||
else if(isnymph(copymob))
|
||||
temp_img = icon('icons/obj/butts.dmi', "nymph")
|
||||
else if(isalien(copymob) || istype(copymob,/mob/living/simple_animal/hostile/alien)) //Xenos have their own asses, thanks to Pybro.
|
||||
temp_img = icon('icons/obj/butts.dmi', "xeno")
|
||||
@@ -495,7 +495,7 @@
|
||||
toner = 0
|
||||
|
||||
/obj/machinery/photocopier/MouseDrop_T(mob/target, mob/living/user)
|
||||
if(!istype(target) || target.buckled || get_dist(user, src) > 1 || get_dist(user, target) > 1 || user.stat || istype(user, /mob/living/silicon/ai) || target.move_resist > user.pull_force)
|
||||
if(!istype(target) || target.buckled || get_dist(user, src) > 1 || get_dist(user, target) > 1 || user.stat || isAI(user) || target.move_resist > user.pull_force)
|
||||
return
|
||||
if(check_mob()) //is target mob or another mob on this photocopier already?
|
||||
return
|
||||
|
||||
@@ -252,7 +252,7 @@ GLOBAL_LIST_INIT(SpookyGhosts, list("ghost","shade","shade2","ghost-narsie","hor
|
||||
// As well as anything that isn't invisible.
|
||||
for(var/atom/A in the_turf)
|
||||
if(A.invisibility)
|
||||
if(see_ghosts && istype(A,/mob/dead/observer))
|
||||
if(see_ghosts && isobserver(A))
|
||||
var/mob/dead/observer/O = A
|
||||
if(O.orbiting_uid)
|
||||
continue
|
||||
@@ -314,7 +314,7 @@ GLOBAL_LIST_INIT(SpookyGhosts, list("ghost","shade","shade2","ghost-narsie","hor
|
||||
var/mob_detail
|
||||
for(var/mob/M in the_turf)
|
||||
if(M.invisibility)
|
||||
if(see_ghosts && istype(M,/mob/dead/observer))
|
||||
if(see_ghosts && isobserver(M))
|
||||
var/mob/dead/observer/O = M
|
||||
if(O.orbiting_uid)
|
||||
continue
|
||||
|
||||
@@ -151,10 +151,10 @@
|
||||
deletepicture(src)
|
||||
|
||||
/obj/item/camera/siliconcam/proc/getsource()
|
||||
if(istype(src.loc, /mob/living/silicon/ai))
|
||||
if(isAI(loc))
|
||||
return src
|
||||
|
||||
var/mob/living/silicon/robot/C = src.loc
|
||||
var/mob/living/silicon/robot/C = loc
|
||||
var/obj/item/camera/siliconcam/Cinfo
|
||||
if(C.connected_ai)
|
||||
Cinfo = C.connected_ai.aiCamera
|
||||
|
||||
@@ -86,7 +86,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
var/mob/M = loc
|
||||
if(M.incapacitated())
|
||||
return 0
|
||||
if((src in M.contents) || ( istype(loc, /turf) && in_range(src, M) ))
|
||||
if((src in M.contents) || ( isturf(loc) && in_range(src, M) ))
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
@@ -218,7 +218,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
if(O)
|
||||
to_chat(user, "<span class='notice'>You remove [O] from [src].</span>")
|
||||
playsound(src, 'sound/machines/pda_button2.ogg', 50, TRUE)
|
||||
if(istype(loc, /mob))
|
||||
if(ismob(loc))
|
||||
var/mob/M = loc
|
||||
if(M.get_active_hand() == null)
|
||||
M.put_in_hands(O)
|
||||
@@ -280,7 +280,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
playsound(src, 'sound/machines/terminal_success.ogg', 50, TRUE)
|
||||
else
|
||||
//Basic safety check. If either both objects are held by user or PDA is on ground and card is in hand.
|
||||
if(((src in user.contents) && (C in user.contents)) || (istype(loc, /turf) && in_range(src, user) && (C in user.contents)) )
|
||||
if(((src in user.contents) && (C in user.contents)) || (isturf(loc) && in_range(src, user) && (C in user.contents)) )
|
||||
if( can_use(user) )//If they can still act.
|
||||
id_check(user, 2)
|
||||
to_chat(user, "<span class='notice'>You put the ID into \the [src]'s slot.<br>You can remove it with ALT click.</span>")
|
||||
|
||||
@@ -850,7 +850,7 @@
|
||||
data["chargingStatus"] = charging
|
||||
data["totalLoad"] = round(lastused_equip + lastused_light + lastused_environ)
|
||||
data["coverLocked"] = coverlocked
|
||||
data["siliconUser"] = istype(user, /mob/living/silicon)
|
||||
data["siliconUser"] = issilicon(user)
|
||||
data["siliconLock"] = locked
|
||||
data["malfStatus"] = get_malf_status(user)
|
||||
data["nightshiftLights"] = nightshift_lights
|
||||
@@ -929,7 +929,7 @@
|
||||
return 1
|
||||
|
||||
autoflag = 5
|
||||
if(istype(user, /mob/living/silicon))
|
||||
if(issilicon(user))
|
||||
var/mob/living/silicon/ai/AI = user
|
||||
var/mob/living/silicon/robot/robot = user
|
||||
if( \
|
||||
@@ -944,7 +944,7 @@
|
||||
to_chat(user, "<span class='danger'>\The [src] has AI control disabled!</span>")
|
||||
return FALSE
|
||||
else
|
||||
if((!in_range(src, user) || !istype(loc, /turf)))
|
||||
if((!in_range(src, user) || !isturf(loc)))
|
||||
return FALSE
|
||||
|
||||
var/mob/living/carbon/human/H = user
|
||||
|
||||
@@ -336,9 +336,9 @@
|
||||
var/list/data = list()
|
||||
|
||||
data["active"] = active
|
||||
if(istype(user, /mob/living/silicon/ai))
|
||||
if(isAI(user))
|
||||
data["is_ai"] = TRUE
|
||||
else if(istype(user, /mob/living/silicon/robot) && !Adjacent(user))
|
||||
else if(isrobot(user) && !Adjacent(user))
|
||||
data["is_ai"] = TRUE
|
||||
else
|
||||
data["is_ai"] = FALSE
|
||||
|
||||
@@ -308,7 +308,7 @@
|
||||
return FALSE //to avoid spamming with insulated glvoes on
|
||||
|
||||
var/area/source_area
|
||||
if(istype(power_source, /area))
|
||||
if(isarea(power_source))
|
||||
source_area = power_source
|
||||
power_source = source_area.get_apc()
|
||||
if(istype(power_source, /obj/structure/cable))
|
||||
|
||||
@@ -250,7 +250,7 @@
|
||||
|
||||
/obj/machinery/particle_accelerator/control_box/interact(mob/user)
|
||||
if(((get_dist(src, user) > 1) && !isobserver(user)) || (stat & (BROKEN|NOPOWER)))
|
||||
if(!istype(user, /mob/living/silicon))
|
||||
if(!issilicon(user))
|
||||
user.unset_machine()
|
||||
user << browse(null, "window=pacontrol")
|
||||
return
|
||||
|
||||
@@ -317,7 +317,7 @@
|
||||
|
||||
/obj/machinery/power/turbine/interact(mob/user)
|
||||
|
||||
if( !Adjacent(user) || (stat & (NOPOWER|BROKEN)) && (!istype(user, /mob/living/silicon)) )
|
||||
if( !Adjacent(user) || (stat & (NOPOWER|BROKEN)) && (!issilicon(user)) )
|
||||
user.unset_machine(src)
|
||||
user << browse(null, "window=turbine")
|
||||
return
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
light_color = LIGHT_COLOR_DARKBLUE
|
||||
|
||||
/obj/item/projectile/beam/pulse/on_hit(atom/target, blocked = 0)
|
||||
if(istype(target,/turf/) || isstructure(target))
|
||||
if(isturf(target) || isstructure(target))
|
||||
target.ex_act(2)
|
||||
..()
|
||||
|
||||
|
||||
@@ -275,7 +275,7 @@
|
||||
|
||||
/obj/item/projectile/ornament/on_hit(atom/target) //knockback
|
||||
..()
|
||||
if(istype(target, /turf))
|
||||
if(isturf(target))
|
||||
return 0
|
||||
var/obj/T = target
|
||||
var/throwdir = get_dir(firer,target)
|
||||
|
||||
@@ -1059,7 +1059,7 @@
|
||||
var/mob/living/carbon/C = M
|
||||
if(!C.wear_mask) // If not wearing a mask
|
||||
C.adjustToxLoss(lethality)
|
||||
if(istype(M, /mob/living/simple_animal/diona)) //nymphs take EVEN MORE damage
|
||||
if(isnymph(M)) //nymphs take EVEN MORE damage
|
||||
var/mob/living/simple_animal/diona/D = M
|
||||
D.adjustHealth(100)
|
||||
..()
|
||||
|
||||
@@ -169,9 +169,10 @@
|
||||
// mouse drop another mob or self
|
||||
//
|
||||
/obj/machinery/disposal/MouseDrop_T(mob/living/target, mob/living/user)
|
||||
if(!istype(target) || target.buckled || target.has_buckled_mobs() || get_dist(user, src) > 1 || get_dist(user, target) > 1 || user.stat || istype(user, /mob/living/silicon/ai))
|
||||
if(!istype(target) || target.buckled || target.has_buckled_mobs() || get_dist(user, src) > 1 || get_dist(user, target) > 1 || user.stat || isAI(user))
|
||||
return
|
||||
if(isanimal(user) && target != user) return //animals cannot put mobs other than themselves into disposal
|
||||
if(isanimal(user) && target != user)
|
||||
return //animals cannot put mobs other than themselves into disposal
|
||||
src.add_fingerprint(user)
|
||||
var/target_loc = target.loc
|
||||
var/msg
|
||||
@@ -286,7 +287,7 @@
|
||||
if(src.flushing)
|
||||
return
|
||||
|
||||
if(istype(src.loc, /turf))
|
||||
if(isturf(src.loc))
|
||||
if(action == "pumpOn")
|
||||
mode = 1
|
||||
update()
|
||||
@@ -472,7 +473,7 @@
|
||||
|
||||
AM.forceMove(loc)
|
||||
AM.pipe_eject(0)
|
||||
if(!istype(AM, /mob/living/silicon/robot/drone) && !istype(AM, /mob/living/silicon/robot/syndicate/saboteur)) //Poor drones kept smashing windows and taking system damage being fired out of disposals. ~Z
|
||||
if(!isdrone(AM) && !istype(AM, /mob/living/silicon/robot/syndicate/saboteur)) //Poor drones kept smashing windows and taking system damage being fired out of disposals. ~Z
|
||||
spawn(1)
|
||||
if(AM)
|
||||
AM.throw_at(target, 5, 1)
|
||||
@@ -539,7 +540,7 @@
|
||||
//Check for any living mobs trigger hasmob.
|
||||
//hasmob effects whether the package goes to cargo or its tagged destination.
|
||||
for(var/mob/living/M in D)
|
||||
if(M && M.stat != 2 && !istype(M, /mob/living/silicon/robot/drone) && !istype(M, /mob/living/silicon/robot/syndicate/saboteur))
|
||||
if(M && M.stat != 2 && !isdrone(M) && !istype(M, /mob/living/silicon/robot/syndicate/saboteur))
|
||||
hasmob = 1
|
||||
|
||||
//Checks 1 contents level deep. This means that players can be sent through disposals...
|
||||
@@ -547,7 +548,7 @@
|
||||
for(var/obj/O in D)
|
||||
if(O.contents)
|
||||
for(var/mob/living/M in O.contents)
|
||||
if(M && M.stat != 2 && !istype(M,/mob/living/silicon/robot/drone) && !istype(M, /mob/living/silicon/robot/syndicate/saboteur))
|
||||
if(M && M.stat != 2 && !isdrone(M) && !istype(M, /mob/living/silicon/robot/syndicate/saboteur))
|
||||
hasmob = 1
|
||||
|
||||
// now everything inside the disposal gets put into the holder
|
||||
@@ -566,7 +567,7 @@
|
||||
var/obj/item/smallDelivery/T = AM
|
||||
destinationTag = T.sortTag
|
||||
//Drones can mail themselves through maint.
|
||||
if(istype(AM, /mob/living/silicon/robot/drone))
|
||||
if(isdrone(AM))
|
||||
var/mob/living/silicon/robot/drone/drone = AM
|
||||
destinationTag = drone.mail_destination
|
||||
if(istype(AM, /mob/living/silicon/robot/syndicate/saboteur))
|
||||
@@ -1319,7 +1320,7 @@
|
||||
for(var/atom/movable/AM in contents)
|
||||
AM.forceMove(loc)
|
||||
AM.pipe_eject(dir)
|
||||
if(istype(AM,/mob/living/silicon/robot/drone) || istype(AM, /mob/living/silicon/robot/syndicate/saboteur)) //Drones keep smashing windows from being fired out of chutes. Bad for the station. ~Z
|
||||
if(isdrone(AM) || istype(AM, /mob/living/silicon/robot/syndicate/saboteur)) //Drones keep smashing windows from being fired out of chutes. Bad for the station. ~Z
|
||||
return
|
||||
spawn(5)
|
||||
if(QDELETED(AM))
|
||||
|
||||
@@ -313,7 +313,7 @@
|
||||
if(isobj(AM))
|
||||
var/obj/O = AM
|
||||
O.loc = src
|
||||
else if(istype(AM, /mob))
|
||||
else if(ismob(AM))
|
||||
var/mob/M = AM
|
||||
M.loc = src
|
||||
flush()
|
||||
|
||||
@@ -481,7 +481,7 @@
|
||||
continue
|
||||
M.notransform = TRUE
|
||||
M.anchored = TRUE
|
||||
if(istype(M, /mob/living/simple_animal/hostile))
|
||||
if(ishostile(M))
|
||||
var/mob/living/simple_animal/hostile/H = M
|
||||
H.AIStatus = AI_OFF
|
||||
H.LoseTarget()
|
||||
@@ -509,7 +509,7 @@
|
||||
/obj/effect/timestop/proc/unfreeze_mob(mob/living/M)
|
||||
M.notransform = FALSE
|
||||
M.anchored = FALSE
|
||||
if(istype(M, /mob/living/simple_animal/hostile))
|
||||
if(ishostile(M))
|
||||
var/mob/living/simple_animal/hostile/H = M
|
||||
H.AIStatus = initial(H.AIStatus)
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
C.set_occupied(FALSE)
|
||||
for(var/turf/T in block(locate(C.x, C.y, C.zpos), locate(C.x+C.width-1, C.y+C.height-1, C.zpos)))
|
||||
for(var/atom/movable/M in T)
|
||||
if(istype(M, /mob/dead/observer))
|
||||
if(isobserver(M))
|
||||
continue
|
||||
M.loc = null
|
||||
qdel(M, TRUE)
|
||||
|
||||
@@ -360,7 +360,7 @@
|
||||
target = options[V]
|
||||
|
||||
/obj/machinery/computer/bsa_control/proc/get_target_name()
|
||||
if(istype(target,/area))
|
||||
if(isarea(target))
|
||||
var/area/A = target
|
||||
return A.name
|
||||
else if(istype(target,/obj/item/gps))
|
||||
@@ -368,7 +368,7 @@
|
||||
return G.gpstag
|
||||
|
||||
/obj/machinery/computer/bsa_control/proc/get_impact_turf()
|
||||
if(istype(target,/area))
|
||||
if(isarea(target))
|
||||
return pick(get_area_turfs(target))
|
||||
else if(istype(target,/obj/item/gps))
|
||||
return get_turf(target)
|
||||
|
||||
@@ -547,7 +547,7 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
src.transform = M
|
||||
if(!clean)
|
||||
// Throw limb around.
|
||||
if(src && istype(loc,/turf))
|
||||
if(src && isturf(loc))
|
||||
dropped_part.throw_at(get_edge_target_turf(src,pick(GLOB.alldirs)),rand(1,3),30)
|
||||
dir = 2
|
||||
brute_dam = 0
|
||||
|
||||
@@ -468,7 +468,7 @@
|
||||
* * tool - The tool performing the operation.
|
||||
*/
|
||||
/proc/spread_germs_by_incision(obj/item/organ/external/E, obj/item/tool)
|
||||
if(!istype(E, /obj/item/organ/external))
|
||||
if(!isorgan(E))
|
||||
return
|
||||
|
||||
var/germs = 0
|
||||
|
||||
Reference in New Issue
Block a user