mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-29 23:17:02 +01:00
Defining Part 4 - Code cleanup toward defines (... and the rest) (#19388)
* I wasn't done * nits
This commit is contained in:
@@ -2,14 +2,39 @@
|
||||
#define isatom(A) (isloc(A))
|
||||
|
||||
// Mobs
|
||||
|
||||
//#define ismob(A, B, C...) BYOND proc, can test multiple arguments and only return TRUE if all are mobs
|
||||
|
||||
#define isliving(A) (istype(A, /mob/living))
|
||||
|
||||
#define isbrain(A) (istype(A, /mob/living/carbon/brain))
|
||||
|
||||
// Carbon mobs
|
||||
#define iscarbon(A) (istype(A, /mob/living/carbon))
|
||||
|
||||
#define ishuman(A) (istype(A, /mob/living/carbon/human))
|
||||
|
||||
#define isalien(A) (istype(A, /mob/living/carbon/alien))
|
||||
|
||||
#define islarva(A) (istype(A, /mob/living/carbon/alien/larva))
|
||||
|
||||
#define isalienadult(A) (istype(A, /mob/living/carbon/alien/humanoid))
|
||||
|
||||
#define isalienhunter(A) (istype(A, /mob/living/carbon/alien/humanoid/hunter))
|
||||
|
||||
#define isaliensentinel(A) (istype(A, /mob/living/carbon/alien/humanoid/sentinel))
|
||||
|
||||
// Simple animals
|
||||
|
||||
#define ismegafauna(A) istype(A, /mob/living/simple_animal/hostile/megafauna)
|
||||
|
||||
//Simple animals
|
||||
#define isshade(A) (istype(A, /mob/living/simple_animal/shade))
|
||||
|
||||
#define isconstruct(A) (istype(A, /mob/living/simple_animal/hostile/construct))
|
||||
|
||||
//Objects
|
||||
#define isslime(A) (istype((A), /mob/living/simple_animal/slime))
|
||||
|
||||
// Objects
|
||||
#define isobj(A) istype(A, /obj) //override the byond proc because it returns true on children of /atom/movable that aren't objs
|
||||
|
||||
#define isitem(A) (istype(A, /obj/item))
|
||||
@@ -44,7 +69,10 @@ GLOBAL_LIST_INIT(glass_sheet_types, typecacheof(list(
|
||||
|
||||
#define is_glass_sheet(O) (is_type_in_typecache(O, GLOB.glass_sheet_types))
|
||||
|
||||
//Turfs
|
||||
// Turfs
|
||||
|
||||
//#define isturf(A, B, C...) BYOND proc, can test multiple arguments and only return TRUE if all are turfs
|
||||
|
||||
#define issimulatedturf(A) istype(A, /turf/simulated)
|
||||
|
||||
#define isspaceturf(A) istype(A, /turf/space)
|
||||
@@ -63,30 +91,10 @@ GLOBAL_LIST_INIT(glass_sheet_types, typecacheof(list(
|
||||
|
||||
#define ischasm(A) (istype(A, /turf/simulated/floor/chasm))
|
||||
|
||||
//Mobs
|
||||
#define isliving(A) (istype(A, /mob/living))
|
||||
// Areas
|
||||
//#define isarea(A, B, C...) BYOND proc, can test multiple arguments and only return TRUE if all are areas
|
||||
|
||||
#define isbrain(A) (istype(A, /mob/living/carbon/brain))
|
||||
|
||||
//Carbon mobs
|
||||
#define iscarbon(A) (istype(A, /mob/living/carbon))
|
||||
|
||||
#define ishuman(A) (istype(A, /mob/living/carbon/human))
|
||||
|
||||
//more carbon mobs
|
||||
#define isalien(A) (istype(A, /mob/living/carbon/alien))
|
||||
|
||||
#define islarva(A) (istype(A, /mob/living/carbon/alien/larva))
|
||||
|
||||
#define isalienadult(A) (istype(A, /mob/living/carbon/alien/humanoid))
|
||||
|
||||
#define isalienhunter(A) (istype(A, /mob/living/carbon/alien/humanoid/hunter))
|
||||
|
||||
#define isaliensentinel(A) (istype(A, /mob/living/carbon/alien/humanoid/sentinel))
|
||||
|
||||
#define isslime(A) (istype((A), /mob/living/simple_animal/slime))
|
||||
|
||||
//Structures
|
||||
// Structures
|
||||
#define isstructure(A) (istype((A), /obj/structure))
|
||||
|
||||
// Misc
|
||||
|
||||
@@ -182,7 +182,7 @@ GLOBAL_PROTECT(log_end)
|
||||
/proc/datum_info_line(datum/d)
|
||||
if(!istype(d))
|
||||
return
|
||||
if(!istype(d, /mob))
|
||||
if(!ismob(d))
|
||||
return "[d] ([d.type])"
|
||||
var/mob/m = d
|
||||
return "[m] ([m.ckey]) ([m.type])"
|
||||
|
||||
@@ -229,7 +229,7 @@
|
||||
var/turf/ear = get_turf(M)
|
||||
if(ear)
|
||||
// Ghostship is magic: Ghosts can hear radio chatter from anywhere
|
||||
if(speaker_coverage[ear] || (istype(M, /mob/dead/observer) && M.get_preference(PREFTOGGLE_CHAT_GHOSTRADIO)))
|
||||
if(speaker_coverage[ear] || (isobserver(M) && M.get_preference(PREFTOGGLE_CHAT_GHOSTRADIO)))
|
||||
. |= M // Since we're already looping through mobs, why bother using |= ? This only slows things down.
|
||||
return .
|
||||
|
||||
|
||||
@@ -292,7 +292,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
var/select = null
|
||||
var/list/borgs = list()
|
||||
for(var/mob/living/silicon/robot/A in GLOB.player_list)
|
||||
if(A.stat == 2 || A.connected_ai || A.scrambledcodes || istype(A,/mob/living/silicon/robot/drone))
|
||||
if(A.stat == 2 || A.connected_ai || A.scrambledcodes || isdrone(A))
|
||||
continue
|
||||
var/name = "[A.real_name] ([A.modtype] [A.braintype])"
|
||||
borgs[name] = A
|
||||
@@ -376,7 +376,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
if(M.real_name && M.real_name != M.name)
|
||||
name += " \[[M.real_name]\]"
|
||||
if(M.stat == DEAD)
|
||||
if(istype(M, /mob/dead/observer/))
|
||||
if(isobserver(M))
|
||||
name += " \[ghost\]"
|
||||
else
|
||||
name += " \[dead\]"
|
||||
@@ -1847,7 +1847,7 @@ GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new)
|
||||
if(M.real_name && M.real_name != M.name)
|
||||
name += " \[[M.real_name]\]"
|
||||
if(M.stat == DEAD)
|
||||
if(istype(M, /mob/dead/observer/))
|
||||
if(isobserver(M))
|
||||
name += " \[ghost\]"
|
||||
else
|
||||
name += " \[dead\]"
|
||||
|
||||
@@ -111,7 +111,7 @@
|
||||
|
||||
//Middle click points
|
||||
/mob/living/silicon/robot/MiddleClickOn(atom/A)
|
||||
if(istype(src, /mob/living/silicon/robot/drone))
|
||||
if(isdrone(src))
|
||||
// Drones cannot point.
|
||||
return
|
||||
pointed(A)
|
||||
|
||||
@@ -187,7 +187,7 @@ SUBSYSTEM_DEF(shuttle)
|
||||
var/callShuttle = 1
|
||||
|
||||
for(var/thing in GLOB.shuttle_caller_list)
|
||||
if(istype(thing, /mob/living/silicon/ai))
|
||||
if(isAI(thing))
|
||||
var/mob/living/silicon/ai/AI = thing
|
||||
if(AI.stat || !AI.client)
|
||||
continue
|
||||
|
||||
@@ -521,7 +521,7 @@ SUBSYSTEM_DEF(ticker)
|
||||
|
||||
for(var/mob/living/silicon/robot/robo in GLOB.mob_list)
|
||||
|
||||
if(istype(robo,/mob/living/silicon/robot/drone))
|
||||
if(isdrone(robo))
|
||||
dronecount++
|
||||
continue
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
if(!M.anchored && (M.flags & CONDUCT))
|
||||
step_towards(M,affected_mob)
|
||||
for(var/mob/living/silicon/S in orange(2,affected_mob))
|
||||
if(istype(S, /mob/living/silicon/ai)) continue
|
||||
if(isAI(S)) continue
|
||||
step_towards(S,affected_mob)
|
||||
if(3)
|
||||
if(prob(2))
|
||||
@@ -37,7 +37,7 @@
|
||||
for(i=0,i<iter,i++)
|
||||
step_towards(M,affected_mob)
|
||||
for(var/mob/living/silicon/S in orange(4,affected_mob))
|
||||
if(istype(S, /mob/living/silicon/ai)) continue
|
||||
if(isAI(S)) continue
|
||||
var/i
|
||||
var/iter = rand(1,2)
|
||||
for(i=0,i<iter,i++)
|
||||
@@ -55,7 +55,7 @@
|
||||
for(i=0,i<iter,i++)
|
||||
step_towards(M,affected_mob)
|
||||
for(var/mob/living/silicon/S in orange(6,affected_mob))
|
||||
if(istype(S, /mob/living/silicon/ai)) continue
|
||||
if(isAI(S)) continue
|
||||
var/i
|
||||
var/iter = rand(1,3)
|
||||
for(i=0,i<iter,i++)
|
||||
|
||||
@@ -379,7 +379,7 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell))
|
||||
var/location
|
||||
if(isliving(target))
|
||||
location = target.loc
|
||||
else if(istype(target,/turf))
|
||||
else if(isturf(target))
|
||||
location = target
|
||||
var/obj/effect/overlay/spell = new /obj/effect/overlay(location)
|
||||
spell.icon = overlay_icon
|
||||
@@ -397,7 +397,7 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell))
|
||||
var/location
|
||||
if(isliving(target))
|
||||
location = target.loc
|
||||
else if(istype(target,/turf))
|
||||
else if(isturf(target))
|
||||
location = target
|
||||
if(isliving(target) && message)
|
||||
to_chat(target, text("[message]"))
|
||||
|
||||
@@ -42,7 +42,7 @@ Also, you never added distance checking after target is selected. I've went ahea
|
||||
to_chat(user, "Their mind is resisting your spell.")
|
||||
return
|
||||
|
||||
if(istype(target, /mob/living/silicon))
|
||||
if(issilicon(target))
|
||||
to_chat(user, "You feel this enslaved being is just as dead as its cold, hard exoskeleton.")
|
||||
return
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item))
|
||||
return FALSE
|
||||
|
||||
// If the uplink's holder is in the user's contents
|
||||
if((U.loc in user.contents || (in_range(U.loc, user) && istype(U.loc.loc, /turf))))
|
||||
if((U.loc in user.contents || (in_range(U.loc, user) && isturf(U.loc.loc))))
|
||||
if(cost > U.uses)
|
||||
return FALSE
|
||||
|
||||
|
||||
@@ -40,9 +40,9 @@
|
||||
. = ..()
|
||||
if(.) //If true the mob is already affected, no need to keep processing
|
||||
return TRUE
|
||||
if(istype(L, /mob/living/simple_animal)) //while this might break immersion, I don't want to spam the server with calling this on simplemobs
|
||||
if(isanimal(L)) //while this might break immersion, I don't want to spam the server with calling this on simplemobs
|
||||
return FALSE
|
||||
if(istype(L, /mob/living/silicon/robot/drone)) //same with poor maint drones who just wanna have fun
|
||||
if(isdrone(L)) //same with poor maint drones who just wanna have fun
|
||||
return FALSE
|
||||
for(var/turf/T in oview(get_turf(L)))
|
||||
if(isspaceturf(T) || istransparentturf(T))
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
/datum/wires/vending/interactable(mob/user)
|
||||
var/obj/machinery/vending/V = holder
|
||||
if(!istype(user, /mob/living/silicon) && V.seconds_electrified && V.shock(user, 100))
|
||||
if(!issilicon(user) && V.seconds_electrified && V.shock(user, 100))
|
||||
return FALSE
|
||||
if(V.panel_open)
|
||||
return TRUE
|
||||
|
||||
@@ -492,8 +492,8 @@
|
||||
var/area/newarea
|
||||
var/area/oldarea
|
||||
|
||||
if(istype(A,/mob))
|
||||
var/mob/M=A
|
||||
if(ismob(A))
|
||||
var/mob/M = A
|
||||
|
||||
if(!M.lastarea)
|
||||
M.lastarea = get_area(M)
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
return TRUE
|
||||
|
||||
/datum/atom_hud/data/human/medical/basic/add_to_single_hud(mob/M, mob/living/carbon/H)
|
||||
if(check_sensors(H) || istype(M,/mob/dead/observer) )
|
||||
if(check_sensors(H) || isobserver(M) )
|
||||
..()
|
||||
|
||||
/datum/atom_hud/data/human/medical/basic/proc/update_suit_sensors(mob/living/carbon/H)
|
||||
|
||||
@@ -185,13 +185,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'>[src] is already occupied!</span>")
|
||||
@@ -508,7 +508,7 @@
|
||||
/obj/machinery/computer/scan_consolenew/ui_act(action, params)
|
||||
if(..())
|
||||
return FALSE // don't update uis
|
||||
if(!istype(usr.loc, /turf))
|
||||
if(!isturf(usr.loc))
|
||||
return FALSE // don't update uis
|
||||
if(!src || !connected)
|
||||
return FALSE // don't update uis
|
||||
|
||||
@@ -405,7 +405,7 @@
|
||||
if(!H.bodyparts_by_name[name])
|
||||
continue
|
||||
affecting = H.bodyparts_by_name[name]
|
||||
if(!istype(affecting, /obj/item/organ/external))
|
||||
if(!isorgan(affecting))
|
||||
continue
|
||||
affecting.heal_damage(4, 0, updating_health = FALSE)
|
||||
H.UpdateDamageIcon()
|
||||
@@ -491,11 +491,11 @@
|
||||
|
||||
/obj/effect/proc_holder/spell/leap/cast(list/targets, mob/living/user = usr)
|
||||
var/failure = FALSE
|
||||
if(istype(user.loc,/mob/) || IS_HORIZONTAL(user) || user.IsStunned() || user.buckled || user.stat)
|
||||
if(ismob(user.loc) || IS_HORIZONTAL(user) || user.IsStunned() || user.buckled || user.stat)
|
||||
to_chat(user, "<span class='warning'>You can't jump right now!</span>")
|
||||
return
|
||||
|
||||
if(istype(user.loc,/turf/))
|
||||
if(isturf(user.loc))
|
||||
if(user.restrained())//Why being pulled while cuffed prevents you from moving
|
||||
for(var/mob/living/M in range(user, 1))
|
||||
if(M.pulling == user)
|
||||
@@ -747,7 +747,7 @@
|
||||
if(!ishuman(user))
|
||||
return
|
||||
|
||||
if(istype(user.loc,/mob/))
|
||||
if(ismob(user.loc))
|
||||
to_chat(user, "<span class='warning'>You can't change your appearance right now!</span>")
|
||||
return
|
||||
var/mob/living/carbon/human/M = user
|
||||
|
||||
@@ -549,7 +549,7 @@
|
||||
|
||||
/obj/item/shield/mirror/IsReflect()
|
||||
if(prob(reflect_chance))
|
||||
if(istype(loc, /mob))
|
||||
if(ismob(loc))
|
||||
var/mob/user = loc
|
||||
if(user.holy_check())
|
||||
return FALSE
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
if(!istype(user))
|
||||
return
|
||||
to_chat(user, "<span class='danger'>[src] was boobytrapped!</span>")
|
||||
if(istype(spawner, /mob/living/simple_animal/hostile/guardian))
|
||||
if(isguardian(spawner))
|
||||
var/mob/living/simple_animal/hostile/guardian/G = spawner
|
||||
if(user == G.summoner)
|
||||
add_attack_logs(user, stored_obj, "booby trap defused")
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
var/turf/snare_loc = get_turf(loc)
|
||||
if(spawner)
|
||||
to_chat(spawner, "<span class='danger'>[AM] has crossed your surveillance trap at [get_area(snare_loc)].</span>")
|
||||
if(istype(spawner, /mob/living/simple_animal/hostile/guardian))
|
||||
if(isguardian(spawner))
|
||||
var/mob/living/simple_animal/hostile/guardian/G = spawner
|
||||
if(G.summoner)
|
||||
to_chat(G.summoner, "<span class='danger'>[AM] has crossed your surveillance trap at [get_area(snare_loc)].</span>")
|
||||
|
||||
@@ -290,7 +290,7 @@ GLOBAL_LIST_INIT(potential_theft_objectives, (subtypesof(/datum/theft_objective)
|
||||
needs_target = FALSE
|
||||
|
||||
/datum/objective/block/check_completion()
|
||||
if(!istype(owner.current, /mob/living/silicon))
|
||||
if(!issilicon(owner.current))
|
||||
return FALSE
|
||||
if(SSticker.mode.station_was_nuked)
|
||||
return TRUE
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
/datum/theft_objective/ai/check_special_completion(obj/item/aicard/C)
|
||||
if(..())
|
||||
for(var/mob/living/silicon/ai/A in C)
|
||||
if(istype(A, /mob/living/silicon/ai) && A.stat != 2) //See if any AI's are alive inside that card.
|
||||
if(isAI(A) && A.stat != 2) //See if any AI's are alive inside that card.
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
@@ -876,7 +876,7 @@
|
||||
return 1
|
||||
|
||||
var/datum/spellbook_entry/E = null
|
||||
if(loc == H || (in_range(src, H) && istype(loc, /turf)))
|
||||
if(loc == H || (in_range(src, H) && isturf(loc)))
|
||||
H.set_machine(src)
|
||||
if(href_list["buy"])
|
||||
E = entries[text2num(href_list["buy"])]
|
||||
|
||||
@@ -202,7 +202,7 @@
|
||||
occupantData["temperatureSuitability"] = 2
|
||||
else if(occupant.bodytemperature > sp.heat_level_1)
|
||||
occupantData["temperatureSuitability"] = 1
|
||||
else if(istype(occupant, /mob/living/simple_animal))
|
||||
else if(isanimal(occupant))
|
||||
var/mob/living/simple_animal/silly = occupant
|
||||
if(silly.bodytemperature < silly.minbodytemp)
|
||||
occupantData["temperatureSuitability"] = -3
|
||||
@@ -522,13 +522,13 @@
|
||||
return
|
||||
if(!ismob(O)) //humans only
|
||||
return
|
||||
if(istype(O, /mob/living/simple_animal) || istype(O, /mob/living/silicon)) //animals and robots dont fit
|
||||
if(isanimal(O) || issilicon(O)) //animals and robots dont fit
|
||||
return
|
||||
if(!ishuman(user) && !isrobot(user)) //No ghosts or mice putting people into the sleeper
|
||||
return
|
||||
if(!user.loc) // 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(panel_open)
|
||||
to_chat(user, "<span class='boldnotice'>Close the maintenance panel first.</span>")
|
||||
|
||||
@@ -174,7 +174,7 @@
|
||||
to_chat(U, "You hold \the [itemname] up to the camera ...")
|
||||
U.changeNext_move(CLICK_CD_MELEE)
|
||||
for(var/mob/O in GLOB.player_list)
|
||||
if(istype(O, /mob/living/silicon/ai))
|
||||
if(isAI(O))
|
||||
var/mob/living/silicon/ai/AI = O
|
||||
if(AI.control_disabled || (AI.stat == DEAD))
|
||||
return
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
occupantData["temperatureSuitability"] = 2
|
||||
else if(occupant.bodytemperature > sp.heat_level_1)
|
||||
occupantData["temperatureSuitability"] = 1
|
||||
else if(istype(occupant, /mob/living/simple_animal))
|
||||
else if(isanimal(occupant))
|
||||
var/mob/living/simple_animal/silly = occupant
|
||||
if(silly.bodytemperature < silly.minbodytemp)
|
||||
occupantData["temperatureSuitability"] = -3
|
||||
|
||||
@@ -165,7 +165,8 @@
|
||||
|
||||
/obj/machinery/computer/attack_hand(mob/user)
|
||||
/* Observers can view computers, but not actually use them via Topic*/
|
||||
if(istype(user, /mob/dead/observer)) return 0
|
||||
if(isobserver(user))
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/obj/machinery/computer/screwdriver_act(mob/user, obj/item/I)
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
set category = "Object"
|
||||
set name = "Access Computer's Internals"
|
||||
set src in oview(1)
|
||||
if(get_dist(src, usr) > 1 || HAS_TRAIT(usr, TRAIT_HANDS_BLOCKED) || usr.stat || istype(usr, /mob/living/silicon))
|
||||
if(get_dist(src, usr) > 1 || HAS_TRAIT(usr, TRAIT_HANDS_BLOCKED) || usr.stat || issilicon(usr))
|
||||
return
|
||||
|
||||
opened = !opened
|
||||
|
||||
@@ -133,7 +133,7 @@
|
||||
else
|
||||
for(var/n = ++i; n <= optioncount; n++)
|
||||
dat += "<dd><font color='blue'>	[n]. ---------------</font><br></dd>"
|
||||
if((istype(user, /mob/living/silicon/ai) || istype(user, /mob/living/silicon/robot)) && (user.mind.special_role && user.mind.is_original_mob(user)))
|
||||
if((isAI(user) || isrobot(user)) && (user.mind.special_role && user.mind.is_original_mob(user)))
|
||||
//Malf/Traitor AIs can bruteforce into the system to gain the Key.
|
||||
dat += "<dd><A href='?src=[UID()];hack=1'><i><font color='Red'>*&@#. Bruteforce Key</font></i></font></a><br></dd>"
|
||||
else
|
||||
@@ -163,7 +163,7 @@
|
||||
dat += "</table>"
|
||||
//Hacking screen.
|
||||
if(2)
|
||||
if(istype(user, /mob/living/silicon/ai) || istype(user, /mob/living/silicon/robot))
|
||||
if(isAI(user) || isrobot(user))
|
||||
dat += "Brute-forcing for server key.<br> It will take 20 seconds for every character that the password has."
|
||||
dat += "In the meantime, this console can reveal your true intentions if you let someone access it. Make sure no humans enter the room during that time."
|
||||
else
|
||||
@@ -279,7 +279,7 @@
|
||||
/obj/machinery/computer/message_monitor/Topic(href, href_list)
|
||||
if(..(href, href_list))
|
||||
return 1
|
||||
if((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
|
||||
if((usr.contents.Find(src) || (in_range(src, usr) && isturf(src.loc))) || (issilicon(usr)))
|
||||
//Authenticate
|
||||
if(href_list["auth"])
|
||||
if(auth)
|
||||
@@ -353,7 +353,7 @@
|
||||
|
||||
//Hack the Console to get the password
|
||||
if(href_list["hack"])
|
||||
if((istype(usr, /mob/living/silicon/ai) || istype(usr, /mob/living/silicon/robot)) && (usr.mind.special_role && usr.mind.is_original_mob(usr)))
|
||||
if((isAI(usr) || isrobot(usr)) && (usr.mind.special_role && usr.mind.is_original_mob(usr)))
|
||||
src.hacking = 1
|
||||
src.screen = 2
|
||||
src.icon_screen = hack_icon
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
/obj/machinery/computer/robotics/proc/console_shows(mob/living/silicon/robot/R)
|
||||
if(!istype(R))
|
||||
return FALSE
|
||||
if(istype(R, /mob/living/silicon/robot/drone))
|
||||
if(isdrone(R))
|
||||
return FALSE
|
||||
if(R.scrambledcodes)
|
||||
return FALSE
|
||||
@@ -174,7 +174,7 @@
|
||||
message_admins("<span class='notice'>[key_name_admin(usr)] detonated all cyborgs!</span>")
|
||||
log_game("\<span class='notice'>[key_name(usr)] detonated all cyborgs!</span>")
|
||||
for(var/mob/living/silicon/robot/R in GLOB.mob_list)
|
||||
if(istype(R, /mob/living/silicon/robot/drone))
|
||||
if(isdrone(R))
|
||||
continue
|
||||
// Ignore antagonistic cyborgs
|
||||
if(R.scrambledcodes)
|
||||
|
||||
@@ -513,7 +513,7 @@
|
||||
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 pod is already occupied!</span>")
|
||||
|
||||
@@ -328,7 +328,7 @@ GLOBAL_LIST_EMPTY(holopads)
|
||||
if(QDELETED(user) || user.incapacitated() || !user.client)
|
||||
return FALSE
|
||||
|
||||
if(istype(user, /mob/living/silicon/ai))
|
||||
if(isAI(user))
|
||||
var/mob/living/silicon/ai/AI = user
|
||||
if(!AI.current)
|
||||
return FALSE
|
||||
|
||||
@@ -159,7 +159,7 @@
|
||||
step_towards(M, center)
|
||||
|
||||
for(var/mob/living/silicon/S in orange(magnetic_field, center))
|
||||
if(istype(S, /mob/living/silicon/ai)) continue
|
||||
if(isAI(S)) continue
|
||||
step_towards(S, center)
|
||||
|
||||
use_power(electricity_level * 5)
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
/obj/machinery/space_heater/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
if((in_range(src, usr) && istype(src.loc, /turf)) || (istype(usr, /mob/living/silicon)))
|
||||
if((in_range(src, usr) && isturf(src.loc)) || (issilicon(usr)))
|
||||
usr.set_machine(src)
|
||||
|
||||
switch(href_list["op"])
|
||||
|
||||
@@ -296,9 +296,9 @@
|
||||
/proc/find_loc(obj/R as obj)
|
||||
if(!R) return null
|
||||
var/turf/T = R.loc
|
||||
while(!istype(T, /turf))
|
||||
while(!isturf(T))
|
||||
T = T.loc
|
||||
if(!T || istype(T, /area)) return null
|
||||
if(!T || isarea(T)) return null
|
||||
return T
|
||||
|
||||
/obj/machinery/teleport
|
||||
@@ -313,9 +313,9 @@
|
||||
Prevents AI from using the teleporter, prints out failure messages for clarity
|
||||
*/
|
||||
/obj/machinery/teleport/proc/blockAI(atom/A)
|
||||
if(istype(A, /mob/living/silicon/ai) || istype(A, /obj/structure/AIcore))
|
||||
if(isAI(A) || istype(A, /obj/structure/AIcore))
|
||||
visible_message("<span class='warning'>The teleporter rejects the AI unit.</span>")
|
||||
if(istype(A, /mob/living/silicon/ai))
|
||||
if(isAI(A))
|
||||
var/mob/living/silicon/ai/T = A
|
||||
var/list/TPError = list("<span class='warning'>Firmware instructions dictate you must remain on your assigned station!</span>",
|
||||
"<span class='warning'>You cannot interface with this technology and get rejected!</span>",
|
||||
|
||||
@@ -633,7 +633,7 @@
|
||||
if(!coin)
|
||||
to_chat(usr, "<span class='warning'>There is no coin in this machine.</span>")
|
||||
return
|
||||
if(istype(usr, /mob/living/silicon))
|
||||
if(issilicon(usr))
|
||||
to_chat(usr, "<span class='warning'>You lack hands.</span>")
|
||||
return
|
||||
to_chat(usr, "<span class='notice'>You remove [coin] from [src].</span>")
|
||||
|
||||
@@ -462,7 +462,7 @@
|
||||
if(get_dist(src,A) >= 4)
|
||||
occupant_message("The object is too far away.")
|
||||
return FALSE
|
||||
if(!A.reagents || istype(A,/mob))
|
||||
if(!A.reagents || ismob(A))
|
||||
occupant_message("<span class=\"alert\">No reagent info gained from [A].</span>")
|
||||
return FALSE
|
||||
occupant_message("Analyzing reagents...")
|
||||
|
||||
@@ -221,7 +221,7 @@
|
||||
if(istype(target, /turf/space/transit))//>implying these are ever made -Sieve
|
||||
return
|
||||
|
||||
if(!istype(target, /turf) && !istype(target, /obj/machinery/door/airlock))
|
||||
if(!isturf(target) && !istype(target, /obj/machinery/door/airlock))
|
||||
target = get_turf(target)
|
||||
|
||||
if(!action_checks(target) || get_dist(chassis, target)>3)
|
||||
@@ -313,7 +313,7 @@
|
||||
/obj/item/mecha_parts/mecha_equipment/mimercd/action(atom/target)
|
||||
if(istype(target, /turf/space/transit))//>implying these are ever made -Sieve
|
||||
return
|
||||
if(!istype(target, /turf))
|
||||
if(!isturf(target))
|
||||
target = get_turf(target)
|
||||
if(!action_checks(target) || get_dist(chassis, target)>3)
|
||||
return
|
||||
|
||||
@@ -171,7 +171,7 @@
|
||||
life -= 10
|
||||
if(ismob(A))
|
||||
var/mob/M = A
|
||||
if(istype(firer, /mob))
|
||||
if(ismob(firer))
|
||||
add_attack_logs(firer, M, "Mecha-shot with <b>[src]</b>")
|
||||
else
|
||||
add_attack_logs(src, M, "Mecha-shot with <b>[src]</b> (no firer)")
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
|
||||
/obj/structure/spider/spiderling/process()
|
||||
if(travelling_in_vent)
|
||||
if(istype(loc, /turf))
|
||||
if(isturf(loc))
|
||||
travelling_in_vent = FALSE
|
||||
entry_vent = null
|
||||
else if(entry_vent)
|
||||
@@ -217,7 +217,7 @@
|
||||
return TRUE
|
||||
|
||||
/obj/structure/spider/spiderling/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 [user] into your decompiler. It makes a series of visceral crunching noises.</span>")
|
||||
C.stored_comms["wood"] += 2
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
* cause - The cause of the EMP. Used for the logging
|
||||
*/
|
||||
/proc/empulse(turf/epicenter, heavy_range, light_range, log = FALSE, cause = null)
|
||||
if(!epicenter) return
|
||||
|
||||
if(!istype(epicenter, /turf))
|
||||
if(!epicenter)
|
||||
return
|
||||
if(!isturf(epicenter))
|
||||
epicenter = get_turf(epicenter.loc)
|
||||
|
||||
if(log)
|
||||
|
||||
@@ -190,7 +190,7 @@ GLOBAL_DATUM_INIT(welding_sparks, /mutable_appearance, mutable_appearance('icons
|
||||
set category = null
|
||||
set src in oview(1)
|
||||
|
||||
if(!istype(src.loc, /turf) || usr.stat || usr.restrained() )
|
||||
if(!isturf(src.loc) || usr.stat || usr.restrained() )
|
||||
return
|
||||
|
||||
var/turf/T = src.loc
|
||||
@@ -549,7 +549,7 @@ GLOBAL_DATUM_INIT(welding_sparks, /mutable_appearance, mutable_appearance('icons
|
||||
|
||||
/obj/item/proc/get_loc_turf()
|
||||
var/atom/L = loc
|
||||
while(L && !istype(L, /turf/))
|
||||
while(L && !isturf(L))
|
||||
L = L.loc
|
||||
return loc
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
if(!wax)
|
||||
new/obj/item/trash/candle(src.loc)
|
||||
if(istype(src.loc, /mob))
|
||||
if(ismob(src.loc))
|
||||
var/mob/M = src.loc
|
||||
M.unEquip(src, 1) //src is being deleted anyway
|
||||
qdel(src)
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
if(isliving(loc))
|
||||
var/mob/living/M = loc
|
||||
var/turf/T = M.loc
|
||||
if(istype(T, /turf))
|
||||
if(isturf(T))
|
||||
if(!M.moved_recently && M.last_move)
|
||||
M.moved_recently = 1
|
||||
step(M, M.last_move)
|
||||
|
||||
@@ -407,7 +407,7 @@ GLOBAL_LIST_INIT(default_medbay_channels, list(
|
||||
jobname = "Cyborg"
|
||||
|
||||
// --- Personal AI (pAI) ---
|
||||
else if(istype(M, /mob/living/silicon/pai))
|
||||
else if(ispAI(M))
|
||||
jobname = "Personal AI"
|
||||
|
||||
// --- Unidentifiable mob ---
|
||||
|
||||
@@ -343,7 +343,7 @@ REAGENT SCANNER
|
||||
return
|
||||
|
||||
var/turf/location = user.loc
|
||||
if(!( istype(location, /turf) ))
|
||||
if(!isturf(location))
|
||||
return
|
||||
|
||||
var/datum/gas_mixture/environment = location.return_air()
|
||||
|
||||
@@ -397,7 +397,7 @@
|
||||
/obj/item/robot_parts/head/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
..()
|
||||
if(istype(W, /obj/item/flash))
|
||||
if(istype(user,/mob/living/silicon/robot))
|
||||
if(isrobot(user))
|
||||
to_chat(user, "<span class='warning'>How do you propose to do that?</span>")
|
||||
return
|
||||
else if(flash1 && flash2)
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
/obj/item/stack/nanopaste/attack(mob/living/M as mob, mob/user as mob)
|
||||
if(!istype(M) || !istype(user))
|
||||
return 0
|
||||
if(istype(M,/mob/living/silicon/robot)) //Repairing cyborgs
|
||||
if(isrobot(M)) //Repairing cyborgs
|
||||
var/mob/living/silicon/robot/R = M
|
||||
if(R.getBruteLoss() || R.getFireLoss() )
|
||||
R.heal_overall_damage(15, 15)
|
||||
|
||||
@@ -424,7 +424,7 @@
|
||||
..()
|
||||
playsound(src, 'sound/effects/meteorimpact.ogg', 40, 1)
|
||||
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)
|
||||
qdel(src)
|
||||
|
||||
@@ -833,7 +833,7 @@
|
||||
user.visible_message("<span class='warning'>[user] presses the big red button.</span>", "<span class='notice'>You press the button, it plays a loud noise!</span>", "<span class='notice'>The button clicks loudly.</span>")
|
||||
playsound(src, 'sound/effects/explosionfar.ogg', 50, 0, 0)
|
||||
for(var/mob/M in range(10, src)) // Checks range
|
||||
if(!M.stat && !istype(M, /mob/living/silicon/ai)) // Checks to make sure whoever's getting shaken is alive/not the AI
|
||||
if(!M.stat && !isAI(M)) // Checks to make sure whoever's getting shaken is alive/not the AI
|
||||
sleep(8) // Short delay to match up with the explosion sound
|
||||
shake_camera(M, 2, 1) // Shakes player camera 2 squares for 1 second.
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return null
|
||||
var/turf/location = loc
|
||||
if(istype(location, /mob/))
|
||||
if(ismob(location))
|
||||
var/mob/M = location
|
||||
if(M.l_hand == src || M.r_hand == src)
|
||||
location = M.loc
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
if(!isliving(M))
|
||||
return
|
||||
M.IgniteMob()
|
||||
if(!istype(M, /mob))
|
||||
if(!ismob(M))
|
||||
return
|
||||
|
||||
if(istype(M.wear_mask, /obj/item/clothing/mask/cigarette) && user.zone_selected == "mouth" && lit)
|
||||
|
||||
@@ -186,7 +186,7 @@
|
||||
icon_state = "[initial(icon_state)][contents.len]"
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
if(!istype(M, /mob))
|
||||
if(!ismob(M))
|
||||
return
|
||||
|
||||
if(istype(M) && M == user && user.zone_selected == "mouth" && contents.len > 0 && !user.wear_mask)
|
||||
|
||||
@@ -314,7 +314,7 @@
|
||||
nanofrost_cooldown = 0
|
||||
return
|
||||
if(nozzle_mode == METAL_FOAM)
|
||||
if(!Adj|| !istype(target, /turf))
|
||||
if(!Adj|| !isturf(target))
|
||||
return
|
||||
if(metal_synthesis_cooldown < 5)
|
||||
var/obj/effect/particle_effect/foam/F = new /obj/effect/particle_effect/foam(get_turf(target), 1)
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
if((M.client && M.machine == src))
|
||||
is_in_use = TRUE
|
||||
src.attack_hand(M)
|
||||
if(istype(usr, /mob/living/silicon/ai) || istype(usr, /mob/living/silicon/robot))
|
||||
if(isAI(usr) || isrobot(usr))
|
||||
if(!(usr in nearby))
|
||||
if(usr.client && usr.machine==src) // && M.machine == src is omitted because if we triggered this by using the dialog, it doesn't matter if our machine changed in between triggering it and this - the dialog is probably still supposed to refresh.
|
||||
is_in_use = TRUE
|
||||
|
||||
@@ -131,7 +131,7 @@
|
||||
for(var/mob/M in loc)
|
||||
if(itemcount >= storage_capacity)
|
||||
break
|
||||
if(istype(M, /mob/dead/observer))
|
||||
if(isobserver(M))
|
||||
continue
|
||||
if(istype(M, /mob/living/simple_animal/bot/mulebot))
|
||||
continue
|
||||
@@ -243,7 +243,7 @@
|
||||
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)) // are you in a container/closet/pod/etc?
|
||||
if(!isturf(user.loc)) // are you in a container/closet/pod/etc?
|
||||
return
|
||||
if(!opened)
|
||||
return
|
||||
|
||||
@@ -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
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user