[MIRROR] some istype to macros (#9802)

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-01-05 15:01:49 -07:00
committed by GitHub
parent 73486c399b
commit ed79946ade
409 changed files with 750 additions and 751 deletions

View File

@@ -42,6 +42,7 @@
#define iscorgi(A) istype(A, /mob/living/simple_mob/animal/passive/dog/corgi)
#define isslime(A) istype(A, /mob/living/simple_mob/slime)
#define isxeno(A) istype(A, /mob/living/simple_mob/animal/space/alien)
#define issimplekin(A) istype(A, /mob/living/simple_mob/shadekin)
#define ismetroid(A) istype(A, /mob/living/simple_mob/metroid) //CHOMP Addition
#define iscarbon(A) istype(A, /mob/living/carbon)

View File

@@ -11,7 +11,7 @@
return src
/mob/living/bot/mulebot/get_mob()
if(load && istype(load, /mob/living))
if(load && isliving(load))
return list(src, load)
return src
@@ -182,7 +182,7 @@ Proc for attack log creation, because really why not
//checks whether this item is a module of the robot it is located in.
/proc/is_robot_module(var/obj/item/thing)
if (!thing || !istype(thing.loc, /mob/living/silicon/robot))
if (!thing || !isrobot(thing.loc))
return 0
var/mob/living/silicon/robot/R = thing.loc
return (thing in R.module.modules)

View File

@@ -832,7 +832,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
//Move the mobs unless it's an AI eye or other eye type.
for(var/mob/M in T)
if(istype(M, /mob/observer/eye)) continue // If we need to check for more mobs, I'll add a variable
if(isobserver(M)) continue // If we need to check for more mobs, I'll add a variable
M.loc = X
if(z_level_change) // Same goes for mobs.
@@ -979,7 +979,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
for(var/mob/M in T)
if(!istype(M,/mob) || istype(M, /mob/observer/eye)) continue // If we need to check for more mobs, I'll add a variable
if(!ismob(M) || isobserver(M)) continue // If we need to check for more mobs, I'll add a variable
mobs += M
for(var/mob/M in mobs)

View File

@@ -532,15 +532,15 @@
to_chat(R, "You haven't selected a module yet.")
if("module1")
if(istype(usr, /mob/living/silicon/robot))
if(isrobot(usr))
usr:toggle_module(1)
if("module2")
if(istype(usr, /mob/living/silicon/robot))
if(isrobot(usr))
usr:toggle_module(2)
if("module3")
if(istype(usr, /mob/living/silicon/robot))
if(isrobot(usr))
usr:toggle_module(3)
if("AI Core")

View File

@@ -456,7 +456,7 @@ var/global/datum/controller/subsystem/ticker/ticker
//VOREStation Addition End
if(captainless)
for(var/mob/M in player_list)
if(!istype(M,/mob/new_player))
if(!isnewplayer(M))
to_chat(M, span_notice("Site Management is not forced on anyone."))
@@ -478,7 +478,7 @@ var/global/datum/controller/subsystem/ticker/ticker
else
to_chat(Player, span_filter_system(span_blue(span_bold("You missed the crew transfer after the events on [station_name()] as [Player.real_name]."))))
else
if(istype(Player,/mob/observer/dead))
if(isobserver(Player))
var/mob/observer/dead/O = Player
if(!O.started_as_observer)
to_chat(Player, span_filter_system(span_red(span_bold("You did not survive the events on [station_name()]..."))))

View File

@@ -90,10 +90,10 @@
if("paint")
do_paint(inserted)
temp = "Painted Successfully!"
if(istype(inserted, /mob/living/simple_mob))
if(isanimal(inserted))
var/mob/living/simple_mob/M = inserted
M.has_recoloured = TRUE
if(istype(inserted, /mob/living/silicon/robot))
if(isrobot(inserted))
var/mob/living/silicon/robot/R = inserted
R.has_recoloured = TRUE
Destroy()

View File

@@ -175,7 +175,7 @@ var/bluespace_item_types = newlist(/obj/item/storage/backpack/holding,
bluespace_things |= teleatom.search_contents_for(item)
//VOREStation Addition Start: Prevent taurriding abuse
if(istype(teleatom, /mob/living))
if(isliving(teleatom))
var/mob/living/L = teleatom
if(LAZYLEN(L.buckled_mobs))
for(var/mob/rider in L.buckled_mobs)
@@ -185,7 +185,7 @@ var/bluespace_item_types = newlist(/obj/item/storage/backpack/holding,
if(bluespace_things.len)
precision = max(rand(1,100)*bluespace_things.len,100)
if(istype(teleatom, /mob/living))
if(isliving(teleatom))
var/mob/living/MM = teleatom
to_chat(MM, span_danger("The Bluespace interface on your [teleatom] interferes with the teleport!"))
return 1
@@ -196,7 +196,7 @@ var/bluespace_item_types = newlist(/obj/item/storage/backpack/holding,
return 0
if(!isemptylist(teleatom.search_contents_for(/obj/item/disk/nuclear)))
if(istype(teleatom, /mob/living))
if(isliving(teleatom))
var/mob/living/MM = teleatom
MM.visible_message(span_danger("\The [MM] bounces off of the portal!"),span_warning("Something you are carrying seems to be unable to pass through the portal. Better drop it if you want to go through."))
else
@@ -216,7 +216,7 @@ var/bluespace_item_types = newlist(/obj/item/storage/backpack/holding,
var/obstructed = 0
var/turf/dest_turf = get_turf(destination)
if(local && !(dest_turf.z in using_map.player_levels))
if(istype(teleatom, /mob/living))
if(isliving(teleatom))
to_chat(teleatom, span_warning("The portal refuses to carry you that far away!"))
return 0
else if(istype(destination.loc, /obj/belly))

View File

@@ -142,7 +142,7 @@ GENERAL_PROTECT_DATUM(/datum/managed_browser/feedback_form)
return
my_client.mob << browse(null, "window=[browser_id]") // Closes the window.
if(istype(my_client.mob, /mob/new_player))
if(isnewplayer(my_client.mob))
var/mob/new_player/NP = my_client.mob
NP.new_player_panel_proc() // So the feedback button goes away, if the user gets put on cooldown.
qdel(src)

View File

@@ -231,7 +231,7 @@
var/list/possible_targets = list("Free objective")
for(var/datum/mind/possible_target in ticker.minds)
if ((possible_target != src) && istype(possible_target.current, /mob/living/carbon/human))
if ((possible_target != src) && ishuman(possible_target.current))
possible_targets += possible_target.current
var/mob/def_target = null
@@ -376,7 +376,7 @@
log_admin("[key_name_admin(usr)] has unemag'ed [R].")
if("unemagcyborgs")
if (istype(current, /mob/living/silicon/ai))
if (isAI(current))
var/mob/living/silicon/ai/ai = current
for (var/mob/living/silicon/robot/R in ai.connected_robots)
R.emagged = 0

View File

@@ -26,7 +26,7 @@ var/global/datum/repository/crew/crew_repository = new()
var/turf/pos = get_turf(C)
var/area/B = pos?.loc //VOREStation Add: No sensor in Dorm
if((C.has_sensor) && (pos?.z == zLevel) && (C.sensor_mode != SUIT_SENSOR_OFF) && !(B.flag_check(AREA_BLOCK_SUIT_SENSORS)) && !(is_jammed(C)) && !(is_vore_jammed(C))) //VOREStation Edit
if(istype(C.loc, /mob/living/carbon/human))
if(ishuman(C.loc))
var/mob/living/carbon/human/H = C.loc
if(H.w_uniform != C)
continue

View File

@@ -54,7 +54,7 @@
general.fields["sex"] = I.sex
else
var/mob/living/carbon/human/H
if(istype(user,/mob/living/carbon/human))
if(ishuman(user))
H = user
general.fields["age"] = H.age
else
@@ -106,4 +106,3 @@
var/datum/event_meta/EM = new(EVENT_LEVEL_MUNDANE, "Fake Radiation Storm", add_to_queue = 0)
new/datum/event/radiation_storm/syndicate(EM)
return 1

View File

@@ -54,7 +54,7 @@
/datum/announcement/proc/Message(message as text, message_title as text, var/list/zlevels)
for(var/mob/M in player_list)
if(!istype(M,/mob/new_player) && !isdeaf(M))
if(!isnewplayer(M) && !isdeaf(M))
to_chat(M, "<h2 class='alert'>[title]</h2>")
to_chat(M, span_alert("[message]"))
if (announcer)
@@ -82,7 +82,7 @@
for(var/mob/M in player_list)
if(zlevels && !(get_z(M) in zlevels))
continue
if(!istype(M,/mob/new_player) && !isdeaf(M))
if(!isnewplayer(M) && !isdeaf(M))
to_chat(M, command)
/datum/announcement/priority/Message(var/message as text, var/message_title as text, var/list/zlevels)
@@ -113,7 +113,7 @@
for(var/mob/M in player_list)
if(zlevels && !(M.z in zlevels))
continue
if(!istype(M,/mob/new_player) && !isdeaf(M))
if(!isnewplayer(M) && !isdeaf(M))
M << message_sound
/datum/announcement/proc/Sound(var/message_sound, var/list/zlevels)

View File

@@ -109,7 +109,7 @@
// Note that this is done before jobs are handed out.
candidates = ticker.mode.get_players_for_role(role_type, id, ghosts_only)
for(var/datum/mind/player in candidates)
if(ghosts_only && !istype(player.current, /mob/observer/dead))
if(ghosts_only && !isobserver(player.current))
candidates -= player
log_debug("[key_name(player)] is not eligible to become a [role_text]: Only ghosts may join as this role! They have been removed from the draft.")
else if(CONFIG_GET(flag/use_age_restriction_for_antags) && player.current.client.player_age < minimum_player_age)
@@ -147,7 +147,7 @@
return 0
to_chat(player.current, span_danger(span_italics("You have been selected this round as an antagonist!")))
message_admins("[uppertext(ticker.mode.name)]: Selected [player] as a [role_text].")
if(istype(player.current, /mob/observer/dead))
if(isobserver(player.current))
create_default(player.current)
else
add_antagonist(player,0,0,0,1,1)
@@ -185,7 +185,7 @@
if(player.special_role)
log_debug("[player.key] was selected for [role_text] by lottery, but they already have a special role.")
return 0
if(!(flags & ANTAG_OVERRIDE_JOB) && (!player.current || istype(player.current, /mob/new_player)))
if(!(flags & ANTAG_OVERRIDE_JOB) && (!player.current || isnewplayer(player.current)))
log_debug("[player.key] was selected for [role_text] by lottery, but they have not joined the game.")
return 0

View File

@@ -8,7 +8,7 @@
player.assigned_role = role_text
player.special_role = role_text
if(istype(player.current, /mob/observer/dead))
if(isobserver(player.current))
create_default(player.current)
else
create_antagonist(player, move_to_spawn, do_not_announce, preserve_appearance)

View File

@@ -18,7 +18,7 @@ var/datum/antagonist/mutineer/mutineers
/datum/antagonist/mutineer/can_become_antag(var/datum/mind/player)
if(!..())
return 0
if(!istype(player.current, /mob/living/carbon/human))
if(!ishuman(player.current))
return 0
if(M.special_role)
return 0

View File

@@ -24,7 +24,7 @@ var/datum/antagonist/traitor/infiltrator/infiltrators
// Now for the special headset.
// Humans and the AI.
if(istype(traitor_mob) || istype(traitor_mob, /mob/living/silicon/ai))
if(istype(traitor_mob) || isAI(traitor_mob))
var/obj/item/radio/headset/R
R = locate(/obj/item/radio/headset) in traitor_mob.contents
if(!R)
@@ -50,7 +50,7 @@ var/datum/antagonist/traitor/infiltrator/infiltrators
<b>:t</b>")
// Borgs, because their radio is not a headset for some reason.
if(istype(traitor_mob, /mob/living/silicon/robot))
if(isrobot(traitor_mob))
var/mob/living/silicon/robot/borg = traitor_mob
var/obj/item/encryptionkey/syndicate/encrypt_key = new(null)
if(borg.radio)

View File

@@ -125,7 +125,7 @@
//return flags that should be added to the viewer's sight var.
//Otherwise return a negative number to indicate that the view should be cancelled.
/atom/proc/check_eye(user as mob)
if (istype(user, /mob/living/silicon/ai)) // WHYYYY
if (isAI(user)) // WHYYYY
return 0
return -1

View File

@@ -394,7 +394,7 @@
//called when src is thrown into hit_atom
/atom/movable/proc/throw_impact(atom/hit_atom, var/speed)
if(istype(hit_atom,/mob/living))
if(isliving(hit_atom))
var/mob/living/M = hit_atom
if(M.buckled == src)
return // Don't hit the thing we're buckled to.
@@ -416,7 +416,7 @@
if(src.throwing)
for(var/atom/A in get_turf(src))
if(A == src) continue
if(istype(A,/mob/living))
if(isliving(A))
if(A:lying) continue
if(A.is_incorporeal()) continue // CHOMPEdit - For phased entities
src.throw_impact(A,speed)

View File

@@ -127,7 +127,7 @@
// Simpler. Don't specify UI in order for the mob to use its own.
/mob/proc/UpdateAppearance(var/list/UI=null)
if(istype(src, /mob/living/carbon/human))
if(ishuman(src))
if(UI!=null)
src.dna.UI=UI
src.dna.UpdateUI()

View File

@@ -5,10 +5,10 @@
block=MONKEYBLOCK
/datum/dna/gene/monkey/can_activate(var/mob/M,var/flags)
return istype(M, /mob/living/carbon/human) || istype(M,/mob/living/carbon/monkey)
return ishuman(M) || istype(M,/mob/living/carbon/monkey)
/datum/dna/gene/monkey/activate(var/mob/living/M, var/connected, var/flags)
if(!istype(M,/mob/living/carbon/human))
if(!ishuman(M))
//testing("Cannot monkey-ify [M], type is [M.type].")
return
var/mob/living/carbon/human/H = M

View File

@@ -91,7 +91,7 @@
/obj/item/melee/changeling/process() //Stolen from ninja swords.
if(!creator || loc != creator || !creator.item_is_in_hands(src))
// Tidy up a bit.
if(istype(loc,/mob/living))
if(isliving(loc))
var/mob/living/carbon/human/host = loc
if(istype(host))
for(var/obj/item/organ/external/organ in host.organs)

View File

@@ -15,7 +15,7 @@
set desc = "Turns yourself almost invisible, as long as you move slowly."
if(istype(src,/mob/living/carbon/human))
if(ishuman(src))
var/mob/living/carbon/human/H = src
if(H.mind.changeling.cloaked)

View File

@@ -650,7 +650,7 @@
/obj/item/spell/construct/slam/on_melee_cast(atom/hit_atom, mob/living/user, def_zone)
var/attack_message = "slams"
if(istype(user, /mob/living/simple_mob))
if(isanimal(user))
var/mob/living/simple_mob/S = user
attack_message = pick(S.attacktext)
if(isliving(hit_atom))

View File

@@ -166,7 +166,7 @@
/obj/effect/gateway/active/Crossed(var/atom/A)
if(A.is_incorporeal())
return
if(!istype(A, /mob/living))
if(!isliving(A))
return
var/mob/living/M = A

View File

@@ -298,7 +298,7 @@ var/global/list/rnwords = list("ire","ego","nahlizet","certum","veri","jatkaa","
/obj/item/book/tome/attack(mob/living/M as mob, mob/living/user as mob)
add_attack_logs(user,M,"Hit with [name]")
if(istype(M,/mob/observer/dead))
if(isobserver(M))
var/mob/observer/dead/D = M
D.manifest(user)
return
@@ -449,7 +449,7 @@ var/global/list/rnwords = list("ire","ego","nahlizet","certum","veri","jatkaa","
var/list/runes = list("teleport", "itemport", "tome", "armor", "convert", "tear in reality", "emp", "drain", "seer", "raise", "obscure", "reveal", "astral journey", "manifest", "imbue talisman", "sacrifice", "wall", "freedom", "cultsummon", "deafen", "blind", "bloodboil", "communicate", "stun")
r = input(user, "Choose a rune to scribe", "Rune Scribing") in runes // Remains input() for extreme blocking
var/obj/effect/rune/R = new /obj/effect/rune
if(istype(user, /mob/living/carbon/human))
if(ishuman(user))
var/mob/living/carbon/human/H = user
R.blood_DNA = list()
R.blood_DNA[H.dna.unique_enzymes] = H.dna.b_type

View File

@@ -26,7 +26,7 @@ var/list/sacrificed = list()
allrunesloc[index] = R.loc
if(index >= 5)
to_chat(user, span_danger("You feel pain, as rune disappears in reality shift caused by too much wear of space-time fabric."))
if (istype(user, /mob/living))
if (isliving(user))
user.take_overall_damage(5, 0)
qdel(src)
if(allrunesloc && index != 0)
@@ -59,7 +59,7 @@ var/list/sacrificed = list()
runecount++
if(runecount >= 2)
to_chat(user, span_danger("You feel pain, as rune disappears in reality shift caused by too much wear of space-time fabric."))
if (istype(user, /mob/living))
if (isliving(user))
user.take_overall_damage(5, 0)
qdel(src)
for(var/mob/living/carbon/C in orange(1,src))
@@ -661,7 +661,7 @@ var/list/sacrificed = list()
for(var/mob/H in victims)
var/worth = 0
if(istype(H,/mob/living/carbon/human))
if(ishuman(H))
var/mob/living/carbon/human/lamb = H
if(lamb.species.rarity_value > 3)
worth = 1

View File

@@ -20,7 +20,7 @@
//////////////////////////////Capturing////////////////////////////////////////////////////////
/obj/item/soulstone/attack(mob/living/carbon/human/M as mob, mob/user as mob)
if(!istype(M, /mob/living/carbon/human))//If target is not a human.
if(!ishuman(M))//If target is not a human.
return ..()
if(istype(M, /mob/living/carbon/human/dummy))
return..()

View File

@@ -48,7 +48,7 @@
// Nom.
for(var/atom/movable/A in T)
if(A)
if(istype(A,/mob/living))
if(isliving(A))
qdel(A)
else if(istype(A,/mob)) // Observers, AI cameras.
continue
@@ -98,7 +98,7 @@
/turf/unsimulated/wall/supermatter/Bumped(atom/AM as mob|obj)
if(istype(AM, /mob/living))
if(isliving(AM))
var/mob/living/M = AM
var/datum/gender/T = gender_datums[M.get_visible_gender()]
AM.visible_message(span_warning("\The [AM] slams into \the [src] inducing a resonance... [T.his] body starts to glow and catch flame before flashing into ash."),\

View File

@@ -119,7 +119,7 @@ The access requirements on the Asteroid Shuttles' consoles have now been revoked
/datum/universal_state/supermatter_cascade/proc/PlayerSet()
for(var/datum/mind/M in player_list)
if(!istype(M.current,/mob/living))
if(!isliving(M.current))
continue
if(M.current.stat!=2)
M.current.Weaken(10)

View File

@@ -32,7 +32,7 @@
if(1)
command_alert("Meteors have been detected on collision course with the station.", "Meteor Alert")
for(var/mob/M in player_list)
if(!istype(M,/mob/new_player))
if(!isnewplayer(M))
M << sound('sound/AI/meteors.ogg')
spawn(100)
meteor_wave()
@@ -44,7 +44,7 @@
if(2)
command_alert("Gravitational anomalies detected on the station. There is no additional data.", "Anomaly Alert")
for(var/mob/M in player_list)
if(!istype(M,/mob/new_player))
if(!isnewplayer(M))
M << sound('sound/AI/granomalies.ogg')
var/turf/T = pick(blobstart)
var/obj/effect/bhole/bh = new /obj/effect/bhole( T.loc, 30 )
@@ -148,7 +148,7 @@ var/hadevent = 0
continue
if(isNotStationLevel(T.z))
continue
if(istype(H,/mob/living/carbon/human))
if(ishuman(H))
H.apply_effect((rand(15,75)),IRRADIATE,0)
if (prob(5))
H.apply_effect((rand(90,150)),IRRADIATE,0)

View File

@@ -94,7 +94,7 @@ The "dust" will damage the hull of the station causin minor hull breaches.
spawn(0)
if(prob(50))
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)
if (A)
playsound(src, 'sound/effects/meteorimpact.ogg', 40, 1)

View File

@@ -27,7 +27,7 @@
..()
/obj/item/toy/xmas_cracker/attack(mob/target, mob/user)
if( !cracked && (istype(target,/mob/living/silicon) || (istype(target,/mob/living/carbon/human) && !target.get_active_hand())) && target.stat == CONSCIOUS)
if( !cracked && (issilicon(target) || (ishuman(target) && !target.get_active_hand())) && target.stat == CONSCIOUS)
target.visible_message(span_notice("[user] and [target] pop \an [src]! *pop*"), span_notice("You pull \an [src] with [target]! *pop*"), span_notice("You hear a *pop*."))
var/obj/item/paper/Joke = new /obj/item/paper(user.loc)
Joke.name = "[pick("awful","terrible","unfunny")] joke"

View File

@@ -426,9 +426,9 @@ var/global/list/additional_antag_types = list()
for(var/mob/player in player_list)
if(!player.client)
continue
if(istype(player, /mob/new_player))
if(isnewplayer(player))
continue
if(istype(player, /mob/observer/dead) && !ghosts_only)
if(isobserver(player) && !ghosts_only)
continue
if(!role || (player.client.prefs.be_special & role))
log_debug("[player.key] had [antag_id] enabled, so we are drafting them.")

View File

@@ -133,7 +133,7 @@
/datum/game_mode/meme/check_finished()
var/memes_alive = 0
for(var/datum/mind/meme in memes)
if(!istype(meme.current,/mob/living))
if(!isliving(meme.current))
continue
if(meme.current.stat==2)
continue

View File

@@ -23,7 +23,7 @@
var/list/datum/objective/assassinate/missions = list()
for(var/datum/mind/target in ticker.minds)
if((target != traitor) && istype(target.current, /mob/living/carbon/human))
if((target != traitor) && ishuman(target.current))
if(target && target.current)
var/datum/objective/target_obj = new /datum/objective/assassinate(null,job,target)
missions += target_obj
@@ -34,7 +34,7 @@
var/list/datum/objective/frame/missions = list()
for(var/datum/mind/target in ticker.minds)
if((target != traitor) && istype(target.current, /mob/living/carbon/human))
if((target != traitor) && ishuman(target.current))
if(target && target.current)
var/datum/objective/target_obj = new /datum/objective/frame(null,job,target)
missions += target_obj
@@ -45,7 +45,7 @@
var/list/datum/objective/frame/missions = list()
for(var/datum/mind/target in ticker.minds)
if((target != traitor) && istype(target.current, /mob/living/carbon/human))
if((target != traitor) && ishuman(target.current))
if(target && target.current)
var/datum/objective/target_obj = new /datum/objective/protection(null,job,target)
missions += target_obj
@@ -388,7 +388,7 @@ datum
find_target_by_role(var/role)
for(var/datum/mind/possible_target in ticker.minds)
if((possible_target != owner) && istype(possible_target.current, /mob/living/carbon/human) && (possible_target.assigned_role == role))
if((possible_target != owner) && ishuman(possible_target.current) && (possible_target.assigned_role == role))
target = possible_target
break
@@ -404,7 +404,7 @@ datum
var/list/possible_targets = list()
for(var/datum/mind/possible_target in ticker.minds)
if((possible_target != owner) && istype(possible_target.current, /mob/living/carbon/human))
if((possible_target != owner) && ishuman(possible_target.current))
possible_targets += possible_target
if(possible_targets.len > 0)
@@ -439,7 +439,7 @@ datum
find_target_by_role(var/role)
for(var/datum/mind/possible_target in ticker.minds)
if((possible_target != owner) && istype(possible_target.current, /mob/living/carbon/human) && (possible_target.assigned_role == role))
if((possible_target != owner) && ishuman(possible_target.current) && (possible_target.assigned_role == role))
target = possible_target
break
@@ -1068,7 +1068,7 @@ datum
if(steal_target)
for(var/obj/item/aicard/C in owner.current.get_contents())
for(var/mob/living/silicon/ai/M in C)
if(istype(M, /mob/living/silicon/ai) && M.stat != 2)
if(isAI(M) && M.stat != 2)
return 1
for(var/mob/living/silicon/ai/M in world)
if(istype(M.loc, /turf))
@@ -1336,7 +1336,7 @@ datum
var/current_amount
var/obj/item/rig/S
if(istype(owner.current,/mob/living/carbon/human))
if(ishuman(owner.current))
var/mob/living/carbon/human/H = owner.current
S = H.back
if(!S || !istype(S) || !S.stored_research.len)

View File

@@ -142,7 +142,7 @@ var/global/list/all_objectives = list()
return target
/datum/objective/anti_revolution/demote/check_completion()
if(target && target.current && istype(target,/mob/living/carbon/human))
if(target && target.current && ishuman(target))
var/obj/item/card/id/I = target.current:wear_id
if(istype(I, /obj/item/pda))
var/obj/item/pda/P = I
@@ -389,7 +389,7 @@ var/global/list/all_objectives = list()
if(already_completed)
return 1
if(target && target.current && istype(target.current, /mob/living/carbon/human))
if(target && target.current && ishuman(target.current))
if(target.current.stat == DEAD)
return 0
@@ -518,7 +518,7 @@ var/global/list/all_objectives = list()
for(var/obj/item/aicard/C in all_items) //Check for ai card
for(var/mob/living/silicon/ai/M in C)
if(istype(M, /mob/living/silicon/ai) && M.stat != 2) //See if any AI's are alive inside that card.
if(isAI(M) && M.stat != 2) //See if any AI's are alive inside that card.
return 1
for(var/mob/living/silicon/ai/ai in mob_list)
@@ -558,7 +558,7 @@ var/global/list/all_objectives = list()
var/current_amount
var/obj/item/rig/S
if(istype(owner.current,/mob/living/carbon/human))
if(ishuman(owner.current))
var/mob/living/carbon/human/H = owner.current
S = H.back

View File

@@ -279,7 +279,7 @@ var/list/all_technomancer_assistance = subtypesof(/datum/technomancer/assistance
if(H.stat || H.restrained())
return
if(!istype(H, /mob/living/carbon/human))
if(!ishuman(H))
return 1 //why does this return 1?
if(H != owner)

View File

@@ -116,7 +116,7 @@
summoned_mobs -= A
continue
// Now check for dead mobs who shouldn't be on the list.
if(istype(A, /mob/living))
if(isliving(A))
var/mob/living/L = A
if(L.stat == DEAD)
summoned_mobs -= L

View File

@@ -19,7 +19,7 @@
return 1
if(L.mind && technomancers.is_antagonist(L.mind)) // This should be done better since we might want opposing technomancers later.
return 1
if(istype(L, /mob/living/simple_mob)) // Mind controlled simple mobs count as allies too.
if(isanimal(L)) // Mind controlled simple mobs count as allies too.
var/mob/living/simple_mob/SM = L
if(owner in SM.friends)
return 1
@@ -58,4 +58,4 @@
if(!L.stat) // Don't want to target dead people or SSDs.
chosen_target = L
break
return chosen_target
return chosen_target

View File

@@ -14,12 +14,12 @@
aspect = ASPECT_TELE
/obj/item/spell/abjuration/on_ranged_cast(atom/hit_atom, mob/user)
if(istype(hit_atom, /mob/living) && pay_energy(500) && within_range(hit_atom))
if(isliving(hit_atom) && pay_energy(500) && within_range(hit_atom))
var/mob/living/L = hit_atom
var/mob/living/simple_mob/SM = null
//Bit of a roundabout typecheck, in order to test for two variables from two different mob types in one line.
if(istype(L, /mob/living/simple_mob))
if(isanimal(L))
SM = L
if(L.summoned || (SM && SM.supernatural) )
if(L.client) // Player-controlled mobs are immune to being killed by this.

View File

@@ -47,7 +47,7 @@
add_attack_logs(user,I,"Stolen with [src]")
qdel(src)
//Now let's try to teleport a living mob.
else if(istype(hit_atom, /mob/living))
else if(isliving(hit_atom))
var/mob/living/L = hit_atom
to_chat(L, span_danger("You are teleported towards \the [user]."))
var/datum/effect/effect/system/spark_spread/s1 = new /datum/effect/effect/system/spark_spread

View File

@@ -37,7 +37,7 @@
AI.wander = FALSE
AI.forget_everything()
if(istype(L, /mob/living/simple_mob))
if(isanimal(L))
var/mob/living/simple_mob/SM = L
SM.friends |= src.owner
@@ -55,7 +55,7 @@
AI.wander = initial(AI.wander)
AI.forget_everything()
if(istype(L, /mob/living/simple_mob))
if(isanimal(L))
var/mob/living/simple_mob/SM = L
SM.friends -= owner

View File

@@ -75,7 +75,7 @@
for(var/mob/living/L in view(owner))
// Spiders, carp... bears.
if(istype(L, /mob/living/simple_mob))
if(isanimal(L))
var/mob/living/simple_mob/SM = L
if(!is_ally(SM) && SM.has_AI() && SM.ai_holder.hostile)
hostile_mobs++
@@ -83,13 +83,13 @@
potential_spells |= /obj/item/spell/abjuration
// Always assume borgs are hostile.
if(istype(L, /mob/living/silicon/robot))
if(isrobot(L))
if(!istype(L, /mob/living/silicon/robot/drone)) // Drones are okay, however.
hostile_mobs++
potential_spells |= /obj/item/spell/projectile/ionic_bolt
// Finally we get to humanoids.
if(istype(L, /mob/living/carbon/human))
if(ishuman(L))
var/mob/living/carbon/human/H = L
if(is_ally(H)) // Don't get scared by our apprentice.
continue

View File

@@ -49,11 +49,11 @@
qdel(src)
/obj/item/spell/insert/on_melee_cast(atom/hit_atom, mob/user)
if(istype(hit_atom, /mob/living))
if(isliving(hit_atom))
var/mob/living/L = hit_atom
insert(L,user)
/obj/item/spell/insert/on_ranged_cast(atom/hit_atom, mob/user)
if(istype(hit_atom, /mob/living))
if(isliving(hit_atom))
var/mob/living/L = hit_atom
insert(L,user)

View File

@@ -14,12 +14,12 @@
set_light(spell_light_range, spell_light_intensity, l_color = light_color)
/obj/item/spell/modifier/on_melee_cast(atom/hit_atom, mob/user)
if(istype(hit_atom, /mob/living))
if(isliving(hit_atom))
return on_add_modifier(hit_atom)
return FALSE
/obj/item/spell/modifier/on_ranged_cast(atom/hit_atom, mob/user)
if(istype(hit_atom, /mob/living))
if(isliving(hit_atom))
return on_add_modifier(hit_atom)
return FALSE

View File

@@ -29,7 +29,7 @@
to_chat(user, span_danger("\The [L]'s been dead for too long, even this function cannot replace cloning at this point."))
return 0
to_chat(user, span_notice("You stab \the [L] with a hidden integrated hypo, attempting to bring them back..."))
if(istype(L, /mob/living/simple_mob))
if(isanimal(L))
var/mob/living/simple_mob/SM = L
SM.health = SM.getMaxHealth() / 3
SM.set_stat(CONSCIOUS)

View File

@@ -266,7 +266,7 @@ update_flag
src.add_fingerprint(user)
healthcheck()
if(istype(user, /mob/living/silicon/robot) && istype(W, /obj/item/tank/jetpack))
if(isrobot(user) && istype(W, /obj/item/tank/jetpack))
var/datum/gas_mixture/thejetpack = W:air_contents
var/env_pressure = thejetpack.return_pressure()
var/pressure_delta = min(10*ONE_ATMOSPHERE - env_pressure, (air_contents.return_pressure() - env_pressure)/2)

View File

@@ -79,7 +79,7 @@
/obj/machinery/meter/examine(mob/user)
. = ..()
if(get_dist(user, src) > 3 && !(istype(user, /mob/living/silicon/ai) || istype(user, /mob/observer/dead)))
if(get_dist(user, src) > 3 && !(isAI(user) || isobserver(user)))
. += span_warning("You are too far away to read it.")
else if(stat & (NOPOWER|BROKEN))
@@ -96,7 +96,7 @@
/obj/machinery/meter/Click()
if(istype(usr, /mob/living/carbon/human) || istype(usr, /mob/living/silicon/ai)) // ghosts can call ..() for examine
if(ishuman(usr) || isAI(usr)) // ghosts can call ..() for examine
var/mob/living/L = usr
if(!L.get_active_hand() || !L.Adjacent(src))
usr.examinate(src)

View File

@@ -244,7 +244,7 @@
/obj/machinery/camera/proc/deactivate(user as mob, var/choice = 1)
// The only way for AI to reactivate cameras are malf abilities, this gives them different messages.
if(istype(user, /mob/living/silicon/ai))
if(isAI(user))
user = null
if(choice != 1)
@@ -393,7 +393,7 @@
return 0
/obj/machinery/camera/interact(mob/living/user as mob)
if(!panel_open || istype(user, /mob/living/silicon/ai))
if(!panel_open || isAI(user))
return
if(stat & BROKEN)

View File

@@ -25,7 +25,7 @@
lostTarget(target)
/obj/machinery/camera/proc/newTarget(var/mob/target)
if (istype(target, /mob/living/silicon/ai)) return 0
if (isAI(target)) return 0
if (detectTime == 0)
detectTime = world.time // start the clock
if (!(target in motionTargets))

View File

@@ -119,7 +119,7 @@
else
TB.names.Add(name)
TB.namecounts[name] = 1
if(istype(M, /mob/living/carbon/human))
if(ishuman(M))
TB.humans[name] = M
else
TB.others[name] = M

View File

@@ -100,7 +100,7 @@
update_icon()
/obj/machinery/cell_charger/attack_ai(mob/user)
if(istype(user, /mob/living/silicon/robot) && Adjacent(user)) // Borgs can remove the cell if they are near enough
if(isrobot(user) && Adjacent(user)) // Borgs can remove the cell if they are near enough
if(charging)
user.visible_message("[user] removes [charging] from [src].", "You remove [charging] from [src].")
charging.loc = src.loc

View File

@@ -14,7 +14,7 @@
if((M.stat != 2) || (!M.client))
continue
//They need a brain!
if(istype(M, /mob/living/carbon/human))
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(!H.has_brain())
continue

View File

@@ -500,7 +500,7 @@
if(severity >= 3) //you didn't pray hard enough
to_chat(M, span_warning("An overpowering wave of nausea consumes over you. You hunch over, your stomach's contents preparing for a spectacular exit."))
spawn(30)
if(istype(M,/mob/living/carbon/human))
if(ishuman(M))
var/mob/living/carbon/human/H = M
H.vomit()
if(ORION_TRAIL_FLUX)

View File

@@ -42,13 +42,13 @@
if(scan)
to_chat(usr, "You remove \the [scan] from \the [src].")
scan.forceMove(get_turf(src))
if(!usr.get_active_hand() && istype(usr,/mob/living/carbon/human))
if(!usr.get_active_hand() && ishuman(usr))
usr.put_in_hands(scan)
scan = null
else if(modify)
to_chat(usr, "You remove \the [modify] from \the [src].")
modify.forceMove(get_turf(src))
if(!usr.get_active_hand() && istype(usr,/mob/living/carbon/human))
if(!usr.get_active_hand() && ishuman(usr))
usr.put_in_hands(modify)
modify = null
else

View File

@@ -136,7 +136,7 @@
if(giver)
to_chat(usr, span_notice("You remove \the [giver] from \the [src]."))
giver.loc = get_turf(src)
if(!usr.get_active_hand() && istype(usr,/mob/living/carbon/human))
if(!usr.get_active_hand() && ishuman(usr))
usr.put_in_hands(giver)
else
giver.loc = src.loc

View File

@@ -78,7 +78,7 @@
if(scan)
to_chat(usr, "You remove \the [scan] from \the [src].")
scan.loc = get_turf(src)
if(!usr.get_active_hand() && istype(usr,/mob/living/carbon/human))
if(!usr.get_active_hand() && ishuman(usr))
usr.put_in_hands(scan)
scan = null
else

View File

@@ -146,7 +146,7 @@
sendPDAs["[P.name]"] = "\ref[P]"
data["possibleRecipients"] = sendPDAs
data["isMalfAI"] = ((istype(user, /mob/living/silicon/ai) || istype(user, /mob/living/silicon/robot)) && (user.mind.special_role && user.mind.original == user))
data["isMalfAI"] = ((isAI(user) || isrobot(user)) && (user.mind.special_role && user.mind.original == user))
return data
@@ -211,7 +211,7 @@
temp = noserver
//Hack the Console to get the password
if("hack")
if((istype(ui.user, /mob/living/silicon/ai) || istype(ui.user, /mob/living/silicon/robot)) && (ui.user.mind.special_role && ui.user.mind.original == ui.user))
if((isAI(ui.user) || isrobot(ui.user)) && (ui.user.mind.special_role && ui.user.mind.original == ui.user))
hacking = 1
update_icon()
//Time it takes to bruteforce is dependant on the password length.

View File

@@ -66,7 +66,7 @@
if(scan)
to_chat(usr, "You remove \the [scan] from \the [src].")
scan.loc = get_turf(src)
if(!usr.get_active_hand() && istype(usr,/mob/living/carbon/human))
if(!usr.get_active_hand() && ishuman(usr))
usr.put_in_hands(scan)
scan = null
else

View File

@@ -88,7 +88,7 @@
..()
/obj/machinery/door/airlock/attack_alien(var/mob/user) //Familiar, right? Doors. -Mechoid
if(istype(user, /mob/living/carbon/human))
if(ishuman(user))
var/mob/living/carbon/human/X = user
if(istype(X.species, /datum/species/xenos))
if(src.locked || src.welded)
@@ -999,7 +999,7 @@ About the new airlock wires panel:
else
to_chat(user, span_warning("[hold_open] is holding \the [src] open!"))
if(istype(user, /mob/living/carbon/human))
if(ishuman(user))
var/mob/living/carbon/human/X = user
if(istype(X.species, /datum/species/xenos))
src.attack_alien(user)
@@ -1169,7 +1169,7 @@ About the new airlock wires panel:
src.add_fingerprint(user)
if (attempt_vr(src,"attackby_vr",list(C, user))) return
if(istype(C, /mob/living))
if(isliving(C))
..()
return
//VOREstation Edit: Removing material cost from repair requirements

View File

@@ -139,7 +139,7 @@
//Proc: attack_hand
//Description: Attacked with empty hand. Only to allow special attack_bys.
/obj/machinery/door/blast/attack_hand(mob/user as mob)
if(istype(user, /mob/living/carbon/human))
if(ishuman(user))
var/mob/living/carbon/human/X = user
if(istype(X.species, /datum/species/xenos))
src.attack_alien(user)
@@ -217,7 +217,7 @@
// Parameters: Attacking Xeno mob.
// Description: Forces open the door after a delay.
/obj/machinery/door/blast/attack_alien(var/mob/user) //Familiar, right? Doors.
if(istype(user, /mob/living/carbon/human))
if(ishuman(user))
var/mob/living/carbon/human/X = user
if(istype(X.species, /datum/species/xenos))
if(src.density)

View File

@@ -126,7 +126,7 @@
else
do_animate("deny")
if(istype(AM, /mob/living/bot))
if(isbot(AM))
var/mob/living/bot/bot = AM
if(src.check_access(bot.botcard))
if(density)

View File

@@ -138,7 +138,7 @@
if(operating)
return//Already doing something.
if(istype(user, /mob/living/carbon/human))
if(ishuman(user))
var/mob/living/carbon/human/X = user
if(istype(X.species, /datum/species/xenos))
src.attack_alien(user)
@@ -195,7 +195,7 @@
close()
/obj/machinery/door/firedoor/attack_alien(var/mob/user) //Familiar, right? Doors.
if(istype(user, /mob/living/carbon/human))
if(ishuman(user))
var/mob/living/carbon/human/X = user
if(istype(X.species, /datum/species/xenos))
if(src.blocked)

View File

@@ -159,7 +159,7 @@
/obj/machinery/door/window/attack_hand(mob/user as mob)
src.add_fingerprint(user)
if(istype(user,/mob/living/carbon/human))
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(H.species.can_shred(H))
playsound(src, 'sound/effects/Glasshit.ogg', 75, 1)

View File

@@ -278,7 +278,7 @@ Just a object used in constructing fire alarms
ASSERT(isarea(A))
var/d1
var/d2
if(istype(user, /mob/living/carbon/human) || istype(user, /mob/living/silicon/ai))
if(ishuman(user) || isAI(user))
if(A.party)
d1 = text("<A href='byond://?src=\ref[];reset=1'>No Party :(</A>", src)
@@ -329,7 +329,7 @@ Just a object used in constructing fire alarms
..()
if(usr.stat || stat & (BROKEN|NOPOWER))
return
if((usr.contents.Find(src) || ((get_dist(src, usr) <= 1) && istype(loc, /turf))) || (istype(usr, /mob/living/silicon/ai)))
if((usr.contents.Find(src) || ((get_dist(src, usr) <= 1) && istype(loc, /turf))) || (isAI(usr)))
usr.machine = src
if(href_list["reset"])
reset()

View File

@@ -67,7 +67,7 @@
continue
var/flash_time = strength
if(istype(O, /mob/living/carbon/human))
if(ishuman(O))
var/mob/living/carbon/human/H = O
//VOREStation Edit Start
if(H.nif && H.nif.flag_check(NIF_V_FLASHPROT,NIF_FLAGS_VISION))

View File

@@ -65,7 +65,7 @@
visible_message("\The [src] shuts down.")
/obj/machinery/floodlight/attack_ai(mob/user as mob)
if(istype(user, /mob/living/silicon/robot) && Adjacent(user))
if(isrobot(user) && Adjacent(user))
return attack_hand(user)
if(on)

View File

@@ -153,7 +153,7 @@
set name = "Toggle Mode"
set src in view(1)
if(!istype(usr, /mob/living))
if(!isliving(usr))
to_chat(usr, span_warning("You can't do that."))
return

View File

@@ -171,7 +171,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)

View File

@@ -668,7 +668,7 @@ GLOBAL_LIST_BOILERPLATE(allCasters, /obj/machinery/newscaster)
return "Unknown"
/obj/machinery/newscaster/proc/scan_user(mob/living/user)
if(istype(user,/mob/living/carbon/human)) //User is a human
if(ishuman(user)) //User is a human
var/mob/living/carbon/human/human_user = user
var/obj/item/card/id/I = human_user.GetIdCard()
if(I)

View File

@@ -153,7 +153,7 @@
update_icon()
/obj/machinery/recharger/attack_ai(mob/user)
if(istype(user, /mob/living/silicon/robot) && Adjacent(user)) // Borgs can remove the cell if they are near enough
if(isrobot(user) && Adjacent(user)) // Borgs can remove the cell if they are near enough
if(charging)
user.visible_message("[user] removes [charging] from [src].", "You remove [charging] from [src].")
charging.update_icon()

View File

@@ -173,7 +173,7 @@
return
if (istype(O, /obj/item/grab) && get_dist(src,user)<2)
var/obj/item/grab/G = O
if(istype(G.affecting,/mob/living))
if(isliving(G.affecting))
var/mob/living/M = G.affecting
qdel(O)
go_in(M)
@@ -252,7 +252,7 @@
if(occupant)
return
if(istype(L, /mob/living/silicon/robot))
if(isrobot(L))
var/mob/living/silicon/robot/R = L
if(R.incapacitated())
@@ -273,7 +273,7 @@
return 1
//VOREStation Add Start
else if(istype(L, /mob/living/silicon/pai))
else if(ispAI(L))
var/mob/living/silicon/pai/P = L
if(P.incapacitated())

View File

@@ -19,7 +19,7 @@
/obj/machinery/syndicate_beacon/attack_hand(var/mob/user as mob)
user.set_machine(src)
var/dat = "<font color=#005500><i>Scanning [pick("retina pattern", "voice print", "fingerprints", "dna sequence")]...<br>Identity confirmed,<br></i></font>"
if(istype(user, /mob/living/carbon/human) || istype(user, /mob/living/silicon/ai))
if(ishuman(user) || isAI(user))
if(is_special_character(user))
dat += "<font color=#07700><i>Operative record found. Greetings, Agent [user.name].</i></font><br>"
else if(charges < 1)
@@ -56,7 +56,7 @@
return
if(2)
return
if(istype(M, /mob/living/carbon/human))
if(ishuman(M))
var/mob/living/carbon/human/N = M
to_chat(N, span_infoplain(span_bold("You have joined the ranks of the Syndicate and become a traitor to the station!")))
traitors.add_antagonist(N.mind)

View File

@@ -3,7 +3,7 @@
/obj/machinery/syndicate_beacon/virgo/attack_hand(var/mob/user as mob)
user.set_machine(src)
var/dat = "<font color=#005500><i>Scanning [pick("retina pattern", "voice print", "fingerprints", "dna sequence")]...<br>Identity confirmed,<br></i></font>"
if(istype(user, /mob/living/carbon/human) || istype(user, /mob/living/silicon/ai))
if(ishuman(user) || isAI(user))
if(is_special_character(user))
dat += "<font color=#07700><i>Operative record found. Greetings, Agent [user.name].</i></font><br>"
else if(charges < 1)
@@ -30,7 +30,7 @@
updateUsrDialog()
return
charges -= 1
if(istype(M, /mob/living/carbon/human))
if(ishuman(M))
var/mob/living/carbon/human/N = M
to_chat(N, span_infoplain(span_bold("Access granted, here are the supplies!")))
traitors.spawn_uplink(N)

View File

@@ -411,11 +411,11 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
if(!R.client?.prefs?.read_preference(/datum/preference/toggle/holder/hear_radio))
continue
if(istype(R, /mob/new_player)) // we don't want new players to hear messages. rare but generates runtimes.
if(isnewplayer(R)) // we don't want new players to hear messages. rare but generates runtimes.
continue
// Ghosts hearing all radio chat don't want to hear syndicate intercepts, they're duplicates
if(data == DATA_ANTAG && istype(R, /mob/observer/dead) && R.client?.prefs?.read_preference(/datum/preference/toggle/ghost_radio))
if(data == DATA_ANTAG && isobserver(R) && R.client?.prefs?.read_preference(/datum/preference/toggle/ghost_radio))
continue
// ChompEDIT START - Ghost blacklist for certain spammy radio channels

View File

@@ -641,7 +641,7 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
log.parameters["race"] = race
if(!istype(M, /mob/new_player) && M)
if(!isnewplayer(M) && M)
log.parameters["uspeech"] = M.universal_speak
else
log.parameters["uspeech"] = 0

View File

@@ -110,7 +110,7 @@
set src in oview(1)
set desc = "ID Tag:"
if(stat & (NOPOWER|BROKEN) || !istype(usr,/mob/living))
if(stat & (NOPOWER|BROKEN) || !isliving(usr))
return
if(t)
id = t
@@ -168,7 +168,7 @@
return
if(istype(M, /atom/movable))
//VOREStation Addition Start: Prevent taurriding abuse
if(istype(M, /mob/living))
if(isliving(M))
var/mob/living/L = M
if(LAZYLEN(L.buckled_mobs))
var/datum/riding/R = L.riding_datum

View File

@@ -44,7 +44,7 @@
/obj/machinery/washing_machine/proc/start()
if(!istype(usr, /mob/living)) //ew ew ew usr, but it's the only way to check.
if(!isliving(usr)) //ew ew ew usr, but it's the only way to check.
return
if(state != 4)

View File

@@ -18,7 +18,7 @@
to_chat(user, span_infoplain("The Wish Granter lies silent."))
return
else if(!istype(user, /mob/living/carbon/human))
else if(!ishuman(user))
to_chat(user, span_infoplain("You feel a dark stirring inside of the Wish Granter, something you want nothing of. Your instincts are better than any man's."))
return

View File

@@ -40,7 +40,7 @@
T = safepick(oview(1,src))
if(!melee_can_hit)
return
if(istype(T, /mob/living))
if(isliving(T))
var/mob/living/M = T
if(src.occupant.a_intent == I_HURT || istype(src.occupant, /mob/living/carbon/brain)) //Brains cannot change intents; Exo-piloting brains lack any form of physical feedback for control, limiting the ability to 'play nice'.
playsound(src, 'sound/weapons/heavysmash.ogg', 50, 1)

View File

@@ -91,11 +91,11 @@
/obj/item/mecha_parts/mecha_equipment/antiproj_armor_booster/proc/dynhitby(atom/movable/A)
if(!action_checks(A))
return chassis.dynhitby(A)
if(prob(chassis.deflect_chance*deflect_coeff) || istype(A, /mob/living) || istype(A, /obj/item/mecha_parts/mecha_tracking))
if(prob(chassis.deflect_chance*deflect_coeff) || isliving(A) || istype(A, /obj/item/mecha_parts/mecha_tracking))
chassis.occupant_message(span_notice("The [A] bounces off the armor."))
chassis.visible_message("The [A] bounces off the [chassis] armor")
chassis.log_append_to_last("Armor saved.")
if(istype(A, /mob/living))
if(isliving(A))
var/mob/living/M = A
M.take_organ_damage(10)
else if(istype(A, /obj))

View File

@@ -92,7 +92,7 @@
O.anchored = initial(O.anchored)
//attacking
else if(istype(target,/mob/living))
else if(isliving(target))
var/mob/living/M = target
if(M.stat>1) return
if(chassis.occupant.a_intent == I_HURT || istype(chassis.occupant,/mob/living/carbon/brain)) //No tactile feedback for brains
@@ -156,7 +156,7 @@
else
chassis.occupant_message(span_warning("[target] is firmly secured."))
else if(istype(target,/mob/living))
else if(isliving(target))
var/mob/living/M = target
if(M.stat>1) return
if(chassis.occupant.a_intent == I_HURT)

View File

@@ -65,7 +65,7 @@
target.apply_damage(drill_force, BRUTE)
return
else if(istype(target, /mob/living/simple_mob))
else if(isanimal(target))
var/mob/living/simple_mob/S = target
if(target.stat == DEAD)
if(S.meat_amount > 0)

View File

@@ -19,7 +19,7 @@
playsound(src, 'sound/effects/bang.ogg', 30, 1, 30)
chassis.occupant_message(span_warning("You emit a high-pitched noise from the mech."))
for(var/mob/living/carbon/M in ohearers(6, chassis))
if(istype(M, /mob/living/carbon/human))
if(ishuman(M))
var/ear_safety = 0
ear_safety = M.get_ear_protection()
if(ear_safety > 0)

View File

@@ -1060,7 +1060,7 @@
else
temp_deflect_chance = round(ArmC.get_efficiency() * ArmC.deflect_chance + (defence_mode ? 25 : 0))
if(istype(user,/mob/living/carbon/human))
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(H.species.can_shred(user))
if(!prob(temp_deflect_chance))
@@ -1125,7 +1125,7 @@
src.occupant_message(span_notice("\The [A] bounces off the armor."))
src.visible_message("\The [A] bounces off \the [src] armor")
src.log_append_to_last("Armor saved.")
if(istype(A, /mob/living))
if(isliving(A))
var/mob/living/M = A
M.take_organ_damage(10)
else if(istype(A, /obj))
@@ -1607,7 +1607,7 @@
/*
/obj/mecha/attack_ai(var/mob/living/silicon/ai/user as mob)
if(!istype(user, /mob/living/silicon/ai))
if(!isAI(user))
return
var/output = {"<b>Assume direct control over [src]?</b>
<a href='byond://?src=\ref[src];ai_take_control=\ref[user];duration=3000'>Yes</a><br>
@@ -2128,7 +2128,7 @@
for(var/atom/ID in list(H.get_active_hand(), H.wear_id, H.belt))
if(src.check_access(ID,src.internals_req_access))
return 1
else if(istype(H, /mob/living/silicon/robot))
else if(isrobot(H))
var/mob/living/silicon/robot/R = H
if(src.check_access(R.idcard,src.internals_req_access))
return 1

View File

@@ -35,14 +35,14 @@
if(internal_damage&MECHA_INT_CONTROL_LOST)
target = safepick(oview(1,src))
if(!melee_can_hit || !istype(target, /atom)) return
if(istype(target, /mob/living))
if(isliving(target))
var/mob/living/M = target
if(src.occupant.a_intent == I_HURT)
playsound(src, 'sound/weapons/punch4.ogg', 50, 1)
if(damtype == "brute")
step_away(M,src,15)
if(istype(target, /mob/living/carbon/human))
if(ishuman(target))
var/mob/living/carbon/human/H = target
// if (M.health <= 0) return

View File

@@ -203,7 +203,7 @@
set category = "Object"
set src in view(1)
if(!istype(usr, /mob/living/carbon/human)) //Only living, intelligent creatures with hands can empty ore boxes.
if(!ishuman(usr)) //Only living, intelligent creatures with hands can empty ore boxes.
to_chat(usr, span_warning("You are physically incapable of emptying the ore box."))
return

View File

@@ -118,7 +118,7 @@
if(!ticker)
to_chat(user, span_warning("You can't buckle anyone in before the game starts."))
return FALSE // Is this really needed?
if(!user.Adjacent(M) || user.restrained() || user.stat || istype(user, /mob/living/silicon/pai))
if(!user.Adjacent(M) || user.restrained() || user.stat || ispAI(user))
return FALSE
if(M in buckled_mobs)
to_chat(user, span_warning("\The [M] is already buckled to \the [src]."))

View File

@@ -85,7 +85,7 @@
return
if(metal)
return
if(slips && istype(AM, /mob/living)) //VOREStation Add
if(slips && isliving(AM)) //VOREStation Add
var/mob/living/M = AM
M.slip("the foam", 6)

View File

@@ -197,7 +197,7 @@ steam.start() -- spawns the effect
return 0
if(M.wear_mask && (M.wear_mask.item_flags & AIRTIGHT))
return 0
if(istype(M,/mob/living/carbon/human))
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(!M.get_organ(O_LUNGS)) // CHOMPedit - Making sure smoke doesn't affect lungless people
return 0

View File

@@ -117,7 +117,7 @@
..()
/obj/effect/mine/interact(mob/living/user as mob)
if(!panel_open || istype(user, /mob/living/silicon/ai))
if(!panel_open || isAI(user))
return
user.set_machine(src)
wires.Interact(user)

View File

@@ -14,7 +14,7 @@ GLOBAL_LIST_BOILERPLATE(all_portals, /obj/effect/portal)
var/event = FALSE // CHOMPAdd
/obj/effect/portal/Bumped(mob/M as mob|obj)
if(istype(M,/mob) && !(istype(M,/mob/living)))
if(ismob(M) && !(isliving(M)))
return //do not send ghosts, zshadows, ai eyes, etc
spawn(0)
src.teleport(M)
@@ -30,7 +30,7 @@ GLOBAL_LIST_BOILERPLATE(all_portals, /obj/effect/portal)
H.attack_dephase()
else return
// CHOMPEdit End
if(istype(AM,/mob) && !(istype(AM,/mob/living)))
if(ismob(AM) && !(isliving(AM)))
return //do not send ghosts, zshadows, ai eyes, etc
spawn(0)
src.teleport(AM)
@@ -38,7 +38,7 @@ GLOBAL_LIST_BOILERPLATE(all_portals, /obj/effect/portal)
return
/obj/effect/portal/attack_hand(mob/user as mob)
if(istype(user) && !(istype(user,/mob/living)))
if(istype(user) && !(isliving(user)))
return //do not send ghosts, zshadows, ai eyes, etc
spawn(0)
src.teleport(user)
@@ -61,7 +61,7 @@ GLOBAL_LIST_BOILERPLATE(all_portals, /obj/effect/portal)
return
if (istype(M, /atom/movable))
//VOREStation Addition Start: Prevent taurriding abuse
if(istype(M, /mob/living))
if(isliving(M))
var/mob/living/L = M
if(LAZYLEN(L.buckled_mobs))
var/datum/riding/R = L.riding_datum

View File

@@ -80,7 +80,7 @@
/obj/effect/spider/stickyweb/CanPass(atom/movable/mover, turf/target)
if(istype(mover, /mob/living/simple_mob/animal/giant_spider))
return TRUE
else if(istype(mover, /mob/living))
else if(isliving(mover))
if(prob(50))
to_chat(mover, span_warning("You get stuck in \the [src] for a moment."))
return FALSE

View File

@@ -798,7 +798,7 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
var/cannotzoom
if((M.stat && !zoom) || !(istype(M,/mob/living/carbon/human)))
if((M.stat && !zoom) || !(ishuman(M)))
to_chat(M, span_filter_notice("You are unable to focus through the [devicename]."))
cannotzoom = 1
else if(!zoom && (global_hud.darkMask[1] in M.client.screen))

View File

@@ -44,7 +44,7 @@
var/can_rename_areas_in = AREA_STATION // Only station areas can be reanamed
/obj/item/blueprints/attack_self(mob/M as mob)
if (!istype(M,/mob/living/carbon/human))
if (!ishuman(M))
to_chat(M, "This stack of blue paper means nothing to you.") //monkeys cannot into projecting
return
interact()

View File

@@ -385,7 +385,7 @@
to_chat(ui.user, span_notice("[icon2html(src, ui.user.client)] Sent message to [istype(comm, /obj/item/communicator) ? comm.owner : comm.name], <b>\"[text]\"</b> (<a href='byond://?src=\ref[src];action=Reply;target=\ref[exonet.get_atom_from_address(comm.exonet.address)]'>Reply</a>)"))
for(var/mob/M in player_list)
if(M.stat == DEAD && M.client?.prefs?.read_preference(/datum/preference/toggle/ghost_ears))
if(istype(M, /mob/new_player) || M.forbid_seeing_deadchat)
if(isnewplayer(M) || M.forbid_seeing_deadchat)
continue
if(exonet.get_atom_from_address(their_address) == M)
continue

View File

@@ -214,7 +214,7 @@ var/global/list/obj/item/communicator/all_communicators = list()
// Description: Sets up the exonet datum, gives the device an address, and then gets a node reference. Afterwards, populates the device
// list.
/obj/item/communicator/proc/initialize_exonet(mob/user)
if(!user || !istype(user, /mob/living))
if(!user || !isliving(user))
return
if(!exonet)
exonet = new(src)

View File

@@ -162,7 +162,7 @@
log_pda("(DCOMM: [src]) sent \"[text_message]\" to [chosen_communicator]", src)
for(var/mob/M in player_list)
if(M.stat == DEAD && M.client?.prefs?.read_preference(/datum/preference/toggle/ghost_ears))
if(istype(M, /mob/new_player) || M.forbid_seeing_deadchat)
if(isnewplayer(M) || M.forbid_seeing_deadchat)
continue
if(M == src)
continue

View File

@@ -17,7 +17,7 @@
. = ..()
if(active)
. += "It's a holographic warrant for '[active.fields["namewarrant"]]'."
if(in_range(user, src) || istype(user, /mob/observer/dead))
if(in_range(user, src) || isobserver(user))
show_content(user) //Opens a browse window, not chatbox related
else
. += span_notice("You have to go closer if you want to read it.")

View File

@@ -300,7 +300,7 @@
/obj/item/personal_shield_generator/process()
if(!bcell) //They removed the battery midway.
if(istype(loc, /mob/living/carbon/human)) //We on someone? Tell them it turned off.
if(ishuman(loc)) //We on someone? Tell them it turned off.
var/mob/living/carbon/human/user = loc
to_chat(user, span_warning("The shield deactivates! An error message pops up on screen: 'Cell missing. Cell replacement required.'"))
user.remove_modifiers_of_type(/datum/modifier/shield_projection)
@@ -312,7 +312,7 @@
if(shield_active)
if(bcell.rigged) //They turned it back on after it was rigged to go boom.
if(istype(loc, /mob/living/carbon/human)) //Deactivate the shield, first. You're not getting reduced damage...
if(ishuman(loc)) //Deactivate the shield, first. You're not getting reduced damage...
var/mob/living/carbon/human/user = loc
to_chat(user, span_warning("The shield deactivates, an error message popping up on screen: 'Cell Reactor Critically damaged. Cell replacement required.'"))
user.remove_modifiers_of_type(/datum/modifier/shield_projection)
@@ -333,7 +333,7 @@
if(bcell.charge < generator_hit_cost || bcell.charge < generator_active_cost) //Out of charge...
shield_active = 0
if(istype(loc, /mob/living/carbon/human)) //We on someone? Tell them it turned off.
if(ishuman(loc)) //We on someone? Tell them it turned off.
var/mob/living/carbon/human/user = loc
to_chat(user, span_warning("The shield deactivates, an error message popping up on screen: 'Cell out of charge.'"))
user.remove_modifiers_of_type(/datum/modifier/shield_projection)

Some files were not shown because too many files have changed in this diff Show More