diff --git a/code/__defines/is_helpers.dm b/code/__defines/is_helpers.dm index f56b590be9..71b7858571 100644 --- a/code/__defines/is_helpers.dm +++ b/code/__defines/is_helpers.dm @@ -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 iscarbon(A) istype(A, /mob/living/carbon) #define isalien(A) istype(A, /mob/living/carbon/alien) diff --git a/code/_helpers/mobs.dm b/code/_helpers/mobs.dm index 822db0178b..5c29365452 100644 --- a/code/_helpers/mobs.dm +++ b/code/_helpers/mobs.dm @@ -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 @@ -167,7 +167,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) diff --git a/code/_helpers/unsorted.dm b/code/_helpers/unsorted.dm index 235c8e5025..b6fdd46e41 100644 --- a/code/_helpers/unsorted.dm +++ b/code/_helpers/unsorted.dm @@ -802,7 +802,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. @@ -945,7 +945,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) diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index c5e8d14bd7..63b1d4c09d 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -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") diff --git a/code/controllers/subsystems/ticker.dm b/code/controllers/subsystems/ticker.dm index a28fcbe30e..8a8e35d73d 100644 --- a/code/controllers/subsystems/ticker.dm +++ b/code/controllers/subsystems/ticker.dm @@ -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()]...")))) diff --git a/code/datums/colormate.dm b/code/datums/colormate.dm index 3bb625b7b1..c82f09a11c 100644 --- a/code/datums/colormate.dm +++ b/code/datums/colormate.dm @@ -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() diff --git a/code/datums/helper_datums/teleport.dm b/code/datums/helper_datums/teleport.dm index 07f4301ca2..994dd65b2f 100644 --- a/code/datums/helper_datums/teleport.dm +++ b/code/datums/helper_datums/teleport.dm @@ -167,7 +167,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) @@ -177,7 +177,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 @@ -188,7 +188,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 @@ -208,7 +208,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)) diff --git a/code/datums/managed_browsers/feedback_form.dm b/code/datums/managed_browsers/feedback_form.dm index 15bf63f535..cb859d8feb 100644 --- a/code/datums/managed_browsers/feedback_form.dm +++ b/code/datums/managed_browsers/feedback_form.dm @@ -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) diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 78a75a7114..cbb43a230f 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -241,7 +241,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 @@ -386,7 +386,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 diff --git a/code/datums/repositories/crew.dm b/code/datums/repositories/crew.dm index ae94e78726..4b59eeeb39 100644 --- a/code/datums/repositories/crew.dm +++ b/code/datums/repositories/crew.dm @@ -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 diff --git a/code/datums/uplink/announcements.dm b/code/datums/uplink/announcements.dm index 12330db3b8..e225247862 100644 --- a/code/datums/uplink/announcements.dm +++ b/code/datums/uplink/announcements.dm @@ -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 - diff --git a/code/defines/procs/announce.dm b/code/defines/procs/announce.dm index 7840615ccc..72d79a0662 100644 --- a/code/defines/procs/announce.dm +++ b/code/defines/procs/announce.dm @@ -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, "

[title]

") 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) @@ -110,7 +110,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 << 'sound/AI/preamble.ogg' if(!message_sound) @@ -120,7 +120,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) diff --git a/code/game/antagonist/antagonist.dm b/code/game/antagonist/antagonist.dm index dd67c61851..38ea7f9629 100644 --- a/code/game/antagonist/antagonist.dm +++ b/code/game/antagonist/antagonist.dm @@ -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 diff --git a/code/game/antagonist/antagonist_add.dm b/code/game/antagonist/antagonist_add.dm index 76781e5def..b4c914498e 100644 --- a/code/game/antagonist/antagonist_add.dm +++ b/code/game/antagonist/antagonist_add.dm @@ -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) diff --git a/code/game/antagonist/mutiny/mutineer.dm b/code/game/antagonist/mutiny/mutineer.dm index 28871a32e2..d7d4193031 100644 --- a/code/game/antagonist/mutiny/mutineer.dm +++ b/code/game/antagonist/mutiny/mutineer.dm @@ -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 diff --git a/code/game/antagonist/station/infiltrator.dm b/code/game/antagonist/station/infiltrator.dm index f3ffbc0024..472b0737bf 100644 --- a/code/game/antagonist/station/infiltrator.dm +++ b/code/game/antagonist/station/infiltrator.dm @@ -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 :t") // 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) diff --git a/code/game/atoms.dm b/code/game/atoms.dm index d0f8312c56..e822ae6a79 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -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 diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index 9c63bcb7f7..2a3d12e4d1 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -391,7 +391,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. @@ -413,7 +413,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 src.throw_impact(A,speed) if(isobj(A)) diff --git a/code/game/dna/dna2_helpers.dm b/code/game/dna/dna2_helpers.dm index 2f72625f37..15e9e73139 100644 --- a/code/game/dna/dna2_helpers.dm +++ b/code/game/dna/dna2_helpers.dm @@ -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() diff --git a/code/game/dna/genes/monkey.dm b/code/game/dna/genes/monkey.dm index 9bf5ff965a..959c0cc2f2 100644 --- a/code/game/dna/genes/monkey.dm +++ b/code/game/dna/genes/monkey.dm @@ -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 diff --git a/code/game/gamemodes/changeling/powers/armblade.dm b/code/game/gamemodes/changeling/powers/armblade.dm index 52a83f8e9b..650b134800 100644 --- a/code/game/gamemodes/changeling/powers/armblade.dm +++ b/code/game/gamemodes/changeling/powers/armblade.dm @@ -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) diff --git a/code/game/gamemodes/changeling/powers/visible_camouflage.dm b/code/game/gamemodes/changeling/powers/visible_camouflage.dm index de31868953..3692044219 100644 --- a/code/game/gamemodes/changeling/powers/visible_camouflage.dm +++ b/code/game/gamemodes/changeling/powers/visible_camouflage.dm @@ -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) diff --git a/code/game/gamemodes/cult/construct_spells.dm b/code/game/gamemodes/cult/construct_spells.dm index 9baf8667f7..5a2168fa53 100644 --- a/code/game/gamemodes/cult/construct_spells.dm +++ b/code/game/gamemodes/cult/construct_spells.dm @@ -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)) diff --git a/code/game/gamemodes/cult/cult_structures.dm b/code/game/gamemodes/cult/cult_structures.dm index 56fcbd1d80..a4942e3133 100644 --- a/code/game/gamemodes/cult/cult_structures.dm +++ b/code/game/gamemodes/cult/cult_structures.dm @@ -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 diff --git a/code/game/gamemodes/cult/ritual.dm b/code/game/gamemodes/cult/ritual.dm index 27c0941144..81b5bba11e 100644 --- a/code/game/gamemodes/cult/ritual.dm +++ b/code/game/gamemodes/cult/ritual.dm @@ -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 diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm index 15900cdeca..670f5e26fb 100644 --- a/code/game/gamemodes/cult/runes.dm +++ b/code/game/gamemodes/cult/runes.dm @@ -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 diff --git a/code/game/gamemodes/cult/soulstone.dm b/code/game/gamemodes/cult/soulstone.dm index 59c9c62e82..3a5e93689a 100644 --- a/code/game/gamemodes/cult/soulstone.dm +++ b/code/game/gamemodes/cult/soulstone.dm @@ -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..() diff --git a/code/game/gamemodes/endgame/supermatter_cascade/blob.dm b/code/game/gamemodes/endgame/supermatter_cascade/blob.dm index e2bc9d7a4b..a08a6d3009 100644 --- a/code/game/gamemodes/endgame/supermatter_cascade/blob.dm +++ b/code/game/gamemodes/endgame/supermatter_cascade/blob.dm @@ -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."),\ diff --git a/code/game/gamemodes/endgame/supermatter_cascade/universe.dm b/code/game/gamemodes/endgame/supermatter_cascade/universe.dm index 6df1dad864..5889e778bb 100644 --- a/code/game/gamemodes/endgame/supermatter_cascade/universe.dm +++ b/code/game/gamemodes/endgame/supermatter_cascade/universe.dm @@ -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) diff --git a/code/game/gamemodes/events.dm b/code/game/gamemodes/events.dm index 75de7d0fd6..2bf8f17592 100644 --- a/code/game/gamemodes/events.dm +++ b/code/game/gamemodes/events.dm @@ -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) diff --git a/code/game/gamemodes/events/dust.dm b/code/game/gamemodes/events/dust.dm index b3728390d0..bcf038693f 100644 --- a/code/game/gamemodes/events/dust.dm +++ b/code/game/gamemodes/events/dust.dm @@ -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) diff --git a/code/game/gamemodes/events/holidays/Christmas.dm b/code/game/gamemodes/events/holidays/Christmas.dm index 8e79379c7f..bb5e9f84e5 100644 --- a/code/game/gamemodes/events/holidays/Christmas.dm +++ b/code/game/gamemodes/events/holidays/Christmas.dm @@ -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" diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index 51e3a508ac..184672cf99 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -397,9 +397,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.") diff --git a/code/game/gamemodes/meme/meme.dm b/code/game/gamemodes/meme/meme.dm index d79e63ad2a..6b03c69545 100644 --- a/code/game/gamemodes/meme/meme.dm +++ b/code/game/gamemodes/meme/meme.dm @@ -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 diff --git a/code/game/gamemodes/newobjective.dm b/code/game/gamemodes/newobjective.dm index f12840fdf3..80a2b82a1e 100644 --- a/code/game/gamemodes/newobjective.dm +++ b/code/game/gamemodes/newobjective.dm @@ -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) diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index 1e589f6f13..86bb8176f8 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -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 diff --git a/code/game/gamemodes/technomancer/catalog.dm b/code/game/gamemodes/technomancer/catalog.dm index 6148f50bbd..f911ee76c8 100644 --- a/code/game/gamemodes/technomancer/catalog.dm +++ b/code/game/gamemodes/technomancer/catalog.dm @@ -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) diff --git a/code/game/gamemodes/technomancer/core_obj.dm b/code/game/gamemodes/technomancer/core_obj.dm index 333b445259..2a59ee8ada 100644 --- a/code/game/gamemodes/technomancer/core_obj.dm +++ b/code/game/gamemodes/technomancer/core_obj.dm @@ -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 diff --git a/code/game/gamemodes/technomancer/spell_objs_helpers.dm b/code/game/gamemodes/technomancer/spell_objs_helpers.dm index dbcf017dbd..59522593ab 100644 --- a/code/game/gamemodes/technomancer/spell_objs_helpers.dm +++ b/code/game/gamemodes/technomancer/spell_objs_helpers.dm @@ -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 \ No newline at end of file + return chosen_target diff --git a/code/game/gamemodes/technomancer/spells/abjuration.dm b/code/game/gamemodes/technomancer/spells/abjuration.dm index 732047af58..ed7da4e86c 100644 --- a/code/game/gamemodes/technomancer/spells/abjuration.dm +++ b/code/game/gamemodes/technomancer/spells/abjuration.dm @@ -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. diff --git a/code/game/gamemodes/technomancer/spells/apportation.dm b/code/game/gamemodes/technomancer/spells/apportation.dm index b47dc28288..fe9afedea3 100644 --- a/code/game/gamemodes/technomancer/spells/apportation.dm +++ b/code/game/gamemodes/technomancer/spells/apportation.dm @@ -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 diff --git a/code/game/gamemodes/technomancer/spells/control.dm b/code/game/gamemodes/technomancer/spells/control.dm index 27e9fe5b47..4e8083ceb1 100644 --- a/code/game/gamemodes/technomancer/spells/control.dm +++ b/code/game/gamemodes/technomancer/spells/control.dm @@ -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 diff --git a/code/game/gamemodes/technomancer/spells/gambit.dm b/code/game/gamemodes/technomancer/spells/gambit.dm index 62c7f9620f..dcd74ab476 100644 --- a/code/game/gamemodes/technomancer/spells/gambit.dm +++ b/code/game/gamemodes/technomancer/spells/gambit.dm @@ -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 diff --git a/code/game/gamemodes/technomancer/spells/insert/insert.dm b/code/game/gamemodes/technomancer/spells/insert/insert.dm index f7399234fb..ab18c16e3f 100644 --- a/code/game/gamemodes/technomancer/spells/insert/insert.dm +++ b/code/game/gamemodes/technomancer/spells/insert/insert.dm @@ -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) diff --git a/code/game/gamemodes/technomancer/spells/modifier/modifier.dm b/code/game/gamemodes/technomancer/spells/modifier/modifier.dm index 73ef8b5b68..b462a4a1c8 100644 --- a/code/game/gamemodes/technomancer/spells/modifier/modifier.dm +++ b/code/game/gamemodes/technomancer/spells/modifier/modifier.dm @@ -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 diff --git a/code/game/gamemodes/technomancer/spells/resurrect.dm b/code/game/gamemodes/technomancer/spells/resurrect.dm index 16a8f9b14f..26dd8644bc 100644 --- a/code/game/gamemodes/technomancer/spells/resurrect.dm +++ b/code/game/gamemodes/technomancer/spells/resurrect.dm @@ -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) diff --git a/code/game/machinery/atmoalter/canister.dm b/code/game/machinery/atmoalter/canister.dm index 7271b01ff8..7847acc627 100644 --- a/code/game/machinery/atmoalter/canister.dm +++ b/code/game/machinery/atmoalter/canister.dm @@ -261,7 +261,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) diff --git a/code/game/machinery/atmoalter/meter.dm b/code/game/machinery/atmoalter/meter.dm index 7dfea2a592..f325c5ba93 100644 --- a/code/game/machinery/atmoalter/meter.dm +++ b/code/game/machinery/atmoalter/meter.dm @@ -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) diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index ef8cbccbd8..6aa664a089 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -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) diff --git a/code/game/machinery/camera/motion.dm b/code/game/machinery/camera/motion.dm index 00bfeb09cc..aebee15e3c 100644 --- a/code/game/machinery/camera/motion.dm +++ b/code/game/machinery/camera/motion.dm @@ -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)) @@ -59,4 +59,3 @@ if (!area_motion) if(isliving(AM)) newTarget(AM) - diff --git a/code/game/machinery/camera/tracking.dm b/code/game/machinery/camera/tracking.dm index 80f65a3c22..efb35e92b5 100644 --- a/code/game/machinery/camera/tracking.dm +++ b/code/game/machinery/camera/tracking.dm @@ -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 diff --git a/code/game/machinery/cell_charger.dm b/code/game/machinery/cell_charger.dm index 4ff9a5c540..b33f05c16b 100644 --- a/code/game/machinery/cell_charger.dm +++ b/code/game/machinery/cell_charger.dm @@ -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 diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index a4c0aeaf7a..d7576fdae4 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -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 diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm index 50e439b75e..088444aa53 100644 --- a/code/game/machinery/computer/arcade.dm +++ b/code/game/machinery/computer/arcade.dm @@ -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) diff --git a/code/game/machinery/computer/card.dm b/code/game/machinery/computer/card.dm index 77f9ce12c0..c4dd7558dc 100644 --- a/code/game/machinery/computer/card.dm +++ b/code/game/machinery/computer/card.dm @@ -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 diff --git a/code/game/machinery/computer/guestpass.dm b/code/game/machinery/computer/guestpass.dm index ddb74b6ad6..b8ad3ddba3 100644 --- a/code/game/machinery/computer/guestpass.dm +++ b/code/game/machinery/computer/guestpass.dm @@ -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 diff --git a/code/game/machinery/computer/medical.dm b/code/game/machinery/computer/medical.dm index afc2640e43..66601e8a08 100644 --- a/code/game/machinery/computer/medical.dm +++ b/code/game/machinery/computer/medical.dm @@ -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 diff --git a/code/game/machinery/computer/message.dm b/code/game/machinery/computer/message.dm index fb49f1ca0f..ffe823cb71 100644 --- a/code/game/machinery/computer/message.dm +++ b/code/game/machinery/computer/message.dm @@ -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. diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm index 86d6842df8..b695eb3617 100644 --- a/code/game/machinery/computer/security.dm +++ b/code/game/machinery/computer/security.dm @@ -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 diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 54eda82f72..3ff1d2d90c 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -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) @@ -997,7 +997,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) @@ -1167,7 +1167,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 diff --git a/code/game/machinery/doors/blast_door.dm b/code/game/machinery/doors/blast_door.dm index dfdc2c20af..5c66fb2dfa 100644 --- a/code/game/machinery/doors/blast_door.dm +++ b/code/game/machinery/doors/blast_door.dm @@ -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) diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index 8055af222c..334879e54c 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -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) diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm index 4502ed9334..7f961c86c8 100644 --- a/code/game/machinery/doors/firedoor.dm +++ b/code/game/machinery/doors/firedoor.dm @@ -136,7 +136,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) @@ -193,7 +193,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) diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm index 5117401535..07fb154cbf 100644 --- a/code/game/machinery/doors/windowdoor.dm +++ b/code/game/machinery/doors/windowdoor.dm @@ -152,7 +152,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) diff --git a/code/game/machinery/fire_alarm.dm b/code/game/machinery/fire_alarm.dm index 7a5d4ffc17..22da386180 100644 --- a/code/game/machinery/fire_alarm.dm +++ b/code/game/machinery/fire_alarm.dm @@ -233,7 +233,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("No Party :(", src) @@ -284,7 +284,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() diff --git a/code/game/machinery/flasher.dm b/code/game/machinery/flasher.dm index 4e42f297c0..48f5929442 100644 --- a/code/game/machinery/flasher.dm +++ b/code/game/machinery/flasher.dm @@ -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)) diff --git a/code/game/machinery/floodlight.dm b/code/game/machinery/floodlight.dm index 54447f264a..00f4e192f9 100644 --- a/code/game/machinery/floodlight.dm +++ b/code/game/machinery/floodlight.dm @@ -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) diff --git a/code/game/machinery/iv_drip.dm b/code/game/machinery/iv_drip.dm index f38e2e08cc..af1eb2270e 100644 --- a/code/game/machinery/iv_drip.dm +++ b/code/game/machinery/iv_drip.dm @@ -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 diff --git a/code/game/machinery/magnet.dm b/code/game/machinery/magnet.dm index 0061137038..a9296866bb 100644 --- a/code/game/machinery/magnet.dm +++ b/code/game/machinery/magnet.dm @@ -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) diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm index 07dbe9a32e..8141129abc 100644 --- a/code/game/machinery/newscaster.dm +++ b/code/game/machinery/newscaster.dm @@ -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) diff --git a/code/game/machinery/recharger.dm b/code/game/machinery/recharger.dm index 2f9b70203c..3e56fb7919 100644 --- a/code/game/machinery/recharger.dm +++ b/code/game/machinery/recharger.dm @@ -118,7 +118,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() diff --git a/code/game/machinery/rechargestation.dm b/code/game/machinery/rechargestation.dm index f6fb8599ed..0fec0b1218 100644 --- a/code/game/machinery/rechargestation.dm +++ b/code/game/machinery/rechargestation.dm @@ -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()) diff --git a/code/game/machinery/syndicatebeacon.dm b/code/game/machinery/syndicatebeacon.dm index d2f658bcfc..788091c5fe 100644 --- a/code/game/machinery/syndicatebeacon.dm +++ b/code/game/machinery/syndicatebeacon.dm @@ -19,7 +19,7 @@ /obj/machinery/syndicate_beacon/attack_hand(var/mob/user as mob) user.set_machine(src) var/dat = "Scanning [pick("retina pattern", "voice print", "fingerprints", "dna sequence")]...
Identity confirmed,
" - if(istype(user, /mob/living/carbon/human) || istype(user, /mob/living/silicon/ai)) + if(ishuman(user) || isAI(user)) if(is_special_character(user)) dat += "Operative record found. Greetings, Agent [user.name].
" 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) diff --git a/code/game/machinery/syndicatebeacon_vr.dm b/code/game/machinery/syndicatebeacon_vr.dm index b1b45ff83a..a619bf92e0 100644 --- a/code/game/machinery/syndicatebeacon_vr.dm +++ b/code/game/machinery/syndicatebeacon_vr.dm @@ -3,7 +3,7 @@ /obj/machinery/syndicate_beacon/virgo/attack_hand(var/mob/user as mob) user.set_machine(src) var/dat = "Scanning [pick("retina pattern", "voice print", "fingerprints", "dna sequence")]...
Identity confirmed,
" - if(istype(user, /mob/living/carbon/human) || istype(user, /mob/living/silicon/ai)) + if(ishuman(user) || isAI(user)) if(is_special_character(user)) dat += "Operative record found. Greetings, Agent [user.name].
" 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) diff --git a/code/game/machinery/telecomms/broadcaster.dm b/code/game/machinery/telecomms/broadcaster.dm index fa8db1916d..c54674c7b9 100644 --- a/code/game/machinery/telecomms/broadcaster.dm +++ b/code/game/machinery/telecomms/broadcaster.dm @@ -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 // --- Check for compression --- diff --git a/code/game/machinery/telecomms/telecomunications.dm b/code/game/machinery/telecomms/telecomunications.dm index 5717149044..d891c11f89 100644 --- a/code/game/machinery/telecomms/telecomunications.dm +++ b/code/game/machinery/telecomms/telecomunications.dm @@ -616,7 +616,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 diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm index 3ada9642b5..b3c2bf95bd 100644 --- a/code/game/machinery/teleporter.dm +++ b/code/game/machinery/teleporter.dm @@ -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 diff --git a/code/game/machinery/washing_machine.dm b/code/game/machinery/washing_machine.dm index 25b4297f7c..7e04843911 100644 --- a/code/game/machinery/washing_machine.dm +++ b/code/game/machinery/washing_machine.dm @@ -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) diff --git a/code/game/machinery/wishgranter.dm b/code/game/machinery/wishgranter.dm index 4dd2eae2bb..327ff56cd1 100644 --- a/code/game/machinery/wishgranter.dm +++ b/code/game/machinery/wishgranter.dm @@ -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 diff --git a/code/game/mecha/combat/combat.dm b/code/game/mecha/combat/combat.dm index 49363929a5..4632df4101 100644 --- a/code/game/mecha/combat/combat.dm +++ b/code/game/mecha/combat/combat.dm @@ -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) diff --git a/code/game/mecha/equipment/tools/armor_ranged.dm b/code/game/mecha/equipment/tools/armor_ranged.dm index 86f66f61f0..f4e30be6d9 100644 --- a/code/game/mecha/equipment/tools/armor_ranged.dm +++ b/code/game/mecha/equipment/tools/armor_ranged.dm @@ -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)) diff --git a/code/game/mecha/equipment/tools/clamp.dm b/code/game/mecha/equipment/tools/clamp.dm index b85e8d7386..d71ba88ae1 100644 --- a/code/game/mecha/equipment/tools/clamp.dm +++ b/code/game/mecha/equipment/tools/clamp.dm @@ -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) diff --git a/code/game/mecha/equipment/tools/drill.dm b/code/game/mecha/equipment/tools/drill.dm index 9b897f1241..7d69bee9fe 100644 --- a/code/game/mecha/equipment/tools/drill.dm +++ b/code/game/mecha/equipment/tools/drill.dm @@ -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) diff --git a/code/game/mecha/equipment/weapons/honk.dm b/code/game/mecha/equipment/weapons/honk.dm index 3edd3f554b..5452efe6bb 100644 --- a/code/game/mecha/equipment/weapons/honk.dm +++ b/code/game/mecha/equipment/weapons/honk.dm @@ -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) diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index 0690d11bc7..50dc755176 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -1056,7 +1056,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)) @@ -1121,7 +1121,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)) @@ -1601,7 +1601,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 = {"Assume direct control over [src]? Yes
@@ -2122,7 +2122,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 diff --git a/code/game/mecha/micro/micro.dm b/code/game/mecha/micro/micro.dm index f28663c044..53a13a465c 100644 --- a/code/game/mecha/micro/micro.dm +++ b/code/game/mecha/micro/micro.dm @@ -34,14 +34,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 diff --git a/code/game/mecha/micro/micro_equipment.dm b/code/game/mecha/micro/micro_equipment.dm index 62680b47d5..6ed2a71fff 100644 --- a/code/game/mecha/micro/micro_equipment.dm +++ b/code/game/mecha/micro/micro_equipment.dm @@ -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 diff --git a/code/game/objects/buckling.dm b/code/game/objects/buckling.dm index 632a55ddda..1684044b7a 100644 --- a/code/game/objects/buckling.dm +++ b/code/game/objects/buckling.dm @@ -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].")) diff --git a/code/game/objects/effects/chem/foam.dm b/code/game/objects/effects/chem/foam.dm index a8d7b243ac..87a1180629 100644 --- a/code/game/objects/effects/chem/foam.dm +++ b/code/game/objects/effects/chem/foam.dm @@ -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) diff --git a/code/game/objects/effects/effect_system.dm b/code/game/objects/effects/effect_system.dm index b69cbba4d7..c29faf6e9b 100644 --- a/code/game/objects/effects/effect_system.dm +++ b/code/game/objects/effects/effect_system.dm @@ -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(H.head && (H.head.item_flags & AIRTIGHT)) return 0 diff --git a/code/game/objects/effects/mines.dm b/code/game/objects/effects/mines.dm index c2bac12e66..a0e6dee33b 100644 --- a/code/game/objects/effects/mines.dm +++ b/code/game/objects/effects/mines.dm @@ -118,7 +118,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) diff --git a/code/game/objects/effects/portals.dm b/code/game/objects/effects/portals.dm index 002d5d5cc8..132cfbfd67 100644 --- a/code/game/objects/effects/portals.dm +++ b/code/game/objects/effects/portals.dm @@ -13,7 +13,7 @@ GLOBAL_LIST_BOILERPLATE(all_portals, /obj/effect/portal) anchored = TRUE /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) @@ -23,7 +23,7 @@ GLOBAL_LIST_BOILERPLATE(all_portals, /obj/effect/portal) /obj/effect/portal/Crossed(atom/movable/AM as mob|obj) if(AM.is_incorporeal()) return - 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) @@ -31,7 +31,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) @@ -54,7 +54,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 @@ -66,4 +66,3 @@ GLOBAL_LIST_BOILERPLATE(all_portals, /obj/effect/portal) do_teleport(M, locate(rand(5, world.maxx - 5), rand(5, world.maxy -5), 3), 0) else do_teleport(M, target, 1) ///You will appear adjacent to the beacon - diff --git a/code/game/objects/effects/spiders.dm b/code/game/objects/effects/spiders.dm index 3de66afd02..2fde68408b 100644 --- a/code/game/objects/effects/spiders.dm +++ b/code/game/objects/effects/spiders.dm @@ -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 diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index fde015a9c2..a8d526c31a 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -796,7 +796,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)) diff --git a/code/game/objects/items/blueprints.dm b/code/game/objects/items/blueprints.dm index 8faa8cc58c..3d8e98bc6c 100644 --- a/code/game/objects/items/blueprints.dm +++ b/code/game/objects/items/blueprints.dm @@ -43,7 +43,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() diff --git a/code/game/objects/items/devices/communicator/UI_tgui.dm b/code/game/objects/items/devices/communicator/UI_tgui.dm index c5e4a7466f..06e30f51a8 100644 --- a/code/game/objects/items/devices/communicator/UI_tgui.dm +++ b/code/game/objects/items/devices/communicator/UI_tgui.dm @@ -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], \"[text]\" (Reply)")) 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 diff --git a/code/game/objects/items/devices/communicator/communicator.dm b/code/game/objects/items/devices/communicator/communicator.dm index cb0b7e7b7a..acf80965ae 100644 --- a/code/game/objects/items/devices/communicator/communicator.dm +++ b/code/game/objects/items/devices/communicator/communicator.dm @@ -129,7 +129,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) diff --git a/code/game/objects/items/devices/communicator/messaging.dm b/code/game/objects/items/devices/communicator/messaging.dm index db724bc918..c964e9f28c 100644 --- a/code/game/objects/items/devices/communicator/messaging.dm +++ b/code/game/objects/items/devices/communicator/messaging.dm @@ -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 diff --git a/code/game/objects/items/devices/holowarrant.dm b/code/game/objects/items/devices/holowarrant.dm index 84f854ec82..1c71997228 100644 --- a/code/game/objects/items/devices/holowarrant.dm +++ b/code/game/objects/items/devices/holowarrant.dm @@ -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.") diff --git a/code/game/objects/items/devices/personal_shield_generator_vr.dm b/code/game/objects/items/devices/personal_shield_generator_vr.dm index 35498064e3..76cd026389 100644 --- a/code/game/objects/items/devices/personal_shield_generator_vr.dm +++ b/code/game/objects/items/devices/personal_shield_generator_vr.dm @@ -297,7 +297,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) @@ -309,7 +309,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) @@ -330,7 +330,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) diff --git a/code/game/objects/items/devices/radio/electropack.dm b/code/game/objects/items/devices/radio/electropack.dm index 98bb6dab2e..668525ee45 100644 --- a/code/game/objects/items/devices/radio/electropack.dm +++ b/code/game/objects/items/devices/radio/electropack.dm @@ -47,7 +47,7 @@ //..() if(usr.stat || usr.restrained()) return - if(((istype(usr, /mob/living/carbon/human) && ((!( ticker ) || (ticker && ticker.mode != "monkey")) && usr.contents.Find(src))) || (usr.contents.Find(master) || (in_range(src, usr) && istype(loc, /turf))))) + if(((ishuman(usr) && ((!( ticker ) || (ticker && ticker.mode != "monkey")) && usr.contents.Find(src))) || (usr.contents.Find(master) || (in_range(src, usr) && istype(loc, /turf))))) usr.set_machine(src) if(href_list["freq"]) var/new_frequency = sanitize_frequency(frequency + text2num(href_list["freq"])) @@ -108,7 +108,7 @@ /obj/item/radio/electropack/attack_self(mob/user as mob, flag1) - if(!istype(user, /mob/living/carbon/human)) + if(!ishuman(user)) return user.set_machine(src) var/dat = {" diff --git a/code/game/objects/items/devices/radio/headset.dm b/code/game/objects/items/devices/radio/headset.dm index 94f749b323..7ad0978a84 100644 --- a/code/game/objects/items/devices/radio/headset.dm +++ b/code/game/objects/items/devices/radio/headset.dm @@ -212,7 +212,7 @@ /obj/item/radio/headset/mob_headset/afterattack(var/atom/movable/target, mob/living/user, proximity) if(!proximity) return - if(istype(target,/mob/living/simple_mob)) + if(isanimal(target)) var/mob/living/simple_mob/M = target if(!M.mob_radio) user.drop_item() diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index c7720c6f09..6c1aeee3b3 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -416,7 +416,7 @@ GLOBAL_DATUM(autospeaker, /mob/living/silicon/ai/announcer) jobname = JOB_CYBORG // --- Personal AI (pAI) --- - else if (istype(M, /mob/living/silicon/pai)) + else if (ispAI(M)) jobname = "Personal AI" // --- Unidentifiable mob --- diff --git a/code/game/objects/items/devices/scanners/health.dm b/code/game/objects/items/devices/scanners/health.dm index e7be367e7d..6831e09c1f 100644 --- a/code/game/objects/items/devices/scanners/health.dm +++ b/code/game/objects/items/devices/scanners/health.dm @@ -101,7 +101,7 @@ dat += span_boldnotice("Subject died [DisplayTimeText(tdelta)] ago - resuscitation may be possible!") dat += "
" //VOREStation edit/addition ends - if(istype(M, /mob/living/carbon/human) && mode == 1) + if(ishuman(M) && mode == 1) var/mob/living/carbon/human/H = M var/list/damaged = H.get_damaged_organs(1,1) dat += span_notice("Localized Damage, Brute/Burn:") diff --git a/code/game/objects/items/devices/scanners/sleevemate.dm b/code/game/objects/items/devices/scanners/sleevemate.dm index f74f2cc02e..540e977b68 100644 --- a/code/game/objects/items/devices/scanners/sleevemate.dm +++ b/code/game/objects/items/devices/scanners/sleevemate.dm @@ -283,7 +283,7 @@ var/global/mob/living/carbon/human/dummy/mannequin/sleevemate_mob if(!istype(target)) return - if(istype(target, /mob/living/carbon/human)) + if(ishuman(target)) var/mob/living/carbon/human/H = target if(H.resleeve_lock && stored_mind.loaded_from_ckey != H.resleeve_lock) to_chat(usr,span_warning("\The [H] is protected from impersonation!")) @@ -325,7 +325,7 @@ var/global/mob/living/carbon/human/dummy/mannequin/sleevemate_mob spark_system.set_up(5, 0, src.loc) spark_system.start() playsound(src, "sparks", 50, 1) - if(istype(src.loc,/mob/living)) + if(isliving(src.loc)) var/mob/living/L = src.loc L.unEquip(src) src.forceMove(get_turf(src)) diff --git a/code/game/objects/items/devices/translocator_vr.dm b/code/game/objects/items/devices/translocator_vr.dm index 99a2dde769..9b7956bb39 100644 --- a/code/game/objects/items/devices/translocator_vr.dm +++ b/code/game/objects/items/devices/translocator_vr.dm @@ -255,7 +255,7 @@ This device records all warnings given and teleport events for admin review in c if(!teleport_checks(target,user)) return //The checks proc can send them a message if it wants. - if(istype(target, /mob/living)) + if(isliving(target)) var/mob/living/L = target if(!L.stat) if(L != user) @@ -270,7 +270,7 @@ This device records all warnings given and teleport events for admin review in c power_source.use(charge_cost) //Unbuckle taur riders - if(istype(target, /mob/living)) + if(isliving(target)) var/mob/living/L = target if(LAZYLEN(L.buckled_mobs)) var/datum/riding/R = L.riding_datum diff --git a/code/game/objects/items/falling_object_vr.dm b/code/game/objects/items/falling_object_vr.dm index c8583db3c6..d077304d8e 100644 --- a/code/game/objects/items/falling_object_vr.dm +++ b/code/game/objects/items/falling_object_vr.dm @@ -31,7 +31,7 @@ qdel(src) /atom/movable/proc/end_fall(var/crushing = FALSE) - if(istype(src, /mob/living)) + if(isliving(src)) var/mob/living/L = src if(L.vore_selected && L.can_be_drop_pred && L.drop_vore) for(var/mob/living/P in loc) diff --git a/code/game/objects/items/lockpicks.dm b/code/game/objects/items/lockpicks.dm index 0af583a173..843b0608de 100644 --- a/code/game/objects/items/lockpicks.dm +++ b/code/game/objects/items/lockpicks.dm @@ -30,7 +30,7 @@ if(do_after(user, pick_time * D.lock_difficulty)) to_chat(user, span_notice("Success!")) D.locked = FALSE - else if(istype(A,/mob/living/carbon/human)) //you can pick your friends, and you can pick your nose, but you can't pick your friend's nose + else if(ishuman(A)) //you can pick your friends, and you can pick your nose, but you can't pick your friend's nose var/mob/living/carbon/human/H = A if(user.zone_sel.selecting == BP_HEAD) if(H == user) diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm index 4d7265f233..94c9a464b9 100644 --- a/code/game/objects/items/stacks/medical.dm +++ b/code/game/objects/items/stacks/medical.dm @@ -29,7 +29,7 @@ to_chat(user, span_warning("There's not enough [uses_charge ? "charge" : "items"] left to use that!")) return 1 - if (istype(M, /mob/living/carbon/human)) + if (ishuman(M)) var/mob/living/carbon/human/H = M var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting) @@ -94,7 +94,7 @@ if(..()) return 1 - if (istype(M, /mob/living/carbon/human)) + if (ishuman(M)) var/mob/living/carbon/human/H = M var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting) @@ -163,7 +163,7 @@ if(..()) return 1 - if (istype(M, /mob/living/carbon/human)) + if (ishuman(M)) var/mob/living/carbon/human/H = M var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting) @@ -237,7 +237,7 @@ if(..()) return 1 - if (istype(M, /mob/living/carbon/human)) + if (ishuman(M)) var/mob/living/carbon/human/H = M var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting) @@ -282,7 +282,7 @@ if(..()) return 1 - if (istype(M, /mob/living/carbon/human)) + if (ishuman(M)) var/mob/living/carbon/human/H = M var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting) @@ -352,7 +352,7 @@ if(..()) return 1 - if (istype(M, /mob/living/carbon/human)) + if (ishuman(M)) var/mob/living/carbon/human/H = M var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting) @@ -395,7 +395,7 @@ if(..()) return 1 - if (istype(M, /mob/living/carbon/human)) + if (ishuman(M)) var/mob/living/carbon/human/H = M var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting) var/limb = affecting.name diff --git a/code/game/objects/items/stacks/nanopaste.dm b/code/game/objects/items/stacks/nanopaste.dm index 8267de0047..f05a6e0585 100644 --- a/code/game/objects/items/stacks/nanopaste.dm +++ b/code/game/objects/items/stacks/nanopaste.dm @@ -26,7 +26,7 @@ else to_chat(user, span_notice("All [R]'s systems are nominal.")) - if (istype(M,/mob/living/carbon/human)) //Repairing robolimbs + if (ishuman(M)) //Repairing robolimbs var/mob/living/carbon/human/H = M var/obj/item/organ/external/S = H.get_organ(user.zone_sel.selecting) if(!S) diff --git a/code/game/objects/items/toys/toys.dm b/code/game/objects/items/toys/toys.dm index 96b786c58b..71c96d7b1c 100644 --- a/code/game/objects/items/toys/toys.dm +++ b/code/game/objects/items/toys/toys.dm @@ -185,7 +185,7 @@ cut_overlays() //So that it doesn't keep stacking overlays non-stop on top of each other if(active) add_overlay(blade_overlay) - if(istype(usr,/mob/living/carbon/human)) + if(ishuman(usr)) var/mob/living/carbon/human/H = usr H.update_inv_l_hand() H.update_inv_r_hand() diff --git a/code/game/objects/items/toys/toys_vr.dm b/code/game/objects/items/toys/toys_vr.dm index 443f4c3f86..4e98ad54f6 100644 --- a/code/game/objects/items/toys/toys_vr.dm +++ b/code/game/objects/items/toys/toys_vr.dm @@ -504,7 +504,7 @@ user.visible_message(span_warning("[user] presses the big red button."), span_notice("You press the button, it plays a loud noise!"), span_notice("The button clicks loudly.")) 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(2) // Short delay to match up with the explosion sound shake_camera(M, 2, 1) else @@ -869,7 +869,7 @@ icon_state = "tastybread" /obj/item/toy/snake_popper/attack(mob/living/M as mob, mob/user as mob) - if(istype(M,/mob/living/carbon/human)) + if(ishuman(M)) if(!popped) to_chat(user, span_warning("A snake popped out of [src]!")) if(real == 0) @@ -1024,7 +1024,7 @@ /obj/item/toy/desk/MouseDrop(mob/user as mob) // Code from Paper bin, so you can still pick up the deck if((user == usr && (!( user.restrained() ) && (!( user.stat ) && (user.contents.Find(src) || in_range(src, user)))))) - if(!istype(user, /mob/living/simple_mob)) + if(!isanimal(user)) if(!user.get_active_hand()) //if active hand is empty var/mob/living/carbon/human/H = user var/obj/item/organ/external/temp = H.organs_by_name["r_hand"] diff --git a/code/game/objects/items/weapons/AI_modules.dm b/code/game/objects/items/weapons/AI_modules.dm index 25ae7e9f81..6c0b0db1ac 100644 --- a/code/game/objects/items/weapons/AI_modules.dm +++ b/code/game/objects/items/weapons/AI_modules.dm @@ -76,7 +76,7 @@ AI MODULES comp.current.show_laws() to_chat(user, "Upload complete. The robot's laws have been modified.") - else if(istype(AM, /mob/living/silicon/robot)) + else if(isrobot(AM)) var/mob/living/silicon/robot/R = AM if(R.stat == DEAD) to_chat(user, span_warning("Law Upload Error: Unit is nonfunctional.")) diff --git a/code/game/objects/items/weapons/autopsy.dm b/code/game/objects/items/weapons/autopsy.dm index 1b9662d782..cfe04ba837 100644 --- a/code/game/objects/items/weapons/autopsy.dm +++ b/code/game/objects/items/weapons/autopsy.dm @@ -71,7 +71,7 @@ set category = "Object" set src in view(usr, 1) set name = "Print Data" - if(usr.stat || !(istype(usr,/mob/living/carbon/human))) + if(usr.stat || !(ishuman(usr))) to_chat(usr, "No.") return diff --git a/code/game/objects/items/weapons/canes.dm b/code/game/objects/items/weapons/canes.dm index cd500211a1..165856b542 100644 --- a/code/game/objects/items/weapons/canes.dm +++ b/code/game/objects/items/weapons/canes.dm @@ -115,7 +115,7 @@ force = 3 attack_verb = list("hit", "poked", "prodded") - if(istype(user,/mob/living/carbon/human)) + if(ishuman(user)) var/mob/living/carbon/human/H = user H.update_inv_l_hand() H.update_inv_r_hand() diff --git a/code/game/objects/items/weapons/clown_items.dm b/code/game/objects/items/weapons/clown_items.dm index 88a7a33271..958cd36731 100644 --- a/code/game/objects/items/weapons/clown_items.dm +++ b/code/game/objects/items/weapons/clown_items.dm @@ -11,7 +11,7 @@ /obj/item/bananapeel/Crossed(atom/movable/AM as mob|obj) if(AM.is_incorporeal()) return - if(istype(AM, /mob/living)) + if(isliving(AM)) var/mob/living/M = AM M.slip("the [src.name]",4) /* @@ -28,7 +28,7 @@ /obj/item/soap/Crossed(atom/movable/AM as mob|obj) if(AM.is_incorporeal()) return - if(istype(AM, /mob/living)) + if(isliving(AM)) var/mob/living/M = AM M.slip("the [src.name]",3) @@ -83,5 +83,5 @@ /obj/item/bikehorn/Crossed(atom/movable/AM as mob|obj) if(AM.is_incorporeal()) return - if(istype(AM, /mob/living)) + if(isliving(AM)) playsound(src, honk_sound, 50, 1) diff --git a/code/game/objects/items/weapons/dna_injector.dm b/code/game/objects/items/weapons/dna_injector.dm index 1348a5860c..8a0a4493f8 100644 --- a/code/game/objects/items/weapons/dna_injector.dm +++ b/code/game/objects/items/weapons/dna_injector.dm @@ -64,7 +64,7 @@ return buf.dna.SetUIValue(real_block,val) /obj/item/dnainjector/proc/inject(mob/M as mob, mob/user as mob) - if(istype(M,/mob/living)) + if(isliving(M)) var/mob/living/L = M L.apply_effect(rand(5,20), IRRADIATE, check_protection = 0) L.apply_damage(max(2,L.getCloneLoss()), CLONE) diff --git a/code/game/objects/items/weapons/explosives.dm b/code/game/objects/items/weapons/explosives.dm index 6151cd98e0..88296337ac 100644 --- a/code/game/objects/items/weapons/explosives.dm +++ b/code/game/objects/items/weapons/explosives.dm @@ -82,7 +82,7 @@ if (istype(target, /turf/simulated/wall)) var/turf/simulated/wall/W = target W.dismantle_wall(1,1,1) - else if(istype(target, /mob/living)) + else if(isliving(target)) target.ex_act(2) // c4 can't gib mobs anymore. else target.ex_act(1) diff --git a/code/game/objects/items/weapons/gift_wrappaper.dm b/code/game/objects/items/weapons/gift_wrappaper.dm index 57d50de647..b120b35804 100644 --- a/code/game/objects/items/weapons/gift_wrappaper.dm +++ b/code/game/objects/items/weapons/gift_wrappaper.dm @@ -170,7 +170,7 @@ . += "There is about [src.amount] square units of paper left!" /obj/item/wrapping_paper/attack(mob/target as mob, mob/user as mob) - if (!istype(target, /mob/living/carbon/human)) return + if (!ishuman(target)) return var/mob/living/carbon/human/H = target if (istype(H.wear_suit, /obj/item/clothing/suit/straight_jacket) || H.stat) diff --git a/code/game/objects/items/weapons/grenades/concussion.dm b/code/game/objects/items/weapons/grenades/concussion.dm index 752888ad41..12851d98e7 100644 --- a/code/game/objects/items/weapons/grenades/concussion.dm +++ b/code/game/objects/items/weapons/grenades/concussion.dm @@ -74,7 +74,7 @@ H.sdisabilities |= DEAF else if(H.ear_damage >= 5) to_chat(H, span_danger("Your ears start to ring!")) - if(istype(L, /mob/living/silicon/robot)) + if(isrobot(L)) var/mob/living/silicon/robot/R = L if(L.client) if(prob(50)) diff --git a/code/game/objects/items/weapons/handcuffs.dm b/code/game/objects/items/weapons/handcuffs.dm index 7cc67de51b..92c8683e5c 100644 --- a/code/game/objects/items/weapons/handcuffs.dm +++ b/code/game/objects/items/weapons/handcuffs.dm @@ -51,7 +51,7 @@ /obj/item/handcuffs/proc/can_place(var/mob/target, var/mob/user) if(user == target) return 1 - if(istype(user, /mob/living/silicon/robot)) + if(isrobot(user)) if(user.Adjacent(target)) return 1 else diff --git a/code/game/objects/items/weapons/implants/implant.dm b/code/game/objects/items/weapons/implants/implant.dm index 00856b0114..02440ee2de 100644 --- a/code/game/objects/items/weapons/implants/implant.dm +++ b/code/game/objects/items/weapons/implants/implant.dm @@ -441,7 +441,7 @@ the implant may become unstable and either pre-maturely inject the subject or si /obj/item/implant/loyalty/handle_implant(mob/M, target_zone = BP_TORSO) . = ..(M, target_zone) - if(!istype(M, /mob/living/carbon/human)) + if(!ishuman(M)) . = FALSE var/mob/living/carbon/human/H = M var/datum/antagonist/antag_data = get_antag_data(H.mind.special_role) diff --git a/code/game/objects/items/weapons/implants/implant_vr.dm b/code/game/objects/items/weapons/implants/implant_vr.dm index 0ed3726191..bd76d493ce 100644 --- a/code/game/objects/items/weapons/implants/implant_vr.dm +++ b/code/game/objects/items/weapons/implants/implant_vr.dm @@ -90,7 +90,7 @@ if (malfunction) return - if(istype(imp_in, /mob/living)) + if(isliving(imp_in)) var/mob/living/H = imp_in if(findtext(msg,"implant-toggle")) active = !active @@ -113,7 +113,7 @@ /obj/item/implant/sizecontrol/emp_act(severity) - if(istype(imp_in, /mob/living)) + if(isliving(imp_in)) var/newsize = pick(RESIZE_HUGE,RESIZE_BIG,RESIZE_NORMAL,RESIZE_SMALL,RESIZE_TINY,RESIZE_A_HUGEBIG,RESIZE_A_BIGNORMAL,RESIZE_A_NORMALSMALL,RESIZE_A_SMALLTINY) var/mob/living/H = imp_in H.resize(newsize) diff --git a/code/game/objects/items/weapons/implants/implantchair.dm b/code/game/objects/items/weapons/implants/implantchair.dm index d98081ed0b..281068a130 100644 --- a/code/game/objects/items/weapons/implants/implantchair.dm +++ b/code/game/objects/items/weapons/implants/implantchair.dm @@ -47,7 +47,7 @@ /obj/machinery/implantchair/Topic(href, href_list) - if((get_dist(src, usr) <= 1) || istype(usr, /mob/living/silicon/ai)) + if((get_dist(src, usr) <= 1) || isAI(usr)) if(href_list["implant"]) if(src.occupant) injecting = 1 diff --git a/code/game/objects/items/weapons/implants/implanter.dm b/code/game/objects/items/weapons/implants/implanter.dm index 7caf0d361f..f385529ee8 100644 --- a/code/game/objects/items/weapons/implants/implanter.dm +++ b/code/game/objects/items/weapons/implants/implanter.dm @@ -146,7 +146,7 @@ to_chat(user, span_warning("You can't store \the [A.name] in this!")) c.scanned = null return - if(istype(A.loc,/mob/living/carbon/human)) + if(ishuman(A.loc)) var/mob/living/carbon/human/H = A.loc H.remove_from_mob(A) else if(istype(A.loc,/obj/item/storage)) diff --git a/code/game/objects/items/weapons/material/material_armor.dm b/code/game/objects/items/weapons/material/material_armor.dm index e30cf4bcf4..a85d088a47 100644 --- a/code/game/objects/items/weapons/material/material_armor.dm +++ b/code/game/objects/items/weapons/material/material_armor.dm @@ -92,7 +92,7 @@ Protectiveness | Armor % return var/turf/T = get_turf(src) T.visible_message(span_danger("\The [src] [material.destruction_desc]!")) - if(istype(loc, /mob/living)) + if(isliving(loc)) var/mob/living/M = loc M.drop_from_inventory(src) if(material.shard_type == SHARD_SHARD) // Wearing glass armor is a bad idea. diff --git a/code/game/objects/items/weapons/material/material_weapons.dm b/code/game/objects/items/weapons/material/material_weapons.dm index 0a96d13303..5c2c7bc0f2 100644 --- a/code/game/objects/items/weapons/material/material_weapons.dm +++ b/code/game/objects/items/weapons/material/material_weapons.dm @@ -107,7 +107,7 @@ /obj/item/material/proc/shatter(var/consumed) var/turf/T = get_turf(src) T.visible_message(span_danger("\The [src] [material.destruction_desc]!")) - if(istype(loc, /mob/living)) + if(isliving(loc)) var/mob/living/M = loc M.drop_from_inventory(src) playsound(src, "shatter", 70, 1) diff --git a/code/game/objects/items/weapons/material/misc.dm b/code/game/objects/items/weapons/material/misc.dm index a5ed90fc51..ff3a054bce 100644 --- a/code/game/objects/items/weapons/material/misc.dm +++ b/code/game/objects/items/weapons/material/misc.dm @@ -155,11 +155,11 @@ if(user.a_intent) switch(user.a_intent) if(I_HURT) - if(prob(10) && istype(target, /mob/living/carbon/human) && (user.zone_sel in list(BP_L_LEG, BP_R_LEG, BP_L_FOOT, BP_R_FOOT, BP_L_ARM, BP_R_ARM, BP_L_HAND, BP_R_HAND))) + if(prob(10) && ishuman(target) && (user.zone_sel in list(BP_L_LEG, BP_R_LEG, BP_L_FOOT, BP_R_FOOT, BP_L_ARM, BP_R_ARM, BP_L_HAND, BP_R_HAND))) to_chat(target, span_warning("\The [src] rips at your hands!")) ranged_disarm(target) if(I_DISARM) - if(prob(min(90, force * 3)) && istype(target, /mob/living/carbon/human) && (user.zone_sel in list(BP_L_LEG, BP_R_LEG, BP_L_FOOT, BP_R_FOOT, BP_L_ARM, BP_R_ARM, BP_L_HAND, BP_R_HAND))) + if(prob(min(90, force * 3)) && ishuman(target) && (user.zone_sel in list(BP_L_LEG, BP_R_LEG, BP_L_FOOT, BP_R_FOOT, BP_L_ARM, BP_R_ARM, BP_L_HAND, BP_R_HAND))) ranged_disarm(target) else target.visible_message(span_danger("\The [src] sends \the [target] stumbling away.")) diff --git a/code/game/objects/items/weapons/material/thrown.dm b/code/game/objects/items/weapons/material/thrown.dm index ede76094e2..cb6f7a17a9 100644 --- a/code/game/objects/items/weapons/material/thrown.dm +++ b/code/game/objects/items/weapons/material/thrown.dm @@ -16,7 +16,7 @@ /obj/item/material/star/throw_impact(atom/hit_atom) ..() - if(material.radioactivity>0 && istype(hit_atom,/mob/living)) + if(material.radioactivity>0 && isliving(hit_atom)) var/mob/living/M = hit_atom M.adjustToxLoss(rand(20,40)) diff --git a/code/game/objects/items/weapons/melee/energy.dm b/code/game/objects/items/weapons/melee/energy.dm index debbc5cdb4..96b96712d0 100644 --- a/code/game/objects/items/weapons/melee/energy.dm +++ b/code/game/objects/items/weapons/melee/energy.dm @@ -112,7 +112,7 @@ else activate(user) - if(istype(user,/mob/living/carbon/human)) + if(ishuman(user)) var/mob/living/carbon/human/H = user H.update_inv_l_hand() H.update_inv_r_hand() @@ -170,7 +170,7 @@ cut_overlays() //So that it doesn't keep stacking overlays non-stop on top of each other if(active) add_overlay(blade_overlay) - if(istype(usr,/mob/living/carbon/human)) + if(ishuman(usr)) var/mob/living/carbon/human/H = usr H.update_inv_l_hand() H.update_inv_r_hand() @@ -459,7 +459,7 @@ /obj/item/melee/energy/blade/process() 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) diff --git a/code/game/objects/items/weapons/melee/misc_vr.dm b/code/game/objects/items/weapons/melee/misc_vr.dm index 092ec05891..702ad5ef1d 100644 --- a/code/game/objects/items/weapons/melee/misc_vr.dm +++ b/code/game/objects/items/weapons/melee/misc_vr.dm @@ -27,7 +27,7 @@ defend_chance = 0 /obj/item/melee/hammer/apply_hit_effect(mob/living/target, mob/living/user, var/hit_zone, var/attack_modifier) - if(istype(target,/mob/living/carbon/human)) + if(ishuman(target)) var/mob/living/carbon/human/H = target if(prob(50)) var/obj/item/organ/external/affecting = H.get_organ(hit_zone) diff --git a/code/game/objects/items/weapons/mop_deploy.dm b/code/game/objects/items/weapons/mop_deploy.dm index 315fc56e42..9b63216af2 100644 --- a/code/game/objects/items/weapons/mop_deploy.dm +++ b/code/game/objects/items/weapons/mop_deploy.dm @@ -62,7 +62,7 @@ /obj/item/mop_deploy/process() 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) diff --git a/code/game/objects/items/weapons/policetape.dm b/code/game/objects/items/weapons/policetape.dm index f2f0c9f4e4..46c1588244 100644 --- a/code/game/objects/items/weapons/policetape.dm +++ b/code/game/objects/items/weapons/policetape.dm @@ -323,7 +323,7 @@ var/list/tape_roll_applications = list() add_fingerprint(M) if(!allowed(M)) //only select few learn art of not crumpling the tape to_chat(M, span_warning("You are not supposed to go past \the [src]...")) - if(M.a_intent == I_HELP && !(istype(M, /mob/living/simple_mob))) + if(M.a_intent == I_HELP && !(isanimal(M))) return FALSE crumple() return ..() diff --git a/code/game/objects/items/weapons/scrolls.dm b/code/game/objects/items/weapons/scrolls.dm index dd18c3a68a..1fc735cf69 100644 --- a/code/game/objects/items/weapons/scrolls.dm +++ b/code/game/objects/items/weapons/scrolls.dm @@ -35,7 +35,7 @@ if (usr.stat || usr.restrained() || src.loc != usr) return var/mob/living/carbon/human/H = usr - if (!( istype(H, /mob/living/carbon/human))) + if (!ishuman(H)) return 1 if ((usr == src.loc || (in_range(src, usr) && istype(src.loc, /turf)))) usr.set_machine(src) diff --git a/code/game/objects/items/weapons/shields.dm b/code/game/objects/items/weapons/shields.dm index d5917f2179..1055edef2c 100644 --- a/code/game/objects/items/weapons/shields.dm +++ b/code/game/objects/items/weapons/shields.dm @@ -174,7 +174,7 @@ playsound(src, 'sound/weapons/saberoff.ogg', 50, 1) to_chat(user, span_notice("\The [src] can now be concealed.")) - if(istype(user,/mob/living/carbon/human)) + if(ishuman(user)) var/mob/living/carbon/human/H = user H.update_inv_l_hand() H.update_inv_r_hand() @@ -197,7 +197,7 @@ set_light(0) item_state = "[icon_state]" - if(istype(usr,/mob/living/carbon/human)) + if(ishuman(usr)) var/mob/living/carbon/human/H = usr H.update_inv_l_hand() H.update_inv_r_hand() @@ -257,7 +257,7 @@ slot_flags = null to_chat(user, span_notice("[src] can now be concealed.")) - if(istype(user,/mob/living/carbon/human)) + if(ishuman(user)) var/mob/living/carbon/human/H = user H.update_inv_l_hand() H.update_inv_r_hand() diff --git a/code/game/objects/items/weapons/shields_vr.dm b/code/game/objects/items/weapons/shields_vr.dm index 96afa59be6..b02800c267 100644 --- a/code/game/objects/items/weapons/shields_vr.dm +++ b/code/game/objects/items/weapons/shields_vr.dm @@ -49,7 +49,7 @@ to_chat(user, "You [on ? "enable" : "disable"] the shield light.") update_flashlight(user) - if(istype(user,/mob/living/carbon/human)) + if(ishuman(user)) var/mob/living/carbon/human/H = user H.update_inv_l_hand() H.update_inv_r_hand() diff --git a/code/game/objects/items/weapons/storage/backpack.dm b/code/game/objects/items/weapons/storage/backpack.dm index 1cf073b8f2..843f3fa4fd 100644 --- a/code/game/objects/items/weapons/storage/backpack.dm +++ b/code/game/objects/items/weapons/storage/backpack.dm @@ -504,7 +504,7 @@ set category = "Object" set src in usr - if(!istype(src.loc, /mob/living)) + if(!isliving(src.loc)) return var/mob/living/carbon/human/H = usr diff --git a/code/game/objects/items/weapons/storage/bags.dm b/code/game/objects/items/weapons/storage/bags.dm index add1c8f968..22ca942f6a 100644 --- a/code/game/objects/items/weapons/storage/bags.dm +++ b/code/game/objects/items/weapons/storage/bags.dm @@ -235,7 +235,7 @@ if(!Adjacent(user)) //Can only check the contents of ore bags if you can physically reach them. return . - if(istype(user, /mob/living)) + if(isliving(user)) add_fingerprint(user) . += span_notice("It holds:") diff --git a/code/game/objects/items/weapons/storage/storage.dm b/code/game/objects/items/weapons/storage/storage.dm index 6d41c51a98..5e24ac1da4 100644 --- a/code/game/objects/items/weapons/storage/storage.dm +++ b/code/game/objects/items/weapons/storage/storage.dm @@ -698,7 +698,7 @@ max_storage_space = max(total_storage_space,max_storage_space) //Prevents spawned containers from being too small for their contents. /obj/item/storage/emp_act(severity) - if(!istype(src.loc, /mob/living)) + if(!isliving(src.loc)) for(var/obj/O in contents) O.emp_act(severity) ..() diff --git a/code/game/objects/items/weapons/swords_axes_etc.dm b/code/game/objects/items/weapons/swords_axes_etc.dm index ecae56a650..c4e1a164b0 100644 --- a/code/game/objects/items/weapons/swords_axes_etc.dm +++ b/code/game/objects/items/weapons/swords_axes_etc.dm @@ -76,7 +76,7 @@ force = 3//not so robust now attack_verb = list("hit", "punched") - if(istype(user,/mob/living/carbon/human)) + if(ishuman(user)) var/mob/living/carbon/human/H = user H.update_inv_l_hand() H.update_inv_r_hand() diff --git a/code/game/objects/items/weapons/tanks/tanks.dm b/code/game/objects/items/weapons/tanks/tanks.dm index e09f4a1804..731c007f01 100644 --- a/code/game/objects/items/weapons/tanks/tanks.dm +++ b/code/game/objects/items/weapons/tanks/tanks.dm @@ -296,7 +296,7 @@ var/list/global/tank_gauge_cache = list() var/can_open_valve if(location.wear_mask && (location.wear_mask.item_flags & AIRTIGHT)) can_open_valve = 1 - else if(istype(location,/mob/living/carbon/human)) + else if(ishuman(location)) var/mob/living/carbon/human/H = location if(H.head && (H.head.item_flags & AIRTIGHT)) can_open_valve = 1 diff --git a/code/game/objects/items/weapons/tape.dm b/code/game/objects/items/weapons/tape.dm index b00ade3ace..c9b2aea263 100644 --- a/code/game/objects/items/weapons/tape.dm +++ b/code/game/objects/items/weapons/tape.dm @@ -10,7 +10,7 @@ toolspeed = 2 //It is now used in surgery as a not awful, but probably dangerous option, due to speed. /obj/item/tape_roll/proc/can_place(var/mob/living/carbon/human/H, var/mob/user) - if(istype(user, /mob/living/silicon/robot) || user == H) + if(isrobot(user) || user == H) return TRUE for (var/obj/item/grab/G in H.grabbed_by) diff --git a/code/game/objects/items/weapons/tools/weldingtool.dm b/code/game/objects/items/weapons/tools/weldingtool.dm index ed36b077e5..3892df5114 100644 --- a/code/game/objects/items/weapons/tools/weldingtool.dm +++ b/code/game/objects/items/weapons/tools/weldingtool.dm @@ -147,7 +147,7 @@ setWelding(0) else //Only start fires when its on and has enough fuel to actually keep working var/turf/location = src.loc - if(istype(location, /mob/living)) + if(isliving(location)) var/mob/living/M = location if(M.item_is_in_hands(src)) location = get_turf(M) @@ -322,7 +322,7 @@ return 1 var/safety = user.eyecheck() safety = between(-1, safety + eye_safety_modifier, 2) - if(istype(user, /mob/living/carbon/human)) + if(ishuman(user)) var/mob/living/carbon/human/H = user var/obj/item/organ/internal/eyes/E = H.internal_organs_by_name[O_EYES] if(!E) @@ -508,7 +508,7 @@ /obj/item/weldingtool/tubefed/process() if(mounted_pack) - if(!istype(mounted_pack.loc,/mob/living/carbon/human)) + if(!ishuman(mounted_pack.loc)) mounted_pack.return_nozzle() else var/mob/living/carbon/human/H = mounted_pack.loc diff --git a/code/game/objects/items/weapons/weldbackpack.dm b/code/game/objects/items/weapons/weldbackpack.dm index ae6bea6ddd..0798fc9d54 100644 --- a/code/game/objects/items/weapons/weldbackpack.dm +++ b/code/game/objects/items/weapons/weldbackpack.dm @@ -87,7 +87,7 @@ return /obj/item/weldpack/attack_hand(mob/user as mob) - if(istype(user, /mob/living/carbon/human)) + if(ishuman(user)) var/mob/living/carbon/human/wearer = user if(wearer.back == src) if(nozzle && nozzle_attached) diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index dd15a470d1..46f33c7a34 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -102,7 +102,7 @@ if ((M.client && M.machine == src)) is_in_use = 1 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 = 1 @@ -110,7 +110,7 @@ // check for TK users - if (istype(usr, /mob/living/carbon/human)) + if (ishuman(usr)) var/mob/living/carbon/human/H = usr if(H.get_type_in_hands(/obj/item/tk_grab)) if(!(H in nearby)) diff --git a/code/game/objects/random/mob_vr.dm b/code/game/objects/random/mob_vr.dm index e13801e149..f57843b463 100644 --- a/code/game/objects/random/mob_vr.dm +++ b/code/game/objects/random/mob_vr.dm @@ -190,7 +190,7 @@ /obj/random/outside_mob/spawn_item() . = ..() - if(istype(., /mob/living/simple_mob)) + if(isanimal(.)) var/mob/living/simple_mob/this_mob = . this_mob.faction = src.faction if (this_mob.minbodytemp > 200) // Temporary hotfix. Eventually I'll add code to change all mob vars to fit the environment they are spawned in. diff --git a/code/game/objects/structures.dm b/code/game/objects/structures.dm index 13db2e0c07..7980ade49a 100644 --- a/code/game/objects/structures.dm +++ b/code/game/objects/structures.dm @@ -30,7 +30,7 @@ if(HULK in user.mutations) user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" )) attack_generic(user,1,"smashes") - else if(istype(user,/mob/living/carbon/human)) + else if(ishuman(user)) var/mob/living/carbon/human/H = user if(H.species.can_shred(user)) attack_generic(user,1,"slices") diff --git a/code/game/objects/structures/crates_lockers/__closets.dm b/code/game/objects/structures/crates_lockers/__closets.dm index 9c1cba9582..3bfa5ff727 100644 --- a/code/game/objects/structures/crates_lockers/__closets.dm +++ b/code/game/objects/structures/crates_lockers/__closets.dm @@ -53,7 +53,7 @@ starts_with = null if(!opened) // if closed, any item at the crate's loc is put in the contents - if(istype(loc, /mob/living)) return + if(isliving(loc)) return var/obj/item/I for(I in loc) if(I.density || I.anchored || I == src) continue @@ -552,7 +552,7 @@ set category = "Object" set name = "Vore Occupants" - if(!istype(usr, /mob/living)) //no ghosts + if(!isliving(usr)) //no ghosts return if(!(usr in src.contents)) @@ -562,7 +562,7 @@ var/list/targets = list() //IF IT IS NOT BROKEN. DO NOT FIX IT. for(var/mob/living/L in src.contents) - if(!istype(L, /mob/living)) //Don't eat anything that isn't mob/living. Failsafe. + if(!isliving(L)) //Don't eat anything that isn't mob/living. Failsafe. continue if(L == usr) //no eating yourself. 1984. continue @@ -578,7 +578,7 @@ if(!target) return - if(!istype(target, /mob/living)) //Safety. + if(!isliving(target)) //Safety. to_chat(src, span_warning("You need to select a living target!")) return diff --git a/code/game/objects/structures/crates_lockers/closets/walllocker.dm b/code/game/objects/structures/crates_lockers/closets/walllocker.dm index 08519aa845..6eb76b8436 100644 --- a/code/game/objects/structures/crates_lockers/closets/walllocker.dm +++ b/code/game/objects/structures/crates_lockers/closets/walllocker.dm @@ -31,7 +31,7 @@ return /obj/structure/closet/walllocker/emerglocker/attack_hand(mob/user as mob) - if (istype(user, /mob/living/silicon/ai)) //Added by Strumpetplaya - AI shouldn't be able to + if (isAI(user)) //Added by Strumpetplaya - AI shouldn't be able to return //activate emergency lockers. This fixes that. (Does this make sense, the AI can't call attack_hand, can it? --Mloc) if(!amount) to_chat(user, "It's empty..") diff --git a/code/game/objects/structures/gargoyle.dm b/code/game/objects/structures/gargoyle.dm index 04ef9cd127..aee62c0f20 100644 --- a/code/game/objects/structures/gargoyle.dm +++ b/code/game/objects/structures/gargoyle.dm @@ -279,7 +279,7 @@ if(gargoyle.adminbus_trash || is_type_in_list(I,edible_trash) && I.trash_eatable && !is_type_in_list(I,item_vore_blacklist)) gargoyle.hitby(AM, speed) return - else if(istype(AM,/mob/living) && gargoyle) + else if(isliving(AM) && gargoyle) var/mob/living/L = AM if(gargoyle.throw_vore && L.throw_vore && gargoyle.can_be_drop_pred && L.can_be_drop_prey) var/drop_prey_temp = FALSE diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm index f9d80277a4..93098250c2 100644 --- a/code/game/objects/structures/grille.dm +++ b/code/game/objects/structures/grille.dm @@ -32,7 +32,7 @@ var/damage_dealt = 1 var/attack_message = "kicks" - if(istype(user,/mob/living/carbon/human)) + if(ishuman(user)) var/mob/living/carbon/human/H = user if(H.species.can_shred(H)) attack_message = "mangles" diff --git a/code/game/objects/structures/kitchen_spike.dm b/code/game/objects/structures/kitchen_spike.dm index de43c6d85e..26c93c9a85 100644 --- a/code/game/objects/structures/kitchen_spike.dm +++ b/code/game/objects/structures/kitchen_spike.dm @@ -32,7 +32,7 @@ if(!istype(victim)) return - if(istype(victim, /mob/living/carbon/human)) + if(ishuman(victim)) var/mob/living/carbon/human/H = victim if(istype(H.species, /datum/species/monkey)) meat_type = H.species.meat_type diff --git a/code/game/objects/structures/medical_stand_vr.dm b/code/game/objects/structures/medical_stand_vr.dm index 7e7a89f641..050027b329 100644 --- a/code/game/objects/structures/medical_stand_vr.dm +++ b/code/game/objects/structures/medical_stand_vr.dm @@ -226,7 +226,7 @@ set name = "Toggle IV 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 diff --git a/code/game/objects/structures/morgue_vr.dm b/code/game/objects/structures/morgue_vr.dm index d52ac601e2..f98d308bb3 100644 --- a/code/game/objects/structures/morgue_vr.dm +++ b/code/game/objects/structures/morgue_vr.dm @@ -22,7 +22,7 @@ if(!(I in allowed_items)) to_chat(user, span_notice("\The [src] cannot cremate while there are items inside!")) return - if(istype(I, /mob/living)) + if(isliving(I)) var/mob/living/cremated = I for(var/Z in cremated.contents) if(!(Z in allowed_items)) diff --git a/code/game/objects/structures/props/swarm.dm b/code/game/objects/structures/props/swarm.dm index f257f9d4c7..95d3249d7c 100644 --- a/code/game/objects/structures/props/swarm.dm +++ b/code/game/objects/structures/props/swarm.dm @@ -12,7 +12,7 @@ var/list/active_beams /obj/structure/cult/pylon/swarm/CanPass(atom/movable/mover, turf/target) - if(istype(mover, /mob/living)) + if(isliving(mover)) var/mob/living/L = mover if(L.faction == FACTION_SWARMER) return TRUE diff --git a/code/game/objects/structures/railing.dm b/code/game/objects/structures/railing.dm index cb7048f66b..863f957c1f 100644 --- a/code/game/objects/structures/railing.dm +++ b/code/game/objects/structures/railing.dm @@ -233,7 +233,7 @@ // Handle harm intent grabbing/tabling. if(istype(W, /obj/item/grab) && get_dist(src,user)<2) var/obj/item/grab/G = W - if (istype(G.affecting, /mob/living)) + if (isliving(G.affecting)) var/mob/living/M = G.affecting var/obj/occupied = turf_is_crowded() if(occupied) diff --git a/code/game/objects/structures/stool_bed_chair_nest/alien_nests.dm b/code/game/objects/structures/stool_bed_chair_nest/alien_nests.dm index b731aa690d..fdf8ce36f0 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/alien_nests.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/alien_nests.dm @@ -43,7 +43,7 @@ #undef NEST_RESIST_TIME /obj/structure/bed/nest/user_buckle_mob(mob/M as mob, mob/user as mob) - if ( !ismob(M) || (get_dist(src, user) > 1) || (M.loc != src.loc) || user.restrained() || user.stat || M.buckled || istype(user, /mob/living/silicon/pai) ) + if ( !ismob(M) || (get_dist(src, user) > 1) || (M.loc != src.loc) || user.restrained() || user.stat || M.buckled || ispAI(user) ) return unbuckle_mob() diff --git a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm index 77ae22ede5..1889ea2617 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm @@ -246,7 +246,7 @@ occupant.apply_effect(6, STUTTER, blocked) occupant.apply_damage(10, BRUTE, def_zone, blocked, soaked) playsound(src, 'sound/weapons/punch1.ogg', 50, 1, -1) - if(istype(A, /mob/living)) + if(isliving(A)) var/mob/living/victim = A def_zone = ran_zone() blocked = victim.run_armor_check(def_zone, "melee") diff --git a/code/game/objects/structures/stool_bed_chair_nest/stools.dm b/code/game/objects/structures/stool_bed_chair_nest/stools.dm index 18bacdfe08..1da166eeab 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/stools.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/stools.dm @@ -72,7 +72,7 @@ var/global/list/stool_cache = list() //haha stool update_icon() /obj/item/stool/attack(mob/M as mob, mob/user as mob) - if (prob(5) && istype(M,/mob/living)) + if (prob(5) && isliving(M)) user.visible_message(span_danger("[user] breaks [src] over [M]'s back!")) user.setClickCooldown(user.get_attack_speed()) user.do_attack_animation(M) diff --git a/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm b/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm index 74cb3b6db4..8d56aa70d4 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm @@ -195,7 +195,7 @@ occupant.apply_effect(6, STUTTER, blocked) occupant.apply_damage(10, BRUTE, def_zone, soaked) playsound(src, 'sound/weapons/punch1.ogg', 50, 1, -1) - if(istype(A, /mob/living)) + if(isliving(A)) var/mob/living/victim = A def_zone = ran_zone() blocked = victim.run_armor_check(def_zone, "melee") diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index 7221282f1d..16599ababc 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -187,7 +187,7 @@ else if (user.a_intent == I_HURT) - if (istype(user,/mob/living/carbon/human)) + if (ishuman(user)) var/mob/living/carbon/human/H = user if(H.species.can_shred(H)) attack_generic(H,25) @@ -241,7 +241,7 @@ // Slamming. if (istype(W, /obj/item/grab) && get_dist(src,user)<2) var/obj/item/grab/G = W - if(istype(G.affecting,/mob/living)) + if(isliving(G.affecting)) var/mob/living/M = G.affecting var/state = G.state qdel(W) //gotta delete it here because if window breaks, it won't get deleted diff --git a/code/game/response_team.dm b/code/game/response_team.dm index 39bed0f177..bf5b02699c 100644 --- a/code/game/response_team.dm +++ b/code/game/response_team.dm @@ -49,7 +49,7 @@ var/silent_ert = 0 to_chat(usr, span_warning("You cannot join the response team at this time.")) return - if(istype(usr,/mob/observer/dead) || istype(usr,/mob/new_player)) + if(isobserver(usr) || isnewplayer(usr)) if(!send_emergency_team) to_chat(usr, "No emergency response team is currently being sent.") return diff --git a/code/game/trader_visit.dm b/code/game/trader_visit.dm index 8f52110f53..c4762ca23c 100644 --- a/code/game/trader_visit.dm +++ b/code/game/trader_visit.dm @@ -42,7 +42,7 @@ var/can_call_traders = 1 to_chat(usr, span_warning("You cannot join the traders.")) return - if(istype(usr,/mob/observer/dead) || istype(usr,/mob/new_player)) + if(isobserver(usr) || isnewplayer(usr)) if(!send_beruang) to_chat(usr, "The Beruang is not currently heading to the station.") return diff --git a/code/game/turfs/simulated.dm b/code/game/turfs/simulated.dm index 4742d18579..ea4e8f05ce 100644 --- a/code/game/turfs/simulated.dm +++ b/code/game/turfs/simulated.dm @@ -91,7 +91,7 @@ dirtoverlay.alpha = min((dirt - 50) * 5, 255) /turf/simulated/Entered(atom/A, atom/OL) - if (istype(A,/mob/living)) + if (isliving(A)) var/mob/living/M = A if(M.lying || M.flying) //VOREStation Edit return ..() @@ -100,7 +100,7 @@ // Dirt overlays. update_dirt() - if(istype(M, /mob/living/carbon/human)) + if(ishuman(M)) var/mob/living/carbon/human/H = M // Tracking blood var/list/bloodDNA = null diff --git a/code/game/turfs/simulated/outdoors/snow.dm b/code/game/turfs/simulated/outdoors/snow.dm index 6306d3f5ed..e6d9484429 100644 --- a/code/game/turfs/simulated/outdoors/snow.dm +++ b/code/game/turfs/simulated/outdoors/snow.dm @@ -67,7 +67,7 @@ /turf/simulated/floor/outdoors/ice/Entered(var/mob/living/M) sleep(1 * world.tick_lag) - if(istype(M, /mob/living)) + if(isliving(M)) if(M.stunned == 0) to_chat(M, span_warning("You slide across the ice!")) M.SetStunned(1) diff --git a/code/game/turfs/simulated/underwater.dm b/code/game/turfs/simulated/underwater.dm index 84bf7ae2b1..6b90c56a07 100644 --- a/code/game/turfs/simulated/underwater.dm +++ b/code/game/turfs/simulated/underwater.dm @@ -37,7 +37,7 @@ return water_breath /turf/simulated/floor/water/underwater/Entered(atom/movable/AM, atom/oldloc) - if(istype(AM, /mob/living)) + if(isliving(AM)) var/mob/living/L = AM L.update_water() if(L.check_submerged() <= 0) @@ -48,7 +48,7 @@ ..() /turf/simulated/floor/water/underwater/Exited(atom/movable/AM, atom/newloc) - if(istype(AM, /mob/living)) + if(isliving(AM)) var/mob/living/L = AM L.update_water() if(L.check_submerged() <= 0) diff --git a/code/game/turfs/simulated/water.dm b/code/game/turfs/simulated/water.dm index 9d24aea00b..3f004451d1 100644 --- a/code/game/turfs/simulated/water.dm +++ b/code/game/turfs/simulated/water.dm @@ -97,7 +97,7 @@ return return_air() // Otherwise their head is above the water, so get the air from the atmosphere instead. /turf/simulated/floor/water/Entered(atom/movable/AM, atom/oldloc) - if(istype(AM, /mob/living)) + if(isliving(AM)) var/mob/living/L = AM L.update_water() if(L.check_submerged() <= 0) @@ -108,7 +108,7 @@ ..() /turf/simulated/floor/water/Exited(atom/movable/AM, atom/newloc) - if(istype(AM, /mob/living)) + if(isliving(AM)) var/mob/living/L = AM L.update_water() if(L.check_submerged() <= 0) @@ -232,7 +232,7 @@ var/list/shoreline_icon_cache = list() /turf/simulated/floor/water/contaminated/Entered(atom/movable/AM, atom/oldloc) ..() - if(istype(AM, /mob/living)) + if(isliving(AM)) var/mob/living/L = AM if(L.isSynthetic()) return @@ -254,7 +254,7 @@ var/list/shoreline_icon_cache = list() return "bloodshallow" /turf/simulated/floor/water/blood/Entered(atom/movable/AM, atom/oldloc) - if(istype(AM, /mob/living)) + if(isliving(AM)) var/mob/living/L = AM L.update_water() if(L.check_submerged() <= 0) diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index 08cab852b3..3cfc4585fc 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -151,7 +151,7 @@ return if(istype(O, /obj/screen)) return - if(user.restrained() || user.stat || user.stunned || user.paralysis || (!user.lying && !istype(user, /mob/living/silicon/robot))) + if(user.restrained() || user.stat || user.stunned || user.paralysis || (!user.lying && !isrobot(user))) return if((!(istype(O, /atom/movable)) || O.anchored || !Adjacent(user) || !Adjacent(O) || !user.Adjacent(O))) return diff --git a/code/game/turfs/weird_turfs_vr.dm b/code/game/turfs/weird_turfs_vr.dm index f46006c401..b2de670f74 100644 --- a/code/game/turfs/weird_turfs_vr.dm +++ b/code/game/turfs/weird_turfs_vr.dm @@ -19,7 +19,7 @@ cut_overlays() if(prob(5)) add_glow() - if(istype(O, /mob/living/carbon/human)) + if(ishuman(O)) var/mob/living/carbon/human/L = O if(istype(L.species, /datum/species/crew_shadekin)) L.halloss += 5 @@ -78,7 +78,7 @@ cut_overlays() if(prob(5)) add_glow() - if(istype(O, /mob/living/carbon/human)) + if(ishuman(O)) var/mob/living/carbon/human/L = O if(istype(L.species, /datum/species/crew_shadekin)) L.halloss += 5 diff --git a/code/game/world.dm b/code/game/world.dm index 4e7e0c25e2..6e2ee24d39 100644 --- a/code/game/world.dm +++ b/code/game/world.dm @@ -147,7 +147,7 @@ var/world_topic_spam_protect_time = world.timeofday continue admins[C.key] = C.holder.rank players += C.key - if(istype(C.mob, /mob/living)) + if(isliving(C.mob)) active++ s["players"] = players.len @@ -300,7 +300,7 @@ var/world_topic_spam_protect_time = world.timeofday info["hasbeenrev"] = M.mind ? M.mind.has_been_rev : "No mind" info["stat"] = M.stat info["type"] = M.type - if(istype(M, /mob/living)) + if(isliving(M)) var/mob/living/L = M info["damage"] = list2params(list( oxy = L.getOxyLoss(), diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index eecd87ef60..4f6e71e341 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -51,7 +51,7 @@ var/global/floorIsLava = 0 body += " played by [M.client] " body += "\[[M.client.holder ? M.client.holder.rank : "Player"]\]" - if(istype(M, /mob/new_player)) + if(isnewplayer(M)) body += " Hasn't Entered Game " else body += " \[Heal\] " @@ -102,7 +102,7 @@ var/global/floorIsLava = 0 "} if (M.client) - if(!istype(M, /mob/new_player)) + if(!isnewplayer(M)) body += "

" body += span_bold("Transformation:") body += "
" diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 1a3462e8f2..b1e8b75f68 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -42,7 +42,7 @@ if(build_mode != "Yes") to_chat(src, "Will not re-enter buildmode after switch.") - if(istype(mob,/mob/observer/dead)) + if(isobserver(mob)) //re-enter var/mob/observer/dead/ghost = mob if(ghost.can_reenter_corpse) @@ -59,7 +59,7 @@ feedback_add_details("admin_verb","P") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - else if(istype(mob,/mob/new_player)) + else if(isnewplayer(mob)) to_chat(src, span_filter_system(span_warning("Error: Aghost: Can't admin-ghost whilst in the lobby. Join or Observe first."))) else //ghostize @@ -182,7 +182,7 @@ if(holder) if(holder.fakekey) holder.fakekey = null - if(istype(src.mob, /mob/new_player)) + if(isnewplayer(src.mob)) mob.name = capitalize(ckey) else var/new_key = ckeyEx(tgui_input_text(usr, "Enter your desired display name.", "Fake Key", key)) @@ -192,7 +192,7 @@ new_key = copytext(new_key, 1, 26) holder.fakekey = new_key createStealthKey() - if(istype(mob, /mob/new_player)) + if(isnewplayer(mob)) mob.name = new_key log_and_message_admins("[key_name(usr)] has turned stealth mode [holder.fakekey ? "ON" : "OFF"]") feedback_add_details("admin_verb","SM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! diff --git a/code/modules/admin/map_capture.dm b/code/modules/admin/map_capture.dm index e157335829..95c3731563 100644 --- a/code/modules/admin/map_capture.dm +++ b/code/modules/admin/map_capture.dm @@ -46,7 +46,7 @@ if(A) var/icon/img = getFlatIcon(A) if(istype(img, /icon)) - if(istype(A, /mob/living) && A:lying) + if(isliving(A) && A:lying) img.BecomeLying() var/xoff = (A.x - tx) * 32 var/yoff = (A.y - ty) * 32 diff --git a/code/modules/admin/player_effects.dm b/code/modules/admin/player_effects.dm index ed0ed51826..f9d03c8116 100644 --- a/code/modules/admin/player_effects.dm +++ b/code/modules/admin/player_effects.dm @@ -772,7 +772,7 @@ X.orbit(target) if("ai") - if(!istype(target, /mob/living)) + if(!isliving(target)) to_chat(ui.user, span_notice("This can only be used on instances of type /mob/living")) return var/mob/living/L = target diff --git a/code/modules/admin/player_panel.dm b/code/modules/admin/player_panel.dm index 749809c47c..986e50b7bc 100644 --- a/code/modules/admin/player_panel.dm +++ b/code/modules/admin/player_panel.dm @@ -257,7 +257,7 @@ else M_job = JOB_LIVING - else if(istype(M,/mob/new_player)) + else if(isnewplayer(M)) M_job = JOB_NEW_PLAYER else if(isobserver(M)) @@ -336,9 +336,9 @@ dat += "Cyborg" else if(ishuman(M)) dat += "[M.real_name]" - else if(istype(M, /mob/living/silicon/pai)) + else if(ispAI(M)) dat += "pAI" - else if(istype(M, /mob/new_player)) + else if(isnewplayer(M)) dat += "New Player" else if(isobserver(M)) dat += "Ghost" @@ -350,7 +350,7 @@ dat += "Unknown" - if(istype(M,/mob/living/carbon/human)) + if(ishuman(M)) var/mob/living/carbon/human/H = M if(H.mind && H.mind.assigned_role) dat += "[H.mind.assigned_role]" diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 4778fdd27c..2498ffe8c6 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -1091,7 +1091,7 @@ if(!ismob(M)) to_chat(usr, span_filter_adminlog("This can only be used on instances of type /mob")) return - if(istype(M, /mob/living/silicon/ai)) + if(isAI(M)) to_chat(usr, span_filter_adminlog("This cannot be used on instances of type /mob/living/silicon/ai")) return @@ -1112,7 +1112,7 @@ if(!M) return M.loc = prison_cell - if(istype(M, /mob/living/carbon/human)) + if(ishuman(M)) var/mob/living/carbon/human/prisoner = M prisoner.equip_to_slot_or_del(new /obj/item/clothing/under/color/prison(prisoner), slot_w_uniform) prisoner.equip_to_slot_or_del(new /obj/item/clothing/shoes/orange(prisoner), slot_shoes) @@ -1154,7 +1154,7 @@ if(!ismob(M)) to_chat(usr, span_filter_adminlog("This can only be used on instances of type /mob")) return - if(istype(M, /mob/living/silicon/ai)) + if(isAI(M)) to_chat(usr, span_filter_adminlog("This cannot be used on instances of type /mob/living/silicon/ai")) return @@ -1179,7 +1179,7 @@ if(!ismob(M)) to_chat(usr, span_filter_adminlog("This can only be used on instances of type /mob")) return - if(istype(M, /mob/living/silicon/ai)) + if(isAI(M)) to_chat(usr, span_filter_adminlog("This cannot be used on instances of type /mob/living/silicon/ai")) return @@ -1204,7 +1204,7 @@ if(!ismob(M)) to_chat(usr, span_filter_adminlog("This can only be used on instances of type /mob")) return - if(istype(M, /mob/living/silicon/ai)) + if(isAI(M)) to_chat(usr, span_filter_adminlog("This cannot be used on instances of type /mob/living/silicon/ai")) return @@ -1226,14 +1226,14 @@ if(!ismob(M)) to_chat(usr, span_filter_adminlog("This can only be used on instances of type /mob")) return - if(istype(M, /mob/living/silicon/ai)) + if(isAI(M)) to_chat(usr, span_filter_adminlog("This cannot be used on instances of type /mob/living/silicon/ai")) return for(var/obj/item/I in M) M.drop_from_inventory(I) - if(istype(M, /mob/living/carbon/human)) + if(ishuman(M)) var/mob/living/carbon/human/observer = M observer.equip_to_slot_or_del(new /obj/item/clothing/under/suit_jacket(observer), slot_w_uniform) observer.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(observer), slot_shoes) @@ -1296,7 +1296,7 @@ if(!check_rights(R_SPAWN)) return var/mob/M = locate(href_list["makeanimal"]) - if(istype(M, /mob/new_player)) + if(isnewplayer(M)) to_chat(usr, span_filter_adminlog("This cannot be used on instances of type /mob/new_player")) return diff --git a/code/modules/admin/verbs/change_appearance.dm b/code/modules/admin/verbs/change_appearance.dm index ed0f3266f2..8210e3fb12 100644 --- a/code/modules/admin/verbs/change_appearance.dm +++ b/code/modules/admin/verbs/change_appearance.dm @@ -43,7 +43,7 @@ var/mob/living/carbon/human/M = tgui_input_list(usr, "Select mob.", "Edit Appearance", human_mob_list) - if(!istype(M, /mob/living/carbon/human)) + if(!ishuman(M)) to_chat(usr, span_warning("You can only do this to humans!")) return if(tgui_alert(usr, "Are you sure you wish to edit this mob's appearance? Skrell, Unathi, Tajaran can result in unintended consequences.","Danger!",list("Yes","No")) != "Yes") diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm index 31328025b5..0ee34fa9e8 100644 --- a/code/modules/admin/verbs/debug.dm +++ b/code/modules/admin/verbs/debug.dm @@ -100,7 +100,7 @@ if(!ticker) tgui_alert_async(usr, "Wait until the game starts") return - if(istype(M, /mob/living/carbon/human)) + if(ishuman(M)) log_admin("[key_name(src)] has robotized [M.key].") spawn(10) M:Robotize() @@ -120,7 +120,7 @@ tgui_alert_async(usr, "That mob doesn't seem to exist, close the panel and try again.") return - if(istype(M, /mob/new_player)) + if(isnewplayer(M)) tgui_alert_async(usr, "The mob must not be a new_player.") return @@ -279,7 +279,7 @@ if (!ticker) tgui_alert_async(usr, "Wait until the game starts") return - if (istype(M, /mob/living/carbon/human)) + if (ishuman(M)) var/mob/living/carbon/human/H = M if (H.wear_id) var/obj/item/card/id/id = H.wear_id diff --git a/code/modules/admin/verbs/entity_narrate.dm b/code/modules/admin/verbs/entity_narrate.dm index 839fb49783..d33082ee5e 100644 --- a/code/modules/admin/verbs/entity_narrate.dm +++ b/code/modules/admin/verbs/entity_narrate.dm @@ -43,7 +43,7 @@ to_chat(usr, span_notice("Ghosts shouldn't be narrated! If you want a ghost, make it a subtype of mob/living!")) return //We require a static mob/living type to check for .client and also later on, to use the unique .say mechanics for stuttering and language - if(istype(E, /mob/living)) + if(isliving(E)) var/mob/living/L = E if(L.client) to_chat(usr, span_notice("[L.name] is a player. All attempts to speak through them \ @@ -170,7 +170,7 @@ to_chat(usr, span_notice("[name] has invalid reference, deleting")) holder.entity_names -= name holder.entity_refs -= name - if(istype(selection, /mob/living)) + if(isliving(selection)) var/mob/living/our_entity = selection if(our_entity.client) //Making sure we can't speak for players log_and_message_admins("used entity-narrate to speak through [our_entity.ckey]'s mob", usr) @@ -267,7 +267,7 @@ tgui_selected_type = "" tgui_selected_name = "" tgui_selected_refs = null - if(istype(tgui_selected_refs, /mob/living)) + if(isliving(tgui_selected_refs)) var/mob/living/L = tgui_selected_refs if(L.client) tgui_selected_type = "!!!!PLAYER!!!!" @@ -296,7 +296,7 @@ entity_refs -= entity tgui_selected_id_multi -= entity continue - if(istype(ref, /mob/living)) + if(isliving(ref)) var/mob/living/L = ref if(L.client) log_and_message_admins("used entity-narrate to speak through [L.ckey]'s mob", ui.user) @@ -316,7 +316,7 @@ tgui_selected_name = "" tgui_selected_refs = null return - if(istype(ref, /mob/living)) + if(isliving(ref)) var/mob/living/L = ref if(L.client) log_and_message_admins("used entity-narrate to speak through [L.ckey]'s mob", ui.user) diff --git a/code/modules/admin/verbs/get_player_status.dm b/code/modules/admin/verbs/get_player_status.dm index 2e57317ec9..76d9a414fd 100644 --- a/code/modules/admin/verbs/get_player_status.dm +++ b/code/modules/admin/verbs/get_player_status.dm @@ -18,7 +18,7 @@ //Initializing our working list for(var/player in player_list_local) - if(!istype(player, /mob/living)) continue //We only care for living players + if(!isliving(player)) continue //We only care for living players var/mob/living/L = player players += 1 if(L.client.inactivity > INACTIVITY_CAP) diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index 91c8b5ef93..7f207622e2 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -24,7 +24,7 @@ return if (ismob(M)) - if(istype(M, /mob/living/silicon/ai)) + if(isAI(M)) tgui_alert_async(usr, "The AI can't be sent to prison you jerk!") return //strip their stuff before they teleport into a cell :downs: @@ -34,7 +34,7 @@ M.Paralyse(5) sleep(5) //so they black out before warping M.loc = pick(prisonwarp) - if(istype(M, /mob/living/carbon/human)) + if(ishuman(M)) var/mob/living/carbon/human/prisoner = M prisoner.equip_to_slot_or_del(new /obj/item/clothing/under/color/prison(prisoner), slot_w_uniform) prisoner.equip_to_slot_or_del(new /obj/item/clothing/shoes/orange(prisoner), slot_shoes) @@ -764,7 +764,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/observer/dead)) + if(isobserver(M)) gibs(M.loc) return @@ -782,7 +782,7 @@ Traitors and the like can also be revived with the previous role mostly intact. if(!confirm) return if(confirm == "Yes") - if (istype(mob, /mob/observer/dead)) // so they don't spam gibs everywhere + if (isobserver(mob)) // so they don't spam gibs everywhere return else mob.gib() diff --git a/code/modules/admin/view_variables/topic.dm b/code/modules/admin/view_variables/topic.dm index de3e6da4af..c237d12f32 100644 --- a/code/modules/admin/view_variables/topic.dm +++ b/code/modules/admin/view_variables/topic.dm @@ -187,7 +187,7 @@ if(!check_rights(0)) return var/mob/M = locate(href_list["give_ai"]) - if(!istype(M, /mob/living)) + if(!isliving(M)) to_chat(usr, span_notice("This can only be used on instances of type /mob/living")) return var/mob/living/L = M @@ -419,17 +419,17 @@ var/list/possibleverbs = list() possibleverbs += "Cancel" // One for the top... possibleverbs += typesof(/mob/proc, /mob/verb) - if(istype(H,/mob/observer/dead)) + if(isobserver(H)) possibleverbs += typesof(/mob/observer/dead/proc,/mob/observer/dead/verb) - if(istype(H,/mob/living)) + if(isliving(H)) possibleverbs += typesof(/mob/living/proc,/mob/living/verb) - if(istype(H,/mob/living/carbon/human)) + if(ishuman(H)) possibleverbs += typesof(/mob/living/carbon/proc,/mob/living/carbon/verb,/mob/living/carbon/human/verb,/mob/living/carbon/human/proc) - if(istype(H,/mob/living/silicon/robot)) + if(isrobot(H)) possibleverbs += typesof(/mob/living/silicon/proc,/mob/living/silicon/robot/proc,/mob/living/silicon/robot/verb) - if(istype(H,/mob/living/silicon/ai)) + if(isAI(H)) possibleverbs += typesof(/mob/living/silicon/proc,/mob/living/silicon/ai/proc,/mob/living/silicon/ai/verb) - if(istype(H,/mob/living/simple_mob)) + if(isanimal(H)) possibleverbs += typesof(/mob/living/simple_mob/proc) possibleverbs -= H.verbs possibleverbs += "Cancel" // ...And one for the bottom diff --git a/code/modules/ai/ai_holder.dm b/code/modules/ai/ai_holder.dm index 07186429cd..af9df3c188 100644 --- a/code/modules/ai/ai_holder.dm +++ b/code/modules/ai/ai_holder.dm @@ -50,7 +50,7 @@ if(!ai_holder) log_debug("[src] could not initialize ai_holder of type [ai_holder_type]") return - if(istype(src, /mob/living/carbon/human)) + if(ishuman(src)) var/mob/living/carbon/human/H = src new /datum/hud(H) diff --git a/code/modules/ai/ai_holder_communication.dm b/code/modules/ai/ai_holder_communication.dm index caafe5c8b8..8331a57762 100644 --- a/code/modules/ai/ai_holder_communication.dm +++ b/code/modules/ai/ai_holder_communication.dm @@ -66,7 +66,7 @@ return FALSE // Turrets don't give a fuck so neither will we. /* // Find a nice way of doing this later. - if(istype(the_target, /mob/living/simple_mob) && istype(holder, /mob/living/simple_mob)) + if(isanimal(the_target) && isanimal(holder)) var/mob/living/simple_mob/us = holder var/mob/living/simple_mob/them = target diff --git a/code/modules/ai/ai_holder_movement.dm b/code/modules/ai/ai_holder_movement.dm index b553b86b7e..52926df28c 100644 --- a/code/modules/ai/ai_holder_movement.dm +++ b/code/modules/ai/ai_holder_movement.dm @@ -169,7 +169,7 @@ return var/has_hands = TRUE - if(istype(holder, /mob/living/simple_mob)) + if(isanimal(holder)) var/mob/living/simple_mob/S = holder has_hands = S.has_hands @@ -191,4 +191,4 @@ directions += L.target_up if(directions.len) - L.climbLadder(holder, pick(directions)) \ No newline at end of file + L.climbLadder(holder, pick(directions)) diff --git a/code/modules/ai/ai_holder_subtypes/slime_xenobio_ai.dm b/code/modules/ai/ai_holder_subtypes/slime_xenobio_ai.dm index 5d2003e47b..2ad50089b9 100644 --- a/code/modules/ai/ai_holder_subtypes/slime_xenobio_ai.dm +++ b/code/modules/ai/ai_holder_subtypes/slime_xenobio_ai.dm @@ -107,7 +107,7 @@ if(target) if(istype(target, /mob/living/simple_mob/slime/xenobio)) //Don't call reinforcements for internal disputes return - if(istype(target, /mob/living/carbon/human)) + if(ishuman(target)) var/mob/living/carbon/human/H = target if(istype(H.species, /datum/species/monkey)) //Or for food return @@ -170,7 +170,7 @@ // The holder's attack changes based on intent. This lets the AI choose what effect is desired. /datum/ai_holder/simple_mob/xenobio_slime/pre_melee_attack(atom/A) - if(istype(A, /mob/living)) + if(isliving(A)) var/mob/living/L = A var/mob/living/simple_mob/slime/xenobio/my_slime = holder @@ -182,7 +182,7 @@ my_slime.a_intent = I_HURT // Otherwise robust them. /datum/ai_holder/simple_mob/xenobio_slime/closest_distance(atom/movable/AM) - if(istype(AM, /mob/living)) + if(isliving(AM)) var/mob/living/L = AM if(ishuman(L)) var/mob/living/carbon/human/H = L diff --git a/code/modules/artifice/deadringer.dm b/code/modules/artifice/deadringer.dm index e5d4962f1d..fb1f60b7ec 100644 --- a/code/modules/artifice/deadringer.dm +++ b/code/modules/artifice/deadringer.dm @@ -31,7 +31,7 @@ /obj/item/deadringer/attack_self(var/mob/living/user as mob) var/mob/living/H = src.loc - if (!istype(H, /mob/living/carbon/human)) + if (!ishuman(H)) to_chat(H, span_blue("You have no clue what to do with this thing.")) return if(!activated) diff --git a/code/modules/awaymissions/gateway.dm b/code/modules/awaymissions/gateway.dm index 149d2e9d28..dcd96fb8c9 100644 --- a/code/modules/awaymissions/gateway.dm +++ b/code/modules/awaymissions/gateway.dm @@ -156,7 +156,7 @@ GLOBAL_DATUM(gateway_station, /obj/machinery/gateway/centerstation) if(istype(M, /obj/item/uav)) var/obj/item/uav/L = M L.power_down() - 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 @@ -175,7 +175,7 @@ GLOBAL_DATUM(gateway_station, /obj/machinery/gateway/centerstation) //VOREStation Addition End: Mcguffin time! //VOREStation Addition Start: Abduction! - if(istype(M, /mob/living) && dest.abductor) + if(isliving(M) && dest.abductor) var/mob/living/L = M if(L.nutrition > 500) L.nutrition = 500 //If the aim is to negate people overpreparing, then they shouldn't be able to stuff themselves full of food either. diff --git a/code/modules/awaymissions/redgate.dm b/code/modules/awaymissions/redgate.dm index 6689a83770..c43d695864 100644 --- a/code/modules/awaymissions/redgate.dm +++ b/code/modules/awaymissions/redgate.dm @@ -30,7 +30,7 @@ /obj/structure/redgate/proc/teleport(var/mob/M as mob) var/keycheck = TRUE - if (!istype(M,/mob/living)) //We only want mob/living, no bullets or mechs or AI eyes or items + if (!isliving(M)) //We only want mob/living, no bullets or mechs or AI eyes or items if(is_type_in_list(M, exceptions)) keycheck = FALSE //we'll allow it else @@ -54,7 +54,7 @@ var/turf/ourturf = find_our_turf(M) //Find the turf on the opposite side of the target if(!ourturf.check_density(TRUE,TRUE)) //Make sure there isn't a wall there M.unbuckle_all_mobs(TRUE) - if(istype(M,/mob/living) && M.pulling) + if(isliving(M) && M.pulling) var/atom/movable/pulled = M.pulling M.stop_pulling() playsound(src,'sound/effects/ominous-hum-2.ogg', 100,1) diff --git a/code/modules/blob2/blobs/base_blob.dm b/code/modules/blob2/blobs/base_blob.dm index 22948ef160..6a3cf8249d 100644 --- a/code/modules/blob2/blobs/base_blob.dm +++ b/code/modules/blob2/blobs/base_blob.dm @@ -57,7 +57,7 @@ GLOBAL_LIST_EMPTY(all_blobs) /obj/structure/blob/CanPass(atom/movable/mover, turf/target) if(istype(mover) && mover.checkpass(PASSBLOB)) return TRUE - else if(istype(mover, /mob/living)) + else if(isliving(mover)) var/mob/living/L = mover if(L.faction == faction) return TRUE diff --git a/code/modules/blob2/core_chunk.dm b/code/modules/blob2/core_chunk.dm index 555d34b83e..a2680c9cff 100644 --- a/code/modules/blob2/core_chunk.dm +++ b/code/modules/blob2/core_chunk.dm @@ -72,7 +72,7 @@ if(isturf(A) || isarea(A)) // Something has gone horribly wrong if the second is true. return FALSE // No mob is carrying us. - if(!istype(A, /mob/living)) + if(!isliving(A)) A = get_carrier(A) return A diff --git a/code/modules/blob2/overmind/types/reactive_spines.dm b/code/modules/blob2/overmind/types/reactive_spines.dm index c206df13e4..93d730104f 100644 --- a/code/modules/blob2/overmind/types/reactive_spines.dm +++ b/code/modules/blob2/overmind/types/reactive_spines.dm @@ -38,7 +38,7 @@ var/atom/movable/A = extra_data[1] - if(istype(A, /mob/living) && world.time > (B.last_passive_use + B.passive_ability_cooldown) && B.should_tick) + if(isliving(A) && world.time > (B.last_passive_use + B.passive_ability_cooldown) && B.should_tick) B.last_passive_use = world.time var/mob/living/L = A diff --git a/code/modules/blob2/overmind/types/volatile_alluvium.dm b/code/modules/blob2/overmind/types/volatile_alluvium.dm index 6e05132b9f..40c4f98cc2 100644 --- a/code/modules/blob2/overmind/types/volatile_alluvium.dm +++ b/code/modules/blob2/overmind/types/volatile_alluvium.dm @@ -29,7 +29,7 @@ chunk_active_ability_cooldown = 2 MINUTES /datum/blob_type/volatile_alluvium/on_received_damage(var/obj/structure/blob/B, damage, damage_type, mob/living/attacker) - if(damage > 0 && attacker && get_dist(B, attacker) <= 2 && prob(min(damage, 70)) && istype(attacker, /mob/living/carbon/human)) // Melee weapons of any type carried by a human will have a high chance of being stolen. + if(damage > 0 && attacker && get_dist(B, attacker) <= 2 && prob(min(damage, 70)) && ishuman(attacker)) // Melee weapons of any type carried by a human will have a high chance of being stolen. var/mob/living/carbon/human/H = attacker var/obj/item/I = H.get_active_hand() H.drop_item() diff --git a/code/modules/casino/casino.dm b/code/modules/casino/casino.dm index 0b1c57d085..75b8242202 100644 --- a/code/modules/casino/casino.dm +++ b/code/modules/casino/casino.dm @@ -382,7 +382,7 @@ if(usr.incapacitated()) return - if(ishuman(usr) || istype(usr, /mob/living/silicon/robot)) + if(ishuman(usr) || isrobot(usr)) switch(input(user,"Choose what to do","Wheel Of Fortune") in list("Spin the Wheel! (Not Lottery)", "Set the interval", "Cancel")) if("Cancel") return @@ -411,7 +411,7 @@ return else to_chat(user, span_warning("Proper access, allowed staff controls.")) - if(ishuman(usr) || istype(usr, /mob/living/silicon/robot)) + if(ishuman(usr) || isrobot(usr)) switch(input(user,"Choose what to do (Management)","Wheel Of Fortune (Management)") in list("Spin the Lottery Wheel!", "Toggle Lottery Sales", "Toggle Public Spins", "Reset Lottery", "Cancel")) if("Cancel") return @@ -526,7 +526,7 @@ if(usr.incapacitated()) return - if(ishuman(usr) || istype(usr, /mob/living/silicon/robot)) + if(ishuman(usr) || isrobot(usr)) interval = tgui_input_number(usr, "Put the desired interval (1-1000)", "Set Interval", null, 1000, 1) if(interval>1000 || interval<1) to_chat(usr, span_notice("Invalid interval.")) @@ -559,7 +559,7 @@ to_chat(user,span_notice("The SPASM is disabled.")) return - if(ishuman(usr) || istype(usr, /mob/living/silicon/robot)) + if(ishuman(usr) || isrobot(usr)) switch(input(user,"Choose what to do","SPASM") in list("Show selected Prize", "Select Prize", "Become Prize (Please examine yourself first)", "Cancel")) if("Cancel") return @@ -666,7 +666,7 @@ return else to_chat(user, span_warning("Proper access, allowed staff controls.")) - if(ishuman(usr) || istype(usr, /mob/living/silicon/robot)) + if(ishuman(usr) || isrobot(usr)) switch(input(user,"Choose what to do (Management)","SPASM (Management)") in list("Toggle Sentient Prize Sales", "Wipe Selected Prize Entry", "Change Prize Value", "Cancel")) if("Cancel") return @@ -749,7 +749,7 @@ /obj/machinery/casinosentientprize_handler/proc/setprice(mob/living/user as mob) if(usr.incapacitated()) return - if(ishuman(usr) || istype(usr, /mob/living/silicon/robot)) + if(ishuman(usr) || isrobot(usr)) casinosentientprize_price = tgui_input_number(usr, "Select the desired price (1-1000)", "Set Price", null, null, 1000, 1) if(casinosentientprize_price>1000 || casinosentientprize_price<1) to_chat(user,span_notice("Invalid price.")) diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index f88a4e7b84..30b1ffad3e 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -272,7 +272,7 @@ var/list/preferences_datums = list() /datum/preferences/proc/process_link(mob/user, list/href_list) if(!user) return - if(!istype(user, /mob/new_player)) return + if(!isnewplayer(user)) return if(href_list["preference"] == "open_whitelist_forum") if(CONFIG_GET(string/forumurl)) diff --git a/code/modules/client/verbs/advanced_who.dm b/code/modules/client/verbs/advanced_who.dm index dcc488af55..023adc8af3 100644 --- a/code/modules/client/verbs/advanced_who.dm +++ b/code/modules/client/verbs/advanced_who.dm @@ -81,7 +81,7 @@ var/mob/observer/dead/O = C.mob if(isobserver(O)) entry += " - " + span_gray("Observing") + "
" - else if(istype(O,/mob/new_player)) + else if(isnewplayer(O)) entry += " - " + span_blue("In Lobby") + "
" else entry += " - "+ span_green("Playing") + "
" diff --git a/code/modules/client/verbs/character_directory.dm b/code/modules/client/verbs/character_directory.dm index b3bbd95eaf..ca4f5937ac 100644 --- a/code/modules/client/verbs/character_directory.dm +++ b/code/modules/client/verbs/character_directory.dm @@ -109,7 +109,7 @@ GLOBAL_DATUM(character_directory, /datum/character_directory) flavor_text = R.flavor_text - if(istype(C.mob, /mob/living/silicon/pai)) + if(ispAI(C.mob)) var/mob/living/silicon/pai/P = C.mob name = P.name species = "pAI" @@ -121,7 +121,7 @@ GLOBAL_DATUM(character_directory, /datum/character_directory) flavor_text = P.flavor_text - if(istype(C.mob, /mob/living/simple_mob)) + if(isanimal(C.mob)) var/mob/living/simple_mob/S = C.mob name = S.name species = initial(S.name) diff --git a/code/modules/client/verbs/ooc.dm b/code/modules/client/verbs/ooc.dm index 1dd7a74506..6af58f989d 100644 --- a/code/modules/client/verbs/ooc.dm +++ b/code/modules/client/verbs/ooc.dm @@ -155,7 +155,7 @@ for(var/mob/viewer in m_viewers) if(viewer.client && viewer.client.prefs?.read_preference(/datum/preference/toggle/show_looc)) receivers |= viewer.client - else if(istype(viewer,/mob/observer/eye)) // For AI eyes and the like + else if(isobserver(viewer)) // For AI eyes and the like var/mob/observer/eye/E = viewer if(E.owner && E.owner.client) receivers |= E.owner.client diff --git a/code/modules/client/verbs/who.dm b/code/modules/client/verbs/who.dm index 942ecd5e52..2641e7a381 100644 --- a/code/modules/client/verbs/who.dm +++ b/code/modules/client/verbs/who.dm @@ -92,7 +92,7 @@ if(isobserver(C.mob)) temp += " - Observing" - else if(istype(C.mob,/mob/new_player)) + else if(isnewplayer(C.mob)) temp += " - Lobby" else temp += " - Playing" @@ -131,7 +131,7 @@ if(holder) if(isobserver(C.mob)) mmsg += " - Observing" - else if(istype(C.mob,/mob/new_player)) + else if(isnewplayer(C.mob)) mmsg += " - Lobby" else mmsg += " - Playing" diff --git a/code/modules/clothing/accessories/accessory_vr.dm b/code/modules/clothing/accessories/accessory_vr.dm index 78aaf8354e..3ede4d67a7 100644 --- a/code/modules/clothing/accessories/accessory_vr.dm +++ b/code/modules/clothing/accessories/accessory_vr.dm @@ -108,7 +108,7 @@ set name = "Jingle Bell" set category = "Object" set src in usr - if(!istype(usr, /mob/living)) return + if(!isliving(usr)) return if(usr.stat) return if(!jingled) diff --git a/code/modules/clothing/accessories/holster.dm b/code/modules/clothing/accessories/holster.dm index 676c544081..2e410760ce 100644 --- a/code/modules/clothing/accessories/holster.dm +++ b/code/modules/clothing/accessories/holster.dm @@ -107,7 +107,7 @@ set name = "Holster" set category = "Object" set src in usr - if(!istype(usr, /mob/living)) return + if(!isliving(usr)) return if(usr.stat) return //can't we just use src here? diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index 87bfe187fe..4aaf9036ba 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -73,7 +73,7 @@ if (!..()) return 0 - if(LAZYLEN(species_restricted) && istype(M,/mob/living/carbon/human)) + if(LAZYLEN(species_restricted) && ishuman(M)) var/exclusive = null var/wearable = null var/mob/living/carbon/human/H = M @@ -226,7 +226,7 @@ /obj/item/clothing/ears/attack_hand(mob/user as mob) if (!user) return - if (src.loc != user || !istype(user,/mob/living/carbon/human)) + if (src.loc != user || !ishuman(user)) ..() return @@ -897,7 +897,7 @@ /obj/item/clothing/under/proc/update_rolldown_status() var/mob/living/carbon/human/H - if(istype(src.loc, /mob/living/carbon/human)) + if(ishuman(src.loc)) H = src.loc var/icon/under_icon @@ -920,7 +920,7 @@ /obj/item/clothing/under/proc/update_rollsleeves_status() var/mob/living/carbon/human/H - if(istype(src.loc, /mob/living/carbon/human)) + if(ishuman(src.loc)) H = src.loc var/icon/under_icon @@ -1005,7 +1005,7 @@ set name = "Roll Down Jumpsuit" set category = "Object" set src in usr - if(!istype(usr, /mob/living)) return + if(!isliving(usr)) return if(usr.stat) return update_rolldown_status() @@ -1038,7 +1038,7 @@ set name = "Roll Up Sleeves" set category = "Object" set src in usr - if(!istype(usr, /mob/living)) return + if(!isliving(usr)) return if(usr.stat) return update_rollsleeves_status() diff --git a/code/modules/clothing/clothing_accessories.dm b/code/modules/clothing/clothing_accessories.dm index 7c365caefc..4e2dd1b962 100644 --- a/code/modules/clothing/clothing_accessories.dm +++ b/code/modules/clothing/clothing_accessories.dm @@ -120,7 +120,7 @@ set category = "Object" set src in usr - if(!istype(usr, /mob/living)) + if(!isliving(usr)) return if(usr.stat) diff --git a/code/modules/clothing/clothing_vr.dm b/code/modules/clothing/clothing_vr.dm index 41bd5f212f..fb22241282 100644 --- a/code/modules/clothing/clothing_vr.dm +++ b/code/modules/clothing/clothing_vr.dm @@ -35,7 +35,7 @@ if(istype(I,/obj/item/holder/micro)) var/full = 0 for(var/mob/M in src) - if(istype(M,/mob/living/voice)) //Don't count voices as people! + if(isvoice(M)) //Don't count voices as people! continue full++ if(full >= 2) @@ -53,7 +53,7 @@ /obj/item/clothing/shoes/attack_self(var/mob/user) for(var/mob/M in src) - if(istype(M,/mob/living/voice)) //Don't knock voices out! + if(isvoice(M)) //Don't knock voices out! continue M.forceMove(get_turf(user)) to_chat(M, span_warning("[user] shakes you out of \the [src]!")) @@ -63,7 +63,7 @@ /obj/item/clothing/shoes/container_resist(mob/living/micro) var/mob/living/carbon/human/macro = loc - if(istype(micro,/mob/living/voice)) //Voices shouldn't be able to resist but we have this here just in case. + if(isvoice(micro)) //Voices shouldn't be able to resist but we have this here just in case. return if(!istype(macro)) to_chat(micro, span_notice("You start to climb out of [src]!")) @@ -115,7 +115,7 @@ if(ishuman(src.loc)) //Is this on a person? var/mob/living/carbon/human/H = src.loc - if(istype(user,/mob/living/voice)) //Is this a possessed item? Spooky. It can move on it's own! + if(isvoice(user)) //Is this a possessed item? Spooky. It can move on it's own! to_chat(H, span_red("The [src] shifts about, almost as if squirming!")) to_chat(user, span_red("You cause the [src] to shift against [H]'s form! Well, what little you can get to, given your current state!")) else if(H.shoes == src) @@ -124,7 +124,7 @@ else to_chat(H, span_red("[user]'s form shifts around in the \the [src], squirming!")) to_chat(user, span_red("You move around inside the [src], to no avail.")) - else if(istype(user,/mob/living/voice)) //Possessed! + else if(isvoice(user)) //Possessed! src.visible_message(span_red("The [src] shifts about!")) to_chat(user, span_red("You cause the [src] to shift about!")) else diff --git a/code/modules/clothing/ears/ears.dm b/code/modules/clothing/ears/ears.dm index c56d395d5c..d4bd346b1b 100644 --- a/code/modules/clothing/ears/ears.dm +++ b/code/modules/clothing/ears/ears.dm @@ -22,7 +22,7 @@ set name = "Toggle Headphone Music" set category = "Object" set src in usr - if(!istype(usr, /mob/living)) return + if(!isliving(usr)) return if(usr.stat) return var/base_icon = copytext(icon_state,1,(length(icon_state) - 3 + headphones_on)) diff --git a/code/modules/clothing/glasses/glasses.dm b/code/modules/clothing/glasses/glasses.dm index 28c2b41a28..b9391881eb 100644 --- a/code/modules/clothing/glasses/glasses.dm +++ b/code/modules/clothing/glasses/glasses.dm @@ -190,7 +190,7 @@ BLIND // can't see anything set name = "Switch Eyepatch" set category = "Object" set src in usr - if(!istype(usr, /mob/living)) return + if(!isliving(usr)) return if(usr.stat) return eye = !eye @@ -214,7 +214,7 @@ BLIND // can't see anything set name = "Switch Eyepatch" set category = "Object" set src in usr - if(!istype(usr, /mob/living)) return + if(!isliving(usr)) return if(usr.stat) return eye = !eye @@ -538,7 +538,7 @@ BLIND // can't see anything flash_protection = FLASH_PROTECTION_REDUCED /obj/item/clothing/glasses/thermal/emp_act(severity) - if(istype(src.loc, /mob/living/carbon/human)) + if(ishuman(src.loc)) var/mob/living/carbon/human/M = src.loc to_chat(M, span_red("The Optical Thermal Scanner overloads and blinds you!")) if(M.glasses == src) diff --git a/code/modules/clothing/glasses/hud_vr.dm b/code/modules/clothing/glasses/hud_vr.dm index 3693717a59..adfed8dc0e 100644 --- a/code/modules/clothing/glasses/hud_vr.dm +++ b/code/modules/clothing/glasses/hud_vr.dm @@ -234,7 +234,7 @@ set name = "Toggle projector" set category = "Object" set src in usr - if(!istype(usr, /mob/living)) return + if(!isliving(usr)) return if(usr.stat) return if(toggleable) if(active) @@ -280,7 +280,7 @@ set name = "Switch Eyepatch" set category = "Object" set src in usr - if(!istype(usr, /mob/living)) return + if(!isliving(usr)) return if(usr.stat) return eye = !eye @@ -305,7 +305,7 @@ set name = "Switch Eyepatch" set category = "Object" set src in usr - if(!istype(usr, /mob/living)) return + if(!isliving(usr)) return if(usr.stat) return eye = !eye @@ -329,7 +329,7 @@ set name = "Switch Eyepatch" set category = "Object" set src in usr - if(!istype(usr, /mob/living)) return + if(!isliving(usr)) return if(usr.stat) return eye = !eye diff --git a/code/modules/clothing/gloves/antagonist.dm b/code/modules/clothing/gloves/antagonist.dm index 34574e2e53..0c436a706a 100644 --- a/code/modules/clothing/gloves/antagonist.dm +++ b/code/modules/clothing/gloves/antagonist.dm @@ -85,6 +85,6 @@ return 1 /obj/item/clothing/gloves/sterile/thieves/Touch(var/atom/A, var/proximity) - if(proximity && istype(usr, /mob/living/carbon/human) && do_after(usr, 1 SECOND, A)) + if(proximity && ishuman(usr) && do_after(usr, 1 SECOND, A)) return pickpocket(usr, A, proximity) return 0 diff --git a/code/modules/clothing/spacesuits/breaches.dm b/code/modules/clothing/spacesuits/breaches.dm index 85e61c4052..f4dca9722d 100644 --- a/code/modules/clothing/spacesuits/breaches.dm +++ b/code/modules/clothing/spacesuits/breaches.dm @@ -189,7 +189,7 @@ var/global/list/breach_burn_descriptors = list( if(!repair_power) return - if(istype(src.loc,/mob/living)) + if(isliving(src.loc)) to_chat(user, span_warning("How do you intend to patch a hardsuit while someone is wearing it?")) return @@ -205,7 +205,7 @@ var/global/list/breach_burn_descriptors = list( else if(W.has_tool_quality(TOOL_WELDER)) - if(istype(src.loc,/mob/living)) + if(isliving(src.loc)) to_chat(user, span_red("How do you intend to patch a hardsuit while someone is wearing it?")) return diff --git a/code/modules/clothing/spacesuits/rig/modules/computer.dm b/code/modules/clothing/spacesuits/rig/modules/computer.dm index e8e786d012..4f6c2deb68 100644 --- a/code/modules/clothing/spacesuits/rig/modules/computer.dm +++ b/code/modules/clothing/spacesuits/rig/modules/computer.dm @@ -73,7 +73,7 @@ // Check if there's actually an AI to deal with. var/mob/living/silicon/ai/target_ai - if(istype(input_device, /mob/living/silicon/ai)) + if(isAI(input_device)) target_ai = input_device else target_ai = locate(/mob/living/silicon/ai) in input_device.contents diff --git a/code/modules/clothing/spacesuits/rig/modules/specific/ai_container.dm b/code/modules/clothing/spacesuits/rig/modules/specific/ai_container.dm index b65417f3ec..56e9aadc04 100644 --- a/code/modules/clothing/spacesuits/rig/modules/specific/ai_container.dm +++ b/code/modules/clothing/spacesuits/rig/modules/specific/ai_container.dm @@ -58,7 +58,7 @@ // Check if there's actually an AI to deal with. var/mob/living/silicon/ai/target_ai - if(istype(input_device, /mob/living/silicon/ai)) + if(isAI(input_device)) target_ai = input_device else target_ai = locate(/mob/living/silicon/ai) in input_device.contents diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm index 3ae320e490..180b72b589 100644 --- a/code/modules/clothing/spacesuits/rig/rig.dm +++ b/code/modules/clothing/spacesuits/rig/rig.dm @@ -211,7 +211,7 @@ var/mob/living/M for(var/obj/item/piece in list(gloves,boots,helmet,chest)) if(piece.loc != src && !(wearer && piece.loc == wearer)) - if(istype(piece.loc, /mob/living)) + if(isliving(piece.loc)) M = piece.loc M.unEquip(piece) piece.forceMove(src) diff --git a/code/modules/clothing/spacesuits/rig/rig_attackby.dm b/code/modules/clothing/spacesuits/rig/rig_attackby.dm index e09db0ca75..f14919805d 100644 --- a/code/modules/clothing/spacesuits/rig/rig_attackby.dm +++ b/code/modules/clothing/spacesuits/rig/rig_attackby.dm @@ -64,7 +64,7 @@ // Check if this is a hardsuit upgrade or a modification. else if(istype(W,/obj/item/rig_module)) - if(istype(src.loc,/mob/living/carbon/human)) + if(ishuman(src.loc)) var/mob/living/carbon/human/H = src.loc if(H.back == src || H.belt == src) to_chat(user, span_danger("You can't install a hardsuit module while the suit is being worn.")) @@ -126,7 +126,7 @@ if(!to_remove) return - if(istype(src.loc,/mob/living/carbon/human) && to_remove != "cell") + if(ishuman(src.loc) && to_remove != "cell") var/mob/living/carbon/human/H = src.loc if(H.back == src || H.belt == src) to_chat(user, "You can't remove an installed device while the hardsuit is being worn.") diff --git a/code/modules/clothing/spacesuits/void/void.dm b/code/modules/clothing/spacesuits/void/void.dm index a8c4c0f53d..5402905a23 100644 --- a/code/modules/clothing/spacesuits/void/void.dm +++ b/code/modules/clothing/spacesuits/void/void.dm @@ -206,7 +206,7 @@ set category = "Object" set src in usr - if(!istype(src.loc,/mob/living)) return + if(!isliving(src.loc)) return var/mob/living/carbon/human/H = usr @@ -232,7 +232,7 @@ /obj/item/clothing/suit/space/void/attackby(obj/item/W as obj, mob/user as mob) - if(!istype(user,/mob/living)) return + if(!isliving(user)) return if(istype(W,/obj/item/clothing/accessory) || istype(W, /obj/item/hand_labeler)) return ..() diff --git a/code/modules/clothing/suits/miscellaneous.dm b/code/modules/clothing/suits/miscellaneous.dm index f4d2f9778e..7d0bc8b970 100644 --- a/code/modules/clothing/suits/miscellaneous.dm +++ b/code/modules/clothing/suits/miscellaneous.dm @@ -945,7 +945,7 @@ set name = "Roll Sleeves" set category = "Object" set src in usr - if(!istype(usr, /mob/living)) + if(!isliving(usr)) return if(usr.stat) return @@ -964,7 +964,7 @@ set name = "Toggle Shirt Tucking" set category = "Object" set src in usr - if(!istype(usr, /mob/living)||usr.stat) + if(!isliving(usr)||usr.stat) return if(tucked == 0) @@ -979,7 +979,7 @@ set name = "Toggle Shirt Buttons" set category = "Object" set src in usr - if(!istype(usr, /mob/living)||usr.stat) + if(!isliving(usr)||usr.stat) return if(buttoned == 0) diff --git a/code/modules/economy/cash.dm b/code/modules/economy/cash.dm index a536d08157..e59242c22f 100644 --- a/code/modules/economy/cash.dm +++ b/code/modules/economy/cash.dm @@ -26,7 +26,7 @@ var/obj/item/spacecash/SC = W SC.adjust_worth(src.worth) - if(istype(user, /mob/living/carbon/human)) + if(ishuman(user)) var/mob/living/carbon/human/h_user = user h_user.drop_from_inventory(src) diff --git a/code/modules/economy/casinocash.dm b/code/modules/economy/casinocash.dm index 3ae7383eb6..ad2dbdaf90 100644 --- a/code/modules/economy/casinocash.dm +++ b/code/modules/economy/casinocash.dm @@ -58,7 +58,7 @@ var/obj/item/spacecasinocash/SC = W SC.adjust_worth(src.worth) - if(istype(user, /mob/living/carbon/human)) + if(ishuman(user)) var/mob/living/carbon/human/h_user = user h_user.drop_from_inventory(src) diff --git a/code/modules/emotes/definitions/audible_furry_vr.dm b/code/modules/emotes/definitions/audible_furry_vr.dm index 0e838101f4..f068aadc4b 100644 --- a/code/modules/emotes/definitions/audible_furry_vr.dm +++ b/code/modules/emotes/definitions/audible_furry_vr.dm @@ -173,7 +173,7 @@ emote_sound = pick(smolsound) else emote_sound = pick(bigsound) - else if(istype(user, /mob/living/silicon/pai)) + else if(ispAI(user)) var/mob/living/silicon/pai/me = user if(me.chassis == "teppi") emote_sound = pick(bigsound) @@ -200,7 +200,7 @@ emote_sound = pick(smolsound) else emote_sound = pick(bigsound) - else if(istype(user, /mob/living/silicon/pai)) + else if(ispAI(user)) var/mob/living/silicon/pai/me = user if(me.chassis == "teppi") emote_sound = pick(bigsound) @@ -247,4 +247,4 @@ /decl/emote/audible/dook key = "dook" emote_message_3p = "dooks." - emote_sound = 'sound/voice/FerretDook.ogg' \ No newline at end of file + emote_sound = 'sound/voice/FerretDook.ogg' diff --git a/code/modules/eventkit/generic_objects/generic_item.dm b/code/modules/eventkit/generic_objects/generic_item.dm index fd1b7d9e20..d1b89fb81a 100644 --- a/code/modules/eventkit/generic_objects/generic_item.dm +++ b/code/modules/eventkit/generic_objects/generic_item.dm @@ -48,7 +48,7 @@ continue var/flash_time = 10 - 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)) diff --git a/code/modules/eventkit/generic_objects/generic_structure.dm b/code/modules/eventkit/generic_objects/generic_structure.dm index 83acb8ada0..36d3b4cb26 100644 --- a/code/modules/eventkit/generic_objects/generic_structure.dm +++ b/code/modules/eventkit/generic_objects/generic_structure.dm @@ -53,7 +53,7 @@ continue var/flash_time = 10 - 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)) @@ -82,7 +82,7 @@ if(get_dist(src, O) > 7) continue - if(istype(O, /mob/living/carbon/human)) + if(ishuman(O)) var/mob/living/carbon/human/H = O H.fear = 200 if(sound_activated) diff --git a/code/modules/eventkit/gm_interfaces/mob_spawner.dm b/code/modules/eventkit/gm_interfaces/mob_spawner.dm index 5b0a3004e4..02f11e1bb7 100644 --- a/code/modules/eventkit/gm_interfaces/mob_spawner.dm +++ b/code/modules/eventkit/gm_interfaces/mob_spawner.dm @@ -56,7 +56,7 @@ data["path_name"] = M.name data["desc"] = M.desc data["flavor_text"] = M.flavor_text - if(istype(M, /mob/living)) + if(isliving(M)) var/mob/living/L = M // AI Stuff @@ -67,7 +67,7 @@ data["max_health"] = L.maxHealth data["health"] = L.health - if(istype(L, /mob/living/simple_mob)) + if(isanimal(L)) var/mob/living/simple_mob/S = L data["melee_damage_lower"] = S.melee_damage_lower ? S.melee_damage_lower : 0 data["melee_damage_upper"] = S.melee_damage_upper ? S.melee_damage_upper : 0 @@ -142,13 +142,13 @@ M.name = sanitize(name) M.desc = sanitize(params["desc"]) M.flavor_text = sanitize(params["flavor_text"]) - if(istype(M, /mob/living)) + if(isliving(M)) var/mob/living/L = M if(isnum(params["max_health"])) L.maxHealth = params["max_health"] if(isnum(params["health"])) L.health = params["health"] - if(istype(M, /mob/living/simple_mob)) + if(isanimal(M)) var/mob/living/simple_mob/S = L if(isnum(params["melee_damage_lower"])) S.melee_damage_lower = params["melee_damage_lower"] diff --git a/code/modules/events/event_dynamic.dm b/code/modules/events/event_dynamic.dm index 3f670aa9e5..324cb6a6c2 100644 --- a/code/modules/events/event_dynamic.dm +++ b/code/modules/events/event_dynamic.dm @@ -136,7 +136,7 @@ var/list/event_last_fired = list() if("Meteor") 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(10) @@ -194,7 +194,7 @@ var/list/event_last_fired = list() active_with_role["Any"]++ - if(istype(M, /mob/living/silicon/robot)) + if(isrobot(M)) var/mob/living/silicon/robot/R = M if(R.module) if(istype(R.module, /obj/item/robot_module/robot/engineering)) diff --git a/code/modules/events/radiation_storm.dm b/code/modules/events/radiation_storm.dm index 487c80c289..ca0ab71ab2 100644 --- a/code/modules/events/radiation_storm.dm +++ b/code/modules/events/radiation_storm.dm @@ -41,7 +41,7 @@ continue if(A.flag_check(RAD_SHIELDED)) continue - if(istype(C,/mob/living/carbon/human)) + if(ishuman(C)) var/mob/living/carbon/human/H = C var/chance = 5.0 chance -= (chance / 100) * C.getarmor(null, "rad") diff --git a/code/modules/fishing/fishing_net.dm b/code/modules/fishing/fishing_net.dm index 63c35ec843..51353d51a1 100644 --- a/code/modules/fishing/fishing_net.dm +++ b/code/modules/fishing/fishing_net.dm @@ -146,7 +146,7 @@ for(var/D in accepted_mobs) if(istype(A, D)) var/mob/M = A - if(istype(M, /mob/living/carbon/human) && M.size_multiplier > 0.5) + if(ishuman(M) && M.size_multiplier > 0.5) accept = FALSE else if(A == user) accept = FALSE diff --git a/code/modules/flufftext/Hallucination.dm b/code/modules/flufftext/Hallucination.dm index af6d407639..8141d1f01f 100644 --- a/code/modules/flufftext/Hallucination.dm +++ b/code/modules/flufftext/Hallucination.dm @@ -40,7 +40,7 @@ Gunshots/explosions/opening doors/less rare audio (done) var/list/slots_free = list(ui_lhand,ui_rhand) if(l_hand) slots_free -= ui_lhand if(r_hand) slots_free -= ui_rhand - if(istype(src,/mob/living/carbon/human)) + if(ishuman(src)) var/mob/living/carbon/human/H = src if(!H.belt) slots_free += ui_belt if(!H.l_store) slots_free += ui_storage1 @@ -212,7 +212,7 @@ Gunshots/explosions/opening doors/less rare audio (done) return start_txt + mocktxt + end_txt + "
" /proc/check_panel(mob/M) - if (istype(M, /mob/living/carbon/human) || istype(M, /mob/living/silicon/ai)) + if (ishuman(M) || isAI(M)) if(M.hallucination < 15) return 1 return 0*/ diff --git a/code/modules/food/food/sandwich.dm b/code/modules/food/food/sandwich.dm index 022c28960e..0b3dc967f7 100644 --- a/code/modules/food/food/sandwich.dm +++ b/code/modules/food/food/sandwich.dm @@ -93,7 +93,7 @@ break var/mob/living/H - if(istype(M,/mob/living)) + if(isliving(M)) H = M if(H && shard && M == user) //This needs a check for feeding the food to other people, but that could be abusable. diff --git a/code/modules/food/food/snacks.dm b/code/modules/food/food/snacks.dm index 02f25faf13..5d646fcd81 100644 --- a/code/modules/food/food/snacks.dm +++ b/code/modules/food/food/snacks.dm @@ -118,7 +118,7 @@ var/fullness = M.nutrition + (M.reagents.get_reagent_amount(REAGENT_ID_NUTRIMENT) * 25) if(M == user) //If you're eating it yourself - if(istype(M,/mob/living/carbon/human)) + if(ishuman(M)) var/mob/living/carbon/human/H = M if(!H.check_has_mouth()) to_chat(user, "Where do you intend to put \the [src]? You don't have a mouth!") @@ -159,7 +159,7 @@ return ..() else - if(istype(M,/mob/living/carbon/human)) + if(ishuman(M)) var/mob/living/carbon/human/H = M if(!H.check_has_mouth()) to_chat(user, "Where do you intend to put \the [src]? \The [H] doesn't have a mouth!") diff --git a/code/modules/food/kitchen/cooking_machines/_appliance.dm b/code/modules/food/kitchen/cooking_machines/_appliance.dm index 49700ae28a..6fe8d63c17 100644 --- a/code/modules/food/kitchen/cooking_machines/_appliance.dm +++ b/code/modules/food/kitchen/cooking_machines/_appliance.dm @@ -722,13 +722,13 @@ src.composition_reagent = REAGENT_ID_NUTRIMENT // diona are plants, not meat else src.composition_reagent = REAGENT_ID_PROTEIN - if(istype(src, /mob/living/carbon/human)) + if(ishuman(src)) var/mob/living/carbon/human/H = src if(istype(H.species, /datum/species/diona)) src.composition_reagent = REAGENT_ID_NUTRIMENT //if the mob is a simple animal - MOB NOT ANIMAL - with a defined meat quantity - if (istype(src, /mob/living/simple_mob)) + if (isanimal(src)) var/mob/living/simple_mob/SA = src if(SA.meat_amount) src.composition_reagent_quantity = SA.meat_amount*2*9 diff --git a/code/modules/food/kitchen/gibber.dm b/code/modules/food/kitchen/gibber.dm index e3edfe0ba6..5ce2b93d54 100644 --- a/code/modules/food/kitchen/gibber.dm +++ b/code/modules/food/kitchen/gibber.dm @@ -127,11 +127,11 @@ to_chat(user, span_danger("The gibber is locked and running, wait for it to finish.")) return - if(!(istype(victim, /mob/living/carbon)) && !(istype(victim, /mob/living/simple_mob)) ) + if(!(iscarbon(victim)) && !(isanimal(victim)) ) to_chat(user, span_danger("This is not suitable for the gibber!")) return - if(istype(victim,/mob/living/carbon/human) && !emagged) + if(ishuman(victim) && !emagged) to_chat(user, span_danger("The gibber safety guard is engaged!")) return @@ -195,7 +195,7 @@ var/list/byproducts = occupant?.butchery_loot?.Copy() - if(istype(src.occupant,/mob/living/carbon/human)) + if(ishuman(src.occupant)) var/mob/living/carbon/human/H = occupant slab_name = src.occupant.real_name slab_type = H.isSynthetic() ? /obj/item/stack/material/steel : H.species.meat_type diff --git a/code/modules/gamemaster/event2/events/synthetic/ion_storm.dm b/code/modules/gamemaster/event2/events/synthetic/ion_storm.dm index a11bfb5a69..c2416ae426 100644 --- a/code/modules/gamemaster/event2/events/synthetic/ion_storm.dm +++ b/code/modules/gamemaster/event2/events/synthetic/ion_storm.dm @@ -29,7 +29,7 @@ continue // Or borgs with an AI (they'll get their AI's ion law anyways). - if(istype(target, /mob/living/silicon/robot)) + if(isrobot(target)) var/mob/living/silicon/robot/R = target if(R.connected_ai) continue @@ -71,4 +71,4 @@ announce_odds = 100 /datum/event2/event/ion_storm/fake/start() - return \ No newline at end of file + return diff --git a/code/modules/games/cards.dm b/code/modules/games/cards.dm index df4e50d63b..3d14d3910a 100644 --- a/code/modules/games/cards.dm +++ b/code/modules/games/cards.dm @@ -239,7 +239,7 @@ /obj/item/deck/MouseDrop(mob/user as mob) // Code from Paper bin, so you can still pick up the deck if((user == usr && (!( usr.restrained() ) && (!( usr.stat ) && (usr.contents.Find(src) || in_range(src, usr)))))) - if(!istype(usr, /mob/living/simple_mob)) + if(!isanimal(usr)) if( !usr.get_active_hand() ) //if active hand is empty var/mob/living/carbon/human/H = user var/obj/item/organ/external/temp = H.organs_by_name["r_hand"] @@ -258,7 +258,7 @@ /obj/item/deck/verb_pickup() // Snowflaked so pick up verb work as intended var/mob/user = usr if((istype(user) && (!( usr.restrained() ) && (!( usr.stat ) && (usr.contents.Find(src) || in_range(src, usr)))))) - if(!istype(usr, /mob/living/simple_mob)) + if(!isanimal(usr)) if( !usr.get_active_hand() ) //if active hand is empty var/mob/living/carbon/human/H = user var/obj/item/organ/external/temp = H.organs_by_name["r_hand"] diff --git a/code/modules/holodeck/HolodeckObjects.dm b/code/modules/holodeck/HolodeckObjects.dm index a9b195e789..ff603066eb 100644 --- a/code/modules/holodeck/HolodeckObjects.dm +++ b/code/modules/holodeck/HolodeckObjects.dm @@ -182,7 +182,7 @@ return//I really wish I did not need this if (istype(W, /obj/item/grab) && get_dist(src,user)<2) var/obj/item/grab/G = W - if(istype(G.affecting,/mob/living)) + if(isliving(G.affecting)) var/mob/living/M = G.affecting var/state = G.state qdel(W) //gotta delete it here because if window breaks, it won't get deleted @@ -353,7 +353,7 @@ cut_overlays() //So that it doesn't keep stacking overlays non-stop on top of each other if(active) add_overlay(blade_overlay) - if(istype(usr,/mob/living/carbon/human)) + if(ishuman(usr)) var/mob/living/carbon/human/H = usr H.update_inv_l_hand() H.update_inv_r_hand() diff --git a/code/modules/hydroponics/grown.dm b/code/modules/hydroponics/grown.dm index 7e7629b0da..07134ae23a 100644 --- a/code/modules/hydroponics/grown.dm +++ b/code/modules/hydroponics/grown.dm @@ -151,7 +151,7 @@ if(M.buckled) return - if(istype(M,/mob/living/carbon/human)) + if(ishuman(M)) var/mob/living/carbon/human/H = M if(H.shoes && H.shoes.item_flags & NOSLIP) return @@ -179,7 +179,7 @@ //TODO: generalize this. to_chat(user, span_notice("You add some cable to the [src.name] and slide it inside the battery casing.")) var/obj/item/cell/potato/pocell = new /obj/item/cell/potato(get_turf(user)) - if(src.loc == user && istype(user,/mob/living/carbon/human)) + if(src.loc == user && ishuman(user)) user.put_in_hands(pocell) pocell.maxcharge = src.potency * 200 pocell.charge = pocell.maxcharge diff --git a/code/modules/hydroponics/seed.dm b/code/modules/hydroponics/seed.dm index 11f55f8f83..ab24e9cb17 100644 --- a/code/modules/hydroponics/seed.dm +++ b/code/modules/hydroponics/seed.dm @@ -274,7 +274,7 @@ qdel(thrown) return - if(istype(target,/mob/living)) + if(isliving(target)) splatted = apply_special_effect(target,thrown) else if(istype(target,/turf)) splatted = 1 @@ -849,7 +849,7 @@ product.force = 1 //Handle spawning in living, mobile products (like dionaea). - if(istype(product,/mob/living)) + if(isliving(product)) product.visible_message(span_notice("The pod disgorges [product]!")) handle_living_product(product) diff --git a/code/modules/hydroponics/spreading/spreading_response.dm b/code/modules/hydroponics/spreading/spreading_response.dm index c4256a68d3..8a56e37e9b 100644 --- a/code/modules/hydroponics/spreading/spreading_response.dm +++ b/code/modules/hydroponics/spreading/spreading_response.dm @@ -97,7 +97,7 @@ //grabbing people if(!victim.anchored && Adjacent(victim) && victim.loc != src.loc) var/can_grab = 1 - if(istype(victim, /mob/living/carbon/human)) + if(ishuman(victim)) var/mob/living/carbon/human/H = victim if(istype(H.shoes, /obj/item/clothing/shoes/magboots) && (H.shoes.item_flags & NOSLIP)) can_grab = 0 diff --git a/code/modules/hydroponics/trays/tray.dm b/code/modules/hydroponics/trays/tray.dm index 7afaa3f6b6..aa9b9ad4fb 100644 --- a/code/modules/hydroponics/trays/tray.dm +++ b/code/modules/hydroponics/trays/tray.dm @@ -424,7 +424,7 @@ if(usr.incapacitated()) return - if(ishuman(usr) || istype(usr, /mob/living/silicon/robot)) + if(ishuman(usr) || isrobot(usr)) if(labelled) to_chat(usr, span_filter_notice("You remove the label.")) labelled = null @@ -440,7 +440,7 @@ if(usr.incapacitated()) return - if(ishuman(usr) || istype(usr, /mob/living/silicon/robot)) + if(ishuman(usr) || isrobot(usr)) var/new_light = tgui_input_list(usr, "Specify a light level.", "Light Level", list(0,1,2,3,4,5,6,7,8,9,10)) if(new_light) tray_light = new_light @@ -688,7 +688,7 @@ if(usr.incapacitated()) return - if(ishuman(usr) || istype(usr, /mob/living/silicon/robot)) + if(ishuman(usr) || isrobot(usr)) close_lid(usr) return diff --git a/code/modules/hydroponics/trays/tray_tools.dm b/code/modules/hydroponics/trays/tray_tools.dm index 41329703f7..09d8b22fdb 100644 --- a/code/modules/hydroponics/trays/tray_tools.dm +++ b/code/modules/hydroponics/trays/tray_tools.dm @@ -168,7 +168,7 @@ var/obj/item/paper/P = new /obj/item/paper(get_turf(src)) P.name = "paper - [form_title]" P.info = "[dat]" - if(istype(user,/mob/living/carbon/human)) + if(ishuman(user)) user.put_in_hands(P) user.visible_message("\The [src] spits out a piece of paper.") return diff --git a/code/modules/integrated_electronics/core/assemblies.dm b/code/modules/integrated_electronics/core/assemblies.dm index 3cdf488b52..b43bb88379 100644 --- a/code/modules/integrated_electronics/core/assemblies.dm +++ b/code/modules/integrated_electronics/core/assemblies.dm @@ -286,7 +286,7 @@ return TRUE else if(istype(I, /obj/item/integrated_circuit)) - if(!user.unEquip(I) && !istype(user, /mob/living/silicon/robot)) //Robots cannot de-equip items in grippers. + if(!user.unEquip(I) && !isrobot(user)) //Robots cannot de-equip items in grippers. return FALSE if(add_circuit(I, user)) to_chat(user, span_notice("You slide \the [I] inside \the [src].")) diff --git a/code/modules/integrated_electronics/core/assemblies/generic.dm b/code/modules/integrated_electronics/core/assemblies/generic.dm index ddaa4f6b87..68b24d9052 100644 --- a/code/modules/integrated_electronics/core/assemblies/generic.dm +++ b/code/modules/integrated_electronics/core/assemblies/generic.dm @@ -215,7 +215,7 @@ user.visible_message("\The [user] attaches \the [src] to the wall.", span_notice("You attach \the [src] to the wall."), span_warningplain("You hear clicking.")) - if(istype(user, /mob/living/silicon/robot)) //Robots cannot unequip/drop items, for Safety Reasons. + if(isrobot(user)) //Robots cannot unequip/drop items, for Safety Reasons. forceMove(T) user.drop_item(T) anchored = TRUE diff --git a/code/modules/integrated_electronics/subtypes/input.dm b/code/modules/integrated_electronics/subtypes/input.dm index fd008425d3..b7c73a5482 100644 --- a/code/modules/integrated_electronics/subtypes/input.dm +++ b/code/modules/integrated_electronics/subtypes/input.dm @@ -234,7 +234,7 @@ var/datum/integrated_io/O = outputs[1] O.data = null if(assembly) - if(istype(assembly.loc, /mob/living)) // Now check if someone's holding us. + if(isliving(assembly.loc)) // Now check if someone's holding us. O.data = WEAKREF(assembly.loc) O.push_data() diff --git a/code/modules/integrated_electronics/subtypes/reagents.dm b/code/modules/integrated_electronics/subtypes/reagents.dm index 9510a228f6..d902368282 100644 --- a/code/modules/integrated_electronics/subtypes/reagents.dm +++ b/code/modules/integrated_electronics/subtypes/reagents.dm @@ -149,7 +149,7 @@ activate_pin(3) return var/datum/reagent/B - if(istype(T, /mob/living/carbon/human)) + if(ishuman(T)) var/mob/living/carbon/human/H = T if(H.species && !H.should_have_organ(O_HEART)) H.reagents.trans_to_obj(src, tramount) diff --git a/code/modules/library/lib_items.dm b/code/modules/library/lib_items.dm index e224dc3c4c..9856001401 100644 --- a/code/modules/library/lib_items.dm +++ b/code/modules/library/lib_items.dm @@ -330,7 +330,7 @@ Book Cart End dat+= "
Next Page


" if(istype(pages[page], /obj/item/paper)) var/obj/item/paper/P = W - if(!(istype(usr, /mob/living/carbon/human) || isobserver(usr) || istype(usr, /mob/living/silicon))) + if(!(ishuman(usr) || isobserver(usr) || issilicon(usr))) dat += "[P.name][stars(P.info)][P.stamps]" else dat += "[P.name][P.info][P.stamps]" @@ -344,7 +344,7 @@ Book Cart End + "[P.scribble ? "
Written on the back:
[P.scribble]" : null]"\ + "", "window=[name]") else if(!isnull(pages[page])) - if(!(istype(usr, /mob/living/carbon/human) || isobserver(usr) || istype(usr, /mob/living/silicon))) + if(!(ishuman(usr) || isobserver(usr) || issilicon(usr))) dat += "Page [page][stars(pages[page])]" else dat += "Page [page][pages[page]]" diff --git a/code/modules/materials/sheets/supermatter.dm b/code/modules/materials/sheets/supermatter.dm index 03da2643ad..f2969a9409 100644 --- a/code/modules/materials/sheets/supermatter.dm +++ b/code/modules/materials/sheets/supermatter.dm @@ -26,7 +26,7 @@ return var/burn_user = TRUE - if(istype(M, /mob/living/carbon/human)) + if(ishuman(M)) var/mob/living/carbon/human/H = user var/obj/item/clothing/gloves/G = H.gloves if(istype(G) && ((G.flags & THICKMATERIAL && prob(70)) || istype(G, /obj/item/clothing/gloves/gauntlets))) @@ -39,7 +39,7 @@ H.drop_from_inventory(src, get_turf(H)) return - if(istype(user, /mob/living/silicon/robot)) + if(isrobot(user)) burn_user = FALSE if(burn_user) diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm index b37a717e95..47f89d9ed7 100644 --- a/code/modules/mining/mine_turfs.dm +++ b/code/modules/mining/mine_turfs.dm @@ -316,7 +316,7 @@ var/list/mining_overlay_cache = list() if(!density) return . - if(istype(AM,/mob/living/carbon/human)) + if(ishuman(AM)) var/mob/living/carbon/human/H = AM var/obj/item/pickaxe/P = H.get_inactive_hand() if(istype(P)) diff --git a/code/modules/mob/_modifiers/cloning.dm b/code/modules/mob/_modifiers/cloning.dm index f6c0493170..eec03ab9d2 100644 --- a/code/modules/mob/_modifiers/cloning.dm +++ b/code/modules/mob/_modifiers/cloning.dm @@ -95,7 +95,7 @@ /datum/modifier/franken_sickness/tick() if(holder.stat != DEAD) - if(istype(holder, /mob/living/carbon/human)) + if(ishuman(holder)) var/mob/living/carbon/human/F = holder if(F.can_defib) F.can_defib = 0 diff --git a/code/modules/mob/_modifiers/traits_phobias.dm b/code/modules/mob/_modifiers/traits_phobias.dm index 17a8454204..f080fc4992 100644 --- a/code/modules/mob/_modifiers/traits_phobias.dm +++ b/code/modules/mob/_modifiers/traits_phobias.dm @@ -125,7 +125,7 @@ if(L.alpha <= FAKE_INVIS_ALPHA_THRESHOLD) // Can't fear something you can't (easily) see. continue - if(istype(thing, /mob/living/carbon/human)) + if(ishuman(thing)) var/mob/living/carbon/human/H = thing var/self_multiplier = H == holder ? 2 : 1 var/human_blood_fear_amount = 0 @@ -456,7 +456,7 @@ else fear_amount += 10 // It's huge and feral. - if(istype(L, /mob/living/carbon/human)) + if(ishuman(L)) var/mob/living/carbon/human/S = L if(istype(S.species, /datum/species/skrell)) //Skrell ARE slimey. fear_amount += 1 @@ -547,7 +547,7 @@ var/mob/living/L = thing if(L.alpha <= FAKE_INVIS_ALPHA_THRESHOLD) // Can't fear something you can't (easily) see. continue - if(istype(L, /mob/living/carbon/human)) + if(ishuman(L)) var/mob/living/carbon/human/H = L if(H.l_hand && istype(H.l_hand, /obj/item/reagent_containers/syringe) || H.r_hand && istype(H.r_hand, /obj/item/reagent_containers/syringe)) fear_amount += 10 diff --git a/code/modules/mob/animations.dm b/code/modules/mob/animations.dm index 331a7daef1..8d2f95a0fe 100644 --- a/code/modules/mob/animations.dm +++ b/code/modules/mob/animations.dm @@ -12,7 +12,7 @@ below 100 is not dizzy /mob/var/is_dizzy = 0 /mob/proc/make_dizzy(var/amount) - if(!istype(src, /mob/living/carbon/human)) // for the moment, only humans get dizzy + if(!ishuman(src)) // for the moment, only humans get dizzy return dizziness = min(1000, dizziness + amount) // store what will be new value @@ -46,7 +46,7 @@ note dizziness decrements automatically in the mob's Life() proc. /mob/var/is_jittery = 0 /mob/var/jitteriness = 0//Carbon /mob/proc/make_jittery(var/amount) - if(!istype(src, /mob/living/carbon/human)) // for the moment, only humans get dizzy + if(!ishuman(src)) // for the moment, only humans get dizzy return jitteriness = min(1000, jitteriness + amount) // store what will be new value diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 51694096e2..350af8e2a4 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -410,7 +410,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp set category = "Ghost.Game" set desc = "Teleport to a location." - if(!istype(usr, /mob/observer/dead)) + if(!isobserver(usr)) to_chat(usr, span_filter_notice("Not when you're not dead!")) return @@ -423,7 +423,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp if(!A) return - if(!istype(usr, /mob/observer/dead)) + if(!isobserver(usr)) to_chat(usr, "Not when you're not dead!") return @@ -435,7 +435,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp set category = "Ghost.Game" set desc = "Follow and haunt a mob." - if(!istype(usr, /mob/observer/dead)) + if(!isobserver(usr)) to_chat(usr, "Not when you're not dead!") return @@ -450,7 +450,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp if(!M) return - if(!istype(usr, /mob/observer/dead)) + if(!isobserver(usr)) to_chat(usr, "Not when you're not dead!") return @@ -620,7 +620,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp set desc = "Teleport to a mob" set popup_menu = FALSE - if(!istype(usr, /mob/observer/dead)) //Make sure they're an observer! + if(!isobserver(usr)) //Make sure they're an observer! return var/list/possible_mobs = jumpable_mobs() @@ -656,7 +656,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp set name = "Analyze Air" set category = "Ghost.Game" - if(!istype(usr, /mob/observer/dead)) return + if(!isobserver(usr)) return // Shamelessly copied from the Gas Analyzers if (!( istype(usr.loc, /turf) )) diff --git a/code/modules/mob/dead/observer/observer_vr.dm b/code/modules/mob/dead/observer/observer_vr.dm index fad743e5c5..5ca6b52f31 100644 --- a/code/modules/mob/dead/observer/observer_vr.dm +++ b/code/modules/mob/dead/observer/observer_vr.dm @@ -110,7 +110,7 @@ set desc = "Find an active ghost pod" set popup_menu = FALSE - if(!istype(usr, /mob/observer/dead)) //Make sure they're an observer! + if(!isobserver(usr)) //Make sure they're an observer! return var/input = tgui_input_list(usr, "Select a ghost pod:", "Ghost Jump", observe_list_format(active_ghost_pods)) @@ -137,7 +137,7 @@ set desc = "Find a Auto Resleever" set popup_menu = FALSE - if(!istype(usr, /mob/observer/dead)) //Make sure they're an observer! + if(!isobserver(usr)) //Make sure they're an observer! return var/list/ar = list() diff --git a/code/modules/mob/freelook/ai/eye.dm b/code/modules/mob/freelook/ai/eye.dm index 679d02c37c..e4b481c67c 100644 --- a/code/modules/mob/freelook/ai/eye.dm +++ b/code/modules/mob/freelook/ai/eye.dm @@ -84,7 +84,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.multicam_on || (AI.client.eye == AI.eyeobj))) var/turf/T = get_turf(src) diff --git a/code/modules/mob/hear_say.dm b/code/modules/mob/hear_say.dm index 5b2d31cdfc..7b08eca8e4 100644 --- a/code/modules/mob/hear_say.dm +++ b/code/modules/mob/hear_say.dm @@ -321,7 +321,7 @@ if(!speaker.client) rendered = span_npc_say(rendered) else - if(istype(speaker, /mob/living/silicon/ai)) + if(isAI(speaker)) var/mob/living/silicon/ai/source = speaker if(!(get_z(src) == get_z(source.holo))) rendered = span_multizsay(rendered) diff --git a/code/modules/mob/holder.dm b/code/modules/mob/holder.dm index 84b14551ba..2628aed9df 100644 --- a/code/modules/mob/holder.dm +++ b/code/modules/mob/holder.dm @@ -340,7 +340,7 @@ var/list/holder_mob_icon_cache = list() /mob/living/MouseDrop(var/atom/over_object) var/mob/living/carbon/human/H = over_object if(holder_type && issmall(src) && istype(H) && !H.lying && Adjacent(H) && (src.a_intent == I_HELP && H.a_intent == I_HELP)) //VOREStation Edit - if(!issmall(H) || !istype(src, /mob/living/carbon/human)) + if(!issmall(H) || !ishuman(src)) get_scooped(H, (usr == src)) return return ..() diff --git a/code/modules/mob/language/synthetic.dm b/code/modules/mob/language/synthetic.dm index 73684681db..d6186b153a 100644 --- a/code/modules/mob/language/synthetic.dm +++ b/code/modules/mob/language/synthetic.dm @@ -24,7 +24,7 @@ var/message_body = span_message("[speaker.say_quote(message)], \"[message]\"") for (var/mob/M in dead_mob_list) - if(!istype(M,/mob/new_player) && !istype(M,/mob/living/carbon/brain)) //No meta-evesdropping + if(!isnewplayer(M) && !istype(M,/mob/living/carbon/brain)) //No meta-evesdropping var/message_to_send = span_binarysay("[message_start] ([ghost_follow_link(speaker, M)]) [message_body]") if(M.check_mentioned(message) && M.client?.prefs?.read_preference(/datum/preference/toggle/check_mention)) message_to_send = span_large(span_bold("[message_to_send]")) @@ -33,7 +33,7 @@ for (var/mob/living/S in living_mob_list) if(drone_only && !istype(S,/mob/living/silicon/robot/drone)) continue - else if(istype(S , /mob/living/silicon/ai)) + else if(isAI(S)) message_start = span_binarysay("[name], " + span_name("[speaker.name]") + "") else if (!S.binarycheck()) continue diff --git a/code/modules/mob/living/bot/bot.dm b/code/modules/mob/living/bot/bot.dm index dec3666945..e1e0b8ce45 100644 --- a/code/modules/mob/living/bot/bot.dm +++ b/code/modules/mob/living/bot/bot.dm @@ -232,7 +232,7 @@ if(step_towards(src, pick(can_go))) return for(var/mob in loc) - if(istype(mob, /mob/living/bot) && mob != src) // Same as above, but we also don't want to have bots ontop of bots. Cleanbots shouldn't stack >:( + if(isbot(mob) && mob != src) // Same as above, but we also don't want to have bots ontop of bots. Cleanbots shouldn't stack >:( var/turf/my_turf = get_turf(src) var/list/can_go = my_turf.CardinalTurfsWithAccess(botcard) if(LAZYLEN(can_go)) diff --git a/code/modules/mob/living/bot/secbot.dm b/code/modules/mob/living/bot/secbot.dm index c9ee578364..c440ad9c1a 100644 --- a/code/modules/mob/living/bot/secbot.dm +++ b/code/modules/mob/living/bot/secbot.dm @@ -342,7 +342,7 @@ H.handcuffed = new /obj/item/handcuffs(H) H.update_handcuffed() busy = FALSE - else if(istype(M, /mob/living)) + else if(isliving(M)) var/mob/living/L = M L.adjustBruteLoss(xeno_harm_strength) do_attack_animation(M) diff --git a/code/modules/mob/living/butchering.dm b/code/modules/mob/living/butchering.dm index ad1eecfba6..aa1381eaf4 100644 --- a/code/modules/mob/living/butchering.dm +++ b/code/modules/mob/living/butchering.dm @@ -58,7 +58,7 @@ neworg.name = "[name] [neworg.name]" neworg.meat_type = meat_type - if(istype(src, /mob/living/simple_mob)) + if(isanimal(src)) var/mob/living/simple_mob/SM = src if(SM.limb_icon) neworg.force_icon = SM.limb_icon diff --git a/code/modules/mob/living/carbon/alien/diona/diona_powers.dm b/code/modules/mob/living/carbon/alien/diona/diona_powers.dm index a2b33f7973..6021f2ba3c 100644 --- a/code/modules/mob/living/carbon/alien/diona/diona_powers.dm +++ b/code/modules/mob/living/carbon/alien/diona/diona_powers.dm @@ -17,7 +17,7 @@ if(!(src.Adjacent(C)) || !(C.client)) continue - if(istype(C,/mob/living/carbon/human)) + if(ishuman(C)) var/mob/living/carbon/human/D = C if(D.species && D.species.name == SPECIES_DIONA) choices += C diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 3f83d9491e..9f900ccb9f 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -51,7 +51,7 @@ var/obj/item/I = user.get_active_hand() if(I && I.force) var/d = rand(round(I.force / 4), I.force) - if(istype(src, /mob/living/carbon/human)) + if(ishuman(src)) var/mob/living/carbon/human/H = src var/obj/item/organ/external/organ = H.get_organ(BP_TORSO) if (istype(organ)) @@ -193,7 +193,7 @@ /mob/living/carbon/proc/help_shake_act(mob/living/carbon/M) if (src.health >= CONFIG_GET(number/health_threshold_crit)) - if(src == M && istype(src, /mob/living/carbon/human)) + if(src == M && ishuman(src)) var/mob/living/carbon/human/H = src var/datum/gender/T = gender_datums[H.get_visible_gender()] src.visible_message( \ @@ -271,7 +271,7 @@ src.ExtinguishMob() src.fire_stacks = 0 else - if (istype(src,/mob/living/carbon/human) && src:w_uniform) + if (ishuman(src) && src:w_uniform) var/mob/living/carbon/human/H = src H.w_uniform.add_fingerprint(M) diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index 89e49dae96..9f6cdce667 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -297,7 +297,7 @@ msg += span_warning("[T.He] [T.is]n't responding to anything around [T.him] and seems to be asleep.") if((stat == 2 || src.losebreath) && get_dist(user, src) <= 3) msg += span_warning("[T.He] [T.does] not appear to be breathing.") - if(istype(user, /mob/living/carbon/human) && !user.stat && Adjacent(user)) + if(ishuman(user) && !user.stat && Adjacent(user)) user.visible_message(span_infoplain(span_bold("[usr]") + " checks [src]'s pulse."), span_infoplain("You check [src]'s pulse.")) spawn(15) if(isobserver(user) || (Adjacent(user) && !user.stat)) // If you're a corpse then you can't exactly check their pulse, but ghosts can see anything @@ -465,7 +465,7 @@ //Helper procedure. Called by /mob/living/carbon/human/examine() and /mob/living/carbon/human/Topic() to determine HUD access to security and medical records. /proc/hasHUD(mob/M as mob, hudtype) - if(istype(M, /mob/living/carbon/human)) + if(ishuman(M)) var/mob/living/carbon/human/H = M if(hasHUD_vr(H,hudtype)) return 1 //VOREStation Add - Added records access for certain modes of omni-hud glasses switch(hudtype) @@ -473,6 +473,6 @@ return istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(H.glasses, /obj/item/clothing/glasses/sunglasses/sechud) if("medical") return istype(H.glasses, /obj/item/clothing/glasses/hud/health) - else if(istype(M, /mob/living/silicon/robot)) + else if(isrobot(M)) var/mob/living/silicon/robot/R = M return R.sensor_type //VOREStation Add - Borgo sensors are now binary so just have them on or off diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index f90accb88f..a9e83c0b4a 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -414,7 +414,7 @@ spawn() BITSET(hud_updateflag, WANTED_HUD) - if(istype(usr,/mob/living/carbon/human)) + if(ishuman(usr)) var/mob/living/carbon/human/U = usr U.handle_hud_list() if(istype(usr,/mob/living/silicon/robot)) @@ -500,7 +500,7 @@ var/counter = 1 while(R.fields[text("com_[]", counter)]) counter++ - if(istype(usr,/mob/living/carbon/human)) + if(ishuman(usr)) var/mob/living/carbon/human/U = usr R.fields[text("com_[counter]")] = text("Made by [U.get_authentification_name()] ([U.get_assignment()]) on [time2text(world.realtime, "DDD MMM DD hh:mm:ss")], [game_year]
[t1]") if(istype(usr,/mob/living/silicon/robot)) @@ -533,7 +533,7 @@ PDA_Manifest.Cut() spawn() - if(istype(usr,/mob/living/carbon/human)) + if(ishuman(usr)) var/mob/living/carbon/human/U = usr U.handle_regular_hud_updates() if(istype(usr,/mob/living/silicon/robot)) @@ -620,7 +620,7 @@ var/counter = 1 while(R.fields[text("com_[]", counter)]) counter++ - if(istype(usr,/mob/living/carbon/human)) + if(ishuman(usr)) var/mob/living/carbon/human/U = usr R.fields[text("com_[counter]")] = text("Made by [U.get_authentification_name()] ([U.get_assignment()]) on [time2text(world.realtime, "DDD MMM DD hh:mm:ss")], [game_year]
[t1]") if(istype(usr,/mob/living/silicon/robot)) @@ -706,7 +706,7 @@ var/counter = 1 while(R.fields[text("com_[]", counter)]) counter++ - if(istype(usr,/mob/living/carbon/human)) + if(ishuman(usr)) var/mob/living/carbon/human/U = usr R.fields[text("com_[counter]")] = text("Made by [U.get_authentification_name()] ([U.get_assignment()]) on [time2text(world.realtime, "DDD MMM DD hh:mm:ss")], [game_year]
[t1]") if(istype(usr,/mob/living/silicon/robot)) diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 8d8fbfd5b3..8abd64b76f 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -396,7 +396,7 @@ emp_act //VORESTATION EDIT START - Allows for thrown vore! //Throwing a prey into a pred takes priority. After that it checks to see if the person being thrown is a pred. // I put more comments here for ease of reading. - if(istype(AM, /mob/living)) + if(isliving(AM)) var/mob/living/thrown_mob = AM if(isanimal(thrown_mob) && !allowmobvore) //Is the thrown_mob an animal and we don't allow mobvore? return @@ -447,7 +447,7 @@ emp_act return var/zone - if (istype(O.thrower, /mob/living)) + if (isliving(O.thrower)) var/mob/living/L = O.thrower zone = check_zone(L.zone_sel.selecting) else diff --git a/code/modules/mob/living/carbon/human/human_movement.dm b/code/modules/mob/living/carbon/human/human_movement.dm index a0cd7eab81..83a942425a 100644 --- a/code/modules/mob/living/carbon/human/human_movement.dm +++ b/code/modules/mob/living/carbon/human/human_movement.dm @@ -20,7 +20,7 @@ . += M.slowdown var/health_deficiency = (getMaxHealth() - health) - if(istype(src, /mob/living/carbon/human)) + if(ishuman(src)) var/mob/living/carbon/human/H = src health_deficiency *= H.species.trauma_mod //Species pain sensitivity does not apply to painkillers, so we apply it before if(health_deficiency >= 40) diff --git a/code/modules/mob/living/carbon/human/human_powers.dm b/code/modules/mob/living/carbon/human/human_powers.dm index 9abd6ddf22..79168e922a 100644 --- a/code/modules/mob/living/carbon/human/human_powers.dm +++ b/code/modules/mob/living/carbon/human/human_powers.dm @@ -102,14 +102,14 @@ var/mob/M = targets[target] - if(istype(M, /mob/observer/dead) || M.stat == DEAD) + if(isobserver(M) || M.stat == DEAD) to_chat(src, span_filter_notice("Not even a [src.species.name] can speak to the dead.")) return log_say("(COMMUNE to [key_name(M)]) [text]",src) to_chat(M, span_filter_say("[span_blue("Like lead slabs crashing into the ocean, alien thoughts drop into your mind: [text]")]")) - if(istype(M,/mob/living/carbon/human)) + if(ishuman(M)) var/mob/living/carbon/human/H = M if(H.species.name == src.species.name) return diff --git a/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_powers.dm b/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_powers.dm index 04a7be4a26..65179e9fb1 100644 --- a/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_powers.dm +++ b/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_powers.dm @@ -570,7 +570,7 @@ var/obj/held_item = protie.get_active_hand() if(istype(held_item,/obj/item/grab)) var/obj/item/grab/G = held_item - if(istype(G.affecting, /mob/living/carbon/human)) + if(ishuman(G.affecting)) target = G.affecting if(istype(target.species, /datum/species/protean)) to_chat(protie, span_danger("You can't latch onto a fellow Protean!")) diff --git a/code/modules/mob/living/carbon/human/species/station/station_special_abilities_vr.dm b/code/modules/mob/living/carbon/human/species/station/station_special_abilities_vr.dm index f24185eff6..48a7ad0bc0 100644 --- a/code/modules/mob/living/carbon/human/species/station/station_special_abilities_vr.dm +++ b/code/modules/mob/living/carbon/human/species/station/station_special_abilities_vr.dm @@ -215,7 +215,7 @@ var/list/slots_free = list(ui_lhand,ui_rhand) if(l_hand) slots_free -= ui_lhand if(r_hand) slots_free -= ui_rhand - if(istype(src,/mob/living/carbon/human)) + if(ishuman(src)) var/mob/living/carbon/human/H = src if(!H.belt) slots_free += ui_belt if(!H.l_store) slots_free += ui_storage1 @@ -1265,7 +1265,7 @@ last_special = world.time + 10 //Anti-spam. - if (!istype(src, /mob/living)) + if (!isliving(src)) to_chat(src, span_warning("It doesn't work that way.")) return @@ -1289,7 +1289,7 @@ var/list/targets = list() //IF IT IS NOT BROKEN. DO NOT FIX IT. for(var/mob/living/L in range(5, src)) - if(!istype(L, /mob/living)) //Don't eat anything that isn't mob/living. Failsafe. + if(!isliving(L)) //Don't eat anything that isn't mob/living. Failsafe. continue if(L == src) //no eating yourself. 1984. continue @@ -1305,7 +1305,7 @@ if(!target) return - if(!istype(target, /mob/living)) //Safety. + if(!isliving(target)) //Safety. to_chat(src, span_warning("You need to select a living target!")) return @@ -1355,7 +1355,7 @@ /obj/item/projectile/beam/appendage/generate_hitscan_tracers() if(firer) //This neat little code block allows for C O L O R A B L E tongues! Correction: 'Appendages' - if(istype(firer,/mob/living)) + if(isliving(firer)) var/mob/living/originator = firer color = originator.appendage_color ..() @@ -1363,10 +1363,10 @@ /obj/item/projectile/beam/appendage/on_hit(var/atom/target) if(target == firer) //NO EATING YOURSELF return - if(istype(target, /mob/living)) + if(isliving(target)) var/mob/living/M = target var/throw_range = get_dist(firer,M) - if(istype(firer, /mob/living)) //Let's check for any alt settings. Such as: User selected to be thrown at target. + if(isliving(firer)) //Let's check for any alt settings. Such as: User selected to be thrown at target. var/mob/living/F = firer if(F.appendage_alt_setting == 1) F.throw_at(M, throw_range, firer.throw_speed, F) //Firer thrown at target. @@ -1381,7 +1381,7 @@ if(istype(target, /obj/item/)) //We hit an object? Pull it. This can only happen via admin shenanigans such as a gun being VV'd with this projectile. var/obj/item/hit_object = target if(hit_object.density || hit_object.anchored) - if(istype(firer, /mob/living)) + if(isliving(firer)) var/mob/living/originator = firer originator.Weaken(2) //If you hit something dense or anchored, fall flat on your face. originator.visible_message(span_warning("\The [originator] trips over their self and falls flat on their face!"), \ @@ -1391,7 +1391,7 @@ else hit_object.throw_at(firer, throw_range, hit_object.throw_speed, firer) if(istype(target, /turf/simulated/wall) || istype(target, /obj/machinery/door) || istype(target, /obj/structure/window)) //This can happen normally due to odd terrain. For some reason, it seems to not actually interact with walls. - if(istype(firer, /mob/living)) + if(isliving(firer)) var/mob/living/originator = firer originator.Weaken(2) //Hit a wall? Whoops! originator.visible_message(span_warning("\The [originator] trips over their self and falls flat on their face!"), \ @@ -1480,7 +1480,7 @@ last_special = world.time + 10 //Anti-spam. - if (!istype(src, /mob/living)) + if (!isliving(src)) to_chat(src, span_warning("It doesn't work that way.")) return @@ -1488,7 +1488,7 @@ var/list/targets = list() //IF IT IS NOT BROKEN. DO NOT FIX IT. for(var/mob/living/L in range(5, src)) - if(!istype(L, /mob/living)) //Don't eat anything that isn't mob/living. Failsafe. + if(!isliving(L)) //Don't eat anything that isn't mob/living. Failsafe. continue if(L == src) //no eating yourself. 1984. continue @@ -1504,7 +1504,7 @@ if(!target) return - if(!istype(target, /mob/living)) //Safety. + if(!isliving(target)) //Safety. to_chat(src, span_warning("You need to select a living target!")) return diff --git a/code/modules/mob/living/carbon/human/species/station/traits_vr/weaver_objs.dm b/code/modules/mob/living/carbon/human/species/station/traits_vr/weaver_objs.dm index c2ebc62293..f9012e092a 100644 --- a/code/modules/mob/living/carbon/human/species/station/traits_vr/weaver_objs.dm +++ b/code/modules/mob/living/carbon/human/species/station/traits_vr/weaver_objs.dm @@ -57,7 +57,7 @@ icon_state = pick(possible_icon_states) /obj/effect/weaversilk/wall/CanPass(atom/movable/mover, turf/target) - if(istype(mover, /mob/living/carbon/human)) + if(ishuman(mover)) var/mob/living/carbon/human/H = mover if(H.species.is_weaver) return TRUE @@ -94,7 +94,7 @@ /obj/effect/weaversilk/trap/Crossed(atom/movable/AM as mob|obj) if(AM.is_incorporeal()) return - if(istype(AM, /mob/living/carbon/human)) + if(ishuman(AM)) var/mob/living/carbon/human/H = AM if(H.species.is_weaver) return diff --git a/code/modules/mob/living/carbon/human/species/xenomorphs/alien_powers.dm b/code/modules/mob/living/carbon/human/species/xenomorphs/alien_powers.dm index 346259c449..2b6a51fc51 100644 --- a/code/modules/mob/living/carbon/human/species/xenomorphs/alien_powers.dm +++ b/code/modules/mob/living/carbon/human/species/xenomorphs/alien_powers.dm @@ -368,7 +368,7 @@ visible_message(span_warning(span_bold("\The [src]") + " rips viciously at \the [G.affecting]'s body with its claws!")) - if(istype(G.affecting,/mob/living/carbon/human)) + if(ishuman(G.affecting)) var/mob/living/carbon/human/H = G.affecting H.apply_damage(50,BRUTE) if(H.stat == 2) diff --git a/code/modules/mob/living/carbon/lick_wounds.dm b/code/modules/mob/living/carbon/lick_wounds.dm index 68dcae6789..e703d25b93 100644 --- a/code/modules/mob/living/carbon/lick_wounds.dm +++ b/code/modules/mob/living/carbon/lick_wounds.dm @@ -15,12 +15,11 @@ to_chat(src, span_warning("You need to be closer to do that.")) return - if ( ! (istype(src, /mob/living/carbon/human) || \ - istype(src, /mob/living/silicon)) ) + if ( ! (ishuman(src) || issilicon(src)) ) to_chat(src, span_warning("If you even have a tongue, it doesn't work that way.")) return - if (istype(M, /mob/living/carbon/human)) + if (ishuman(M)) var/mob/living/carbon/human/H = M var/obj/item/organ/external/affecting = H.get_organ(src.zone_sel.selecting) diff --git a/code/modules/mob/living/carbon/metroid/powers.dm b/code/modules/mob/living/carbon/metroid/powers.dm index 505b6861b8..afb44d3b71 100644 --- a/code/modules/mob/living/carbon/metroid/powers.dm +++ b/code/modules/mob/living/carbon/metroid/powers.dm @@ -21,7 +21,7 @@ return "I cannot feed on other slimes..." if (!Adjacent(M)) return "This subject is too far away..." - if (istype(M, /mob/living/carbon) && M.getCloneLoss() >= M.getMaxHealth() * 1.5 || istype(M, /mob/living/simple_mob) && M.stat == DEAD) + if (iscarbon(M) && M.getCloneLoss() >= M.getMaxHealth() * 1.5 || isanimal(M) && M.stat == DEAD) return "This subject does not have an edible life energy..." for(var/mob/living/carbon/slime/met in view()) if(met.Victim == M && met != src) @@ -48,7 +48,7 @@ if(Victim.health <= 0) Victim.adjustToxLoss(rand(2,4)) - else if(istype(M, /mob/living/simple_mob)) + else if(isanimal(M)) Victim.adjustBruteLoss(is_adult ? rand(7, 15) : rand(4, 12)) else diff --git a/code/modules/mob/living/carbon/shock.dm b/code/modules/mob/living/carbon/shock.dm index 2b8c94e302..af975e1f76 100644 --- a/code/modules/mob/living/carbon/shock.dm +++ b/code/modules/mob/living/carbon/shock.dm @@ -19,19 +19,19 @@ src.traumatic_shock -= 20 // broken or ripped off organs will add quite a bit of pain - if(istype(src,/mob/living/carbon/human)) + if(ishuman(src)) var/mob/living/carbon/human/M = src for(var/obj/item/organ/external/organ in M.organs) if(organ.is_broken() || organ.open) src.traumatic_shock += 30 else if(organ.is_dislocated()) src.traumatic_shock += 15 - + // Some individuals/species are more or less supectible to pain. Default trauma_mod = 1. Does not affect painkillers - if(istype(src, /mob/living/carbon/human)) + if(ishuman(src)) var/mob/living/carbon/human/H = src H.traumatic_shock *= H.species.trauma_mod - + src.traumatic_shock += -1 * src.chem_effects[CE_PAINKILLER] if(src.traumatic_shock < 0) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 1b53fc9565..a4f12412cb 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -151,7 +151,7 @@ //sort of a legacy burn method for /electrocute, /shock, and the e_chair /mob/living/proc/burn_skin(burn_amount) - if(istype(src, /mob/living/carbon/human)) + if(ishuman(src)) //to_world("DEBUG: burn_skin(), mutations=[mutations]") if(mShock in src.mutations) //shockproof return 0 @@ -166,7 +166,7 @@ H.UpdateDamageIcon() H.updatehealth() return 1 - else if(istype(src, /mob/living/silicon/ai)) + else if(isAI(src)) return 0 /mob/living/proc/adjustBodyTemp(actual, desired, incrementboost) @@ -185,7 +185,7 @@ temperature -= change if(actual < desired) temperature = desired -// if(istype(src, /mob/living/carbon/human)) +// if(ishuman(src)) // to_world("[src] ~ [src.bodytemperature] ~ [temperature]") return temperature diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index 50af49d19c..924adcbc5f 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -325,7 +325,7 @@ //VORESTATION EDIT START - Allows for thrown vore! //Throwing a prey into a pred takes priority. After that it checks to see if the person being thrown is a pred. - if(istype(AM, /mob/living)) + if(isliving(AM)) var/mob/living/thrown_mob = AM if(!allowmobvore && isanimal(thrown_mob)) //Does the person being hit not allow mob vore and the perrson being thrown a simple_mob? diff --git a/code/modules/mob/living/living_movement.dm b/code/modules/mob/living/living_movement.dm index a6ccc6c8ea..7313d1f75f 100644 --- a/code/modules/mob/living/living_movement.dm +++ b/code/modules/mob/living/living_movement.dm @@ -51,7 +51,7 @@ default behaviour is: if(now_pushing || !loc || buckled == AM) return now_pushing = 1 - if (istype(AM, /mob/living)) + if (isliving(AM)) var/mob/living/tmob = AM //Even if we don't push/swap places, we "touched" them, so spread fire @@ -152,7 +152,7 @@ default behaviour is: if(step_mechanics_pref && tmob.step_mechanics_pref) if(handle_micro_bump_other(tmob)) return // VOREStation Edit - End - if(istype(tmob, /mob/living/carbon/human) && (FAT in tmob.mutations)) + if(ishuman(tmob) && (FAT in tmob.mutations)) if(prob(40) && !(FAT in src.mutations)) to_chat(src, span_danger("You fail to push [tmob]'s fat ass out of the way.")) now_pushing = 0 diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index a484ca2af1..ba600401aa 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -475,7 +475,7 @@ var/list/ai_verbs_default = list( if (href_list["track"]) var/mob/target = locate(href_list["track"]) in mob_list - if(target && (!istype(target, /mob/living/carbon/human) || html_decode(href_list["trackname"]) == target:get_face_name())) + if(target && (!ishuman(target) || html_decode(href_list["trackname"]) == target:get_face_name())) ai_actual_track(target) else to_chat(src, span_filter_warning("[span_red("System error. Cannot locate [html_decode(href_list["trackname"])].")]")) @@ -960,7 +960,7 @@ var/list/ai_verbs_default = list( jobname = JOB_AI else if(isrobot(speaker)) jobname = JOB_CYBORG - else if(istype(speaker, /mob/living/silicon/pai)) + else if(ispAI(speaker)) jobname = "Personal AI" else jobname = "Unknown" @@ -973,7 +973,7 @@ var/list/ai_verbs_default = list( else // We couldn't find a mob with their fake name, don't track at all track = "[speaker_name] ([jobname])" else // Not faking their name - if(istype(speaker, /mob/living/bot)) // It's a bot, and no fake name! (That'd be kinda weird.) :p + if(isbot(speaker)) // It's a bot, and no fake name! (That'd be kinda weird.) :p track = "[speaker_name] ([jobname])" else // It's not a bot, and no fake name! track = "[speaker_name] ([jobname])" diff --git a/code/modules/mob/living/silicon/laws.dm b/code/modules/mob/living/silicon/laws.dm index 2e94f49ee1..bc23e1ea3a 100644 --- a/code/modules/mob/living/silicon/laws.dm +++ b/code/modules/mob/living/silicon/laws.dm @@ -15,7 +15,7 @@ laws_sanity_check() laws.set_zeroth_law(law, law_borg) if(notify) - notify_of_law_change(law||law_borg ? "NEW ZEROTH LAW: [istype(src, /mob/living/silicon/robot) && law_borg ? law_borg : law]" : null) + notify_of_law_change(law||law_borg ? "NEW ZEROTH LAW: [isrobot(src) && law_borg ? law_borg : law]" : null) log_and_message_admins("has given [src] the zeroth laws: [law]/[law_borg ? law_borg : "N/A"]") /mob/living/silicon/robot/set_zeroth_law(var/law, var/law_borg, notify = TRUE) diff --git a/code/modules/mob/living/silicon/pai/pai_vr.dm b/code/modules/mob/living/silicon/pai/pai_vr.dm index 3db2418ce2..67c4716218 100644 --- a/code/modules/mob/living/silicon/pai/pai_vr.dm +++ b/code/modules/mob/living/silicon/pai/pai_vr.dm @@ -530,7 +530,7 @@ else return to_chat(src, span_notice("Your message was relayed.")) for (var/mob/G in player_list) - if (istype(G, /mob/new_player)) + if (isnewplayer(G)) continue else if(isobserver(G) && G.client?.prefs?.read_preference(/datum/preference/toggle/ghost_ears)) if((client?.prefs?.read_preference(/datum/preference/toggle/whisubtle_vis) || G.client.holder) && \ diff --git a/code/modules/mob/living/silicon/pai/software_modules.dm b/code/modules/mob/living/silicon/pai/software_modules.dm index d52951a8cd..85cacbcc26 100644 --- a/code/modules/mob/living/silicon/pai/software_modules.dm +++ b/code/modules/mob/living/silicon/pai/software_modules.dm @@ -22,7 +22,7 @@ return GLOB.tgui_always_state /datum/pai_software/tgui_status(mob/user) - if(!istype(user, /mob/living/silicon/pai)) + if(!ispAI(user)) return STATUS_CLOSE return ..() @@ -61,7 +61,7 @@ var/count = 0 // Find the carrier - while(!istype(M, /mob/living)) + while(!isliving(M)) if(!M || !M.loc || count > 6) //For a runtime where M ends up in nullspace (similar to bluespace but less colourful) to_chat(src, span_infoplain("You are not being carried by anyone!")) diff --git a/code/modules/mob/living/silicon/robot/analyzer.dm b/code/modules/mob/living/silicon/robot/analyzer.dm index bb37cdbb28..b9fe2abd74 100644 --- a/code/modules/mob/living/silicon/robot/analyzer.dm +++ b/code/modules/mob/living/silicon/robot/analyzer.dm @@ -38,9 +38,9 @@ return var/scan_type - if(istype(M, /mob/living/silicon/robot)) + if(isrobot(M)) scan_type = "robot" - else if(istype(M, /mob/living/carbon/human)) + else if(ishuman(M)) scan_type = "prosthetics" else if(istype(M, /obj/mecha)) scan_type = "mecha" diff --git a/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm b/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm index 91f4c79b5e..573d01ce38 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm @@ -64,7 +64,7 @@ /obj/machinery/drone_fabricator/examine(mob/user) . = ..() - if(produce_drones && drone_progress >= 100 && istype(user,/mob/observer/dead) && CONFIG_GET(flag/allow_drone_spawn) && count_drones() < CONFIG_GET(number/max_maint_drones)) + if(produce_drones && drone_progress >= 100 && isobserver(user) && CONFIG_GET(flag/allow_drone_spawn) && count_drones() < CONFIG_GET(number/max_maint_drones)) . += "
A drone is prepared. Select 'Join As Drone' from the Ghost tab to spawn as a maintenance drone." /obj/machinery/drone_fabricator/proc/create_drone(var/client/player) @@ -75,7 +75,7 @@ if(!produce_drones || !CONFIG_GET(flag/allow_drone_spawn) || count_drones() >= CONFIG_GET(number/max_maint_drones)) return - if(player && !istype(player.mob,/mob/observer/dead)) + if(player && !isobserver(player.mob)) return visible_message("\The [src] churns and grinds as it lurches into motion, disgorging a shiny new drone after a few moments.") diff --git a/code/modules/mob/living/silicon/robot/drone/drone_say.dm b/code/modules/mob/living/silicon/robot/drone/drone_say.dm index 1accbf719f..c16ea267ac 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone_say.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone_say.dm @@ -30,7 +30,7 @@ to_chat(D, span_say(span_bold("[src]") + "transmits, \"[message]\"")) for (var/mob/M in player_list) - if (istype(M, /mob/new_player)) + if (isnewplayer(M)) continue else if(M.stat == DEAD && M.client?.prefs?.read_preference(/datum/preference/toggle/ghost_ears)) if(M.client) diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index a65e36aef5..2402f3c2d6 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -832,7 +832,7 @@ to_chat(user, span_filter_notice("You remove \the [broken_device].")) user.put_in_active_hand(broken_device) - if(istype(user,/mob/living/carbon/human) && !opened) + if(ishuman(user) && !opened) var/mob/living/carbon/human/H = user //Adding borg petting. Help intent pets if preferences allow, Disarm intent taps and Harm is punching(no damage) switch(H.a_intent) @@ -886,12 +886,12 @@ //check if it doesn't require any access at all if(check_access(null)) return 1 - if(istype(M, /mob/living/carbon/human)) + if(ishuman(M)) var/mob/living/carbon/human/H = M //if they are holding or wearing a card that has access, that works if(check_access(H.get_active_hand()) || check_access(H.wear_id)) return 1 - else if(istype(M, /mob/living/silicon/robot)) + else if(isrobot(M)) var/mob/living/silicon/robot/R = M if(check_access(R.get_active_hand()) || istype(R.get_active_hand(), /obj/item/card/robot)) return TRUE diff --git a/code/modules/mob/living/silicon/robot/robot_bellies.dm b/code/modules/mob/living/silicon/robot/robot_bellies.dm index 4f39cb2d6b..01ca34d867 100644 --- a/code/modules/mob/living/silicon/robot/robot_bellies.dm +++ b/code/modules/mob/living/silicon/robot/robot_bellies.dm @@ -31,6 +31,6 @@ if(B.digest_mode != DM_DIGEST || B.belly_sprite_to_affect != b_class || !B.contents.len) continue for(var/contents in B.contents) - if(istype(contents, /mob/living)) + if(isliving(contents)) vore_light_states[b_class] = 1 return diff --git a/code/modules/mob/living/silicon/robot/robot_movement.dm b/code/modules/mob/living/silicon/robot/robot_movement.dm index 252d23fe93..f826c37f87 100644 --- a/code/modules/mob/living/silicon/robot/robot_movement.dm +++ b/code/modules/mob/living/silicon/robot/robot_movement.dm @@ -80,7 +80,7 @@ else if(istype(A, /obj/item)) var/obj/item/cleaned_item = A cleaned_item.clean_blood() - else if(istype(A, /mob/living/carbon/human)) + else if(ishuman(A)) var/mob/living/carbon/human/cleaned_human = A if(cleaned_human.lying) if(cleaned_human.head) diff --git a/code/modules/mob/living/simple_mob/defense.dm b/code/modules/mob/living/simple_mob/defense.dm index c8ebebd162..c974608d04 100644 --- a/code/modules/mob/living/simple_mob/defense.dm +++ b/code/modules/mob/living/simple_mob/defense.dm @@ -45,7 +45,7 @@ if(I_HURT) var/armor = run_armor_check(def_zone = null, attack_flag = "melee") - if(istype(L,/mob/living/carbon/human)) //VOREStation EDIT START Is it a human? + if(ishuman(L)) //VOREStation EDIT START Is it a human? var/mob/living/carbon/human/attacker = L //We are a human! var/datum/unarmed_attack/attack = attacker.get_unarmed_attack(src, BP_TORSO) //What attack are we using? Also, just default to attacking the chest. var/rand_damage = rand(1, 5) //Like normal human attacks, let's randomize the damage... diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/alien animals/spacewhale.dm b/code/modules/mob/living/simple_mob/subtypes/animal/alien animals/spacewhale.dm index 06c05379f3..72ff39344e 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/alien animals/spacewhale.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/alien animals/spacewhale.dm @@ -155,7 +155,7 @@ /mob/living/simple_mob/vore/overmap/spacewhale/apply_melee_effects(var/atom/A) . = ..() - if(istype(A, /mob/living)) + if(isliving(A)) var/mob/living/L = A if(L.stat == DEAD && !L.allowmobvore) L.gib() diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/borer/borer.dm b/code/modules/mob/living/simple_mob/subtypes/animal/borer/borer.dm index d263936fc8..6848a43939 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/borer/borer.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/borer/borer.dm @@ -107,7 +107,7 @@ if(!host || !controlling) return - if(istype(host, /mob/living/carbon/human)) + if(ishuman(host)) var/mob/living/carbon/human/H = host var/obj/item/organ/external/head = H.get_organ(BP_HEAD) if(head) @@ -169,7 +169,7 @@ reset_view(null) machine = null - if(istype(host, /mob/living/carbon/human)) + if(ishuman(host)) var/mob/living/carbon/human/H = host var/obj/item/organ/external/head = H.get_organ(BP_HEAD) if(head) @@ -258,7 +258,7 @@ to_chat(host, "Your own thoughts speak: \"[message]\"") for(var/mob/M in player_list) - if(istype(M, /mob/new_player)) + if(isnewplayer(M)) continue else if(M.stat == DEAD && M.client?.prefs?.read_preference(/datum/preference/toggle/ghost_ears)) to_chat(M, "[src.true_name] whispers to [host], \"[message]\"") diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/borer/borer_captive.dm b/code/modules/mob/living/simple_mob/subtypes/animal/borer/borer_captive.dm index 208a52ac37..f4c0ddfaf8 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/borer/borer_captive.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/borer/borer_captive.dm @@ -26,7 +26,7 @@ to_chat(B.host, "The captive mind of [src] whispers, \"[message]\"") for (var/mob/M in player_list) - if (istype(M, /mob/new_player)) + if (isnewplayer(M)) continue else if(M.stat == DEAD && M.client?.prefs?.read_preference(/datum/preference/toggle/ghost_ears)) to_chat(M, "The captive mind of [src] whispers, \"[message]\"") diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/borer/borer_powers.dm b/code/modules/mob/living/simple_mob/subtypes/animal/borer/borer_powers.dm index 345b20aa47..9130889ada 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/borer/borer_powers.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/borer/borer_powers.dm @@ -70,7 +70,7 @@ to_chat(src, span_warning("You cannot infest someone who is already infested!")) return - if(istype(M,/mob/living/carbon/human)) + if(ishuman(M)) var/mob/living/carbon/human/H = M var/obj/item/organ/external/E = H.organs_by_name[BP_HEAD] @@ -110,7 +110,7 @@ if(host.mind) borers.add_antagonist_mind(host.mind, 1, borers.faction_role_text, borers.faction_welcome) - if(istype(M,/mob/living/carbon/human)) + if(ishuman(M)) var/mob/living/carbon/human/H = M var/obj/item/organ/I = H.internal_organs_by_name["brain"] if(!I) // No brain organ, so the borer moves in and replaces it permanently. diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/passive/mouse_vr.dm b/code/modules/mob/living/simple_mob/subtypes/animal/passive/mouse_vr.dm index 09645dc646..e772105fc7 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/passive/mouse_vr.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/passive/mouse_vr.dm @@ -22,7 +22,7 @@ /mob/living/simple_mob/animal/passive/mouse/attack_hand(var/atom/over_object) var/mob/living/carbon/human/H = over_object if(holder_type && issmall(src) && istype(H) && !H.lying && Adjacent(H) && (src.a_intent == I_HELP && H.a_intent == I_HELP)) - if(!issmall(H) || !istype(src, /mob/living/carbon/human)) + if(!issmall(H) || !ishuman(src)) get_scooped(H, (usr == src)) return return ..() diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/sif/frostfly.dm b/code/modules/mob/living/simple_mob/subtypes/animal/sif/frostfly.dm index 9e9f4782d6..ddeddffda8 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/sif/frostfly.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/sif/frostfly.dm @@ -155,7 +155,7 @@ /datum/ai_holder/simple_mob/ranged/kiting/threatening/frostfly/post_ranged_attack(atom/A) var/mob/living/simple_mob/animal/sif/frostfly/F = holder - if(istype(A,/mob/living)) + if(isliving(A)) var/new_dir = turn(F.dir, -90) if(prob(50)) new_dir = turn(F.dir, 90) diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/sif/kururak.dm b/code/modules/mob/living/simple_mob/subtypes/animal/sif/kururak.dm index b5ead80914..f331de379b 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/sif/kururak.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/sif/kururak.dm @@ -113,7 +113,7 @@ var/obj/item/I = H.get_active_hand() if(I.force <= 1.25 * melee_damage_upper) return TRUE - else if(istype(L, /mob/living/simple_mob)) + else if(isanimal(L)) var/mob/living/simple_mob/S = L if(S.melee_damage_upper > 1.5 * melee_damage_upper) return TRUE diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/sif/leech.dm b/code/modules/mob/living/simple_mob/subtypes/animal/sif/leech.dm index 420b7a1aa1..fc94c6f54f 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/sif/leech.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/sif/leech.dm @@ -266,7 +266,7 @@ to_chat(user, "\The [M] cannot be infested.") return - if(istype(M,/mob/living/carbon/human)) + if(ishuman(M)) var/mob/living/carbon/human/H = M var/obj/item/organ/external/E = H.organs_by_name[infest_target] @@ -301,7 +301,7 @@ ai_holder.hostile = FALSE ai_holder.lose_target() - if(istype(M,/mob/living/carbon/human)) + if(ishuman(M)) var/mob/living/carbon/human/H = M host_bodypart = H.get_organ(infest_target) host_bodypart.implants |= src diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/sif/racoon.dm b/code/modules/mob/living/simple_mob/subtypes/animal/sif/racoon.dm index ad9f962330..7b0218ce95 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/sif/racoon.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/sif/racoon.dm @@ -214,7 +214,7 @@ var/obj/item/I = A I.attack_hand(holder) lose_target() - if(istype(A,/mob/living) && holder.Adjacent(A)) // Not the dumbest tool in the shed. If we're fighting, we're gonna dance around them. + if(isliving(A) && holder.Adjacent(A)) // Not the dumbest tool in the shed. If we're fighting, we're gonna dance around them. holder.IMove(get_step(holder, pick(alldirs))) holder.face_atom(A) request_help() // And we're going to call friends, too. @@ -258,7 +258,7 @@ for(var/possible_target in possible_targets) var/atom/A = possible_target - if(istype(A, /mob/living) && !can_pick_mobs) + if(isliving(A) && !can_pick_mobs) continue if(can_attack(A)) // Can we attack it? . += A diff --git a/code/modules/mob/living/simple_mob/subtypes/glamour/ddraig.dm b/code/modules/mob/living/simple_mob/subtypes/glamour/ddraig.dm index 2fdd74aa02..e682550ad8 100644 --- a/code/modules/mob/living/simple_mob/subtypes/glamour/ddraig.dm +++ b/code/modules/mob/living/simple_mob/subtypes/glamour/ddraig.dm @@ -339,7 +339,7 @@ for(var/mob/living/possible_target in possible_targets) if(!can_attack(possible_target)) continue - if(istype(target,/mob/living/simple_mob) && !check_attacker(target)) //Do not target simple mobs who didn't attack you (disengage with TF'd mobs) + if(isanimal(target) && !check_attacker(target)) //Do not target simple mobs who didn't attack you (disengage with TF'd mobs) continue . |= possible_target if(!isliving(possible_target)) @@ -375,7 +375,7 @@ spawn(60 SECONDS) holder.uncloak() - if(istype(target,/mob/living/simple_mob) && !check_attacker(target)) //Immediately disengage with TF'd mobs so you don't one shot the poor guy you turned into a mouse. + if(isanimal(target) && !check_attacker(target)) //Immediately disengage with TF'd mobs so you don't one shot the poor guy you turned into a mouse. lose_target() // Can we still see them? diff --git a/code/modules/mob/living/simple_mob/subtypes/slime/xenobio/consumption.dm b/code/modules/mob/living/simple_mob/subtypes/slime/xenobio/consumption.dm index b52b89ce65..6aa44b5c3f 100644 --- a/code/modules/mob/living/simple_mob/subtypes/slime/xenobio/consumption.dm +++ b/code/modules/mob/living/simple_mob/subtypes/slime/xenobio/consumption.dm @@ -136,7 +136,7 @@ to_chat(src, "This subject does not have an edible life energy...") return FALSE //VOREStation Addition start - if(istype(L, /mob/living/carbon/human)) + if(ishuman(L)) var/mob/living/carbon/human/H = L if(H.species.flags & NO_SCAN) to_chat(src, "This subject's life energy is beyond my reach...") diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/bigdragon.dm b/code/modules/mob/living/simple_mob/subtypes/vore/bigdragon.dm index e8b2b359f5..c638283a6d 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/bigdragon.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/bigdragon.dm @@ -922,7 +922,7 @@ I think I covered everything. var/last_warning /datum/ai_holder/simple_mob/healbelly/proc/confirmPatient(var/mob/living/P) - if(istype(holder,/mob/living/simple_mob)) + if(isanimal(holder)) var/mob/living/simple_mob/H = holder if(H.will_eat(P)) if(issilicon(P)) @@ -1002,7 +1002,7 @@ I think I covered everything. //The following is some reagent injections to cover our bases, since being swallowed and dying from internal injuries sucks //If this ends up being op because medbay gets replaced by a voremob buckled to a chair, feel free to remove some. //Alternatively bully a coder (me) to make a unique digest_mode for mob healbellies that prevents death, or something. - if(istype(A, /mob/living/carbon/human)) + if(ishuman(A)) var/mob/living/carbon/human/P = L var/list/to_inject = list(REAGENT_ID_MYELAMINE,REAGENT_ID_OSTEODAXON,REAGENT_ID_SPACEACILLIN,REAGENT_ID_PERIDAXON, REAGENT_ID_IRON, REAGENT_ID_HYRONALIN) //Lets not OD them... diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/pakkun.dm b/code/modules/mob/living/simple_mob/subtypes/vore/pakkun.dm index d64d84e250..6f270f8020 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/pakkun.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/pakkun.dm @@ -123,7 +123,7 @@ if(abs(holder.x - L.x)>6 || abs(holder.y - L.y)>6) //finally, pakkuns on the very very edge of the screen won't target you our_targets -= list_target continue - if(istype(holder, /mob/living/simple_mob)) + if(isanimal(holder)) var/mob/living/simple_mob/SM = holder our_targets -= SM.prey_excludes // Lazylist, but subtracting a null from the list seems fine. return our_targets @@ -134,7 +134,7 @@ var/mob/living/L = the_target if(!(L.can_be_drop_prey && L.throw_vore && L.allowmobvore)) return FALSE - if(istype(holder, /mob/living/simple_mob)) + if(isanimal(holder)) var/mob/living/simple_mob/SM = holder if(LAZYFIND(SM.prey_excludes, L)) return FALSE diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/shadekin/shadekin.dm b/code/modules/mob/living/simple_mob/subtypes/vore/shadekin/shadekin.dm index 939ed97965..9fd9362916 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/shadekin/shadekin.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/shadekin/shadekin.dm @@ -210,7 +210,7 @@ check_timer = 0 var/non_kin_count = 0 for(var/mob/living/M in view(6,src)) - if(!istype(M, /mob/living/simple_mob/shadekin)) + if(!issimplekin(M)) non_kin_count ++ // Technically can be combined with ||, they call the same function, but readability is poor if(!non_kin_count && (ability_flags & AB_PHASE_SHIFTED)) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 7d304fd678..5322e94367 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -479,7 +479,7 @@ if(client.holder && (client.holder.rights & R_ADMIN|R_EVENT)) is_admin = 1 - else if(stat != DEAD || istype(src, /mob/new_player)) + else if(stat != DEAD || isnewplayer(src)) to_chat(usr, span_filter_notice("[span_blue("You must be observing to use this!")]")) return diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index fa39e3d4d5..4740f5edb4 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -1,12 +1,12 @@ // fun if you want to typecast humans/monkeys/etc without writing long path-filled lines. /proc/isxenomorph(A) - if(istype(A, /mob/living/carbon/human)) + if(ishuman(A)) var/mob/living/carbon/human/H = A return istype(H.species, /datum/species/xenos) return 0 /proc/issmall(A) - if(A && istype(A, /mob/living)) + if(A && isliving(A)) var/mob/living/L = A return L.mob_size <= MOB_SMALL return 0 @@ -21,14 +21,14 @@ return TRUE /proc/istiny(A) - if(A && istype(A, /mob/living)) + if(A && isliving(A)) var/mob/living/L = A return L.mob_size <= MOB_TINY return 0 /proc/ismini(A) - if(A && istype(A, /mob/living)) + if(A && isliving(A)) var/mob/living/L = A return L.mob_size <= MOB_MINISCULE return 0 @@ -409,7 +409,7 @@ var/list/intents = list(I_HELP,I_DISARM,I_GRAB,I_HURT) return // Can't talk in deadchat if you can't see it. for(var/mob/M in player_list) - if(M.client && ((!istype(M, /mob/new_player) && M.stat == DEAD) || (M.client.holder && M.client.holder.rights && M.client?.prefs?.read_preference(/datum/preference/toggle/holder/show_staff_dsay))) && M.client?.prefs?.read_preference(/datum/preference/toggle/show_dsay)) + if(M.client && ((!isnewplayer(M) && M.stat == DEAD) || (M.client.holder && M.client.holder.rights && M.client?.prefs?.read_preference(/datum/preference/toggle/holder/show_staff_dsay))) && M.client?.prefs?.read_preference(/datum/preference/toggle/show_dsay)) var/follow var/lname if(M.forbid_seeing_deadchat && !M.client.holder) @@ -423,7 +423,7 @@ var/list/intents = list(I_HELP,I_DISARM,I_GRAB,I_HURT) if(M.stat != DEAD && M.client.holder) follow = "([admin_jump_link(subject, M.client.holder)]) " var/mob/observer/dead/DM - if(istype(subject, /mob/observer/dead)) + if(isobserver(subject)) DM = subject if(M.client.holder) // What admins see lname = "[keyname][(DM && DM.anonsay) ? "*" : (DM ? "" : "^")] ([name])" @@ -439,7 +439,7 @@ var/list/intents = list(I_HELP,I_DISARM,I_GRAB,I_HURT) /proc/say_dead_object(var/message, var/obj/subject = null) for(var/mob/M in player_list) - if(M.client && ((!istype(M, /mob/new_player) && M.stat == DEAD) || (M.client.holder && M.client.holder.rights && M.client?.prefs?.read_preference(/datum/preference/toggle/holder/show_staff_dsay))) && M.client?.prefs?.read_preference(/datum/preference/toggle/show_dsay)) + if(M.client && ((!isnewplayer(M) && M.stat == DEAD) || (M.client.holder && M.client.holder.rights && M.client?.prefs?.read_preference(/datum/preference/toggle/holder/show_staff_dsay))) && M.client?.prefs?.read_preference(/datum/preference/toggle/show_dsay)) var/follow var/lname = "Game Master" if(M.forbid_seeing_deadchat && !M.client.holder) diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm index 3140461c47..f2f3d285fd 100644 --- a/code/modules/mob/mob_movement.dm +++ b/code/modules/mob/mob_movement.dm @@ -72,7 +72,7 @@ /client/verb/swap_hand() set hidden = 1 - if(istype(mob, /mob/living)) + if(isliving(mob)) var/mob/living/L = mob L.swap_hand() if(istype(mob,/mob/living/silicon/robot)) diff --git a/code/modules/mob/mob_transformation_simple.dm b/code/modules/mob/mob_transformation_simple.dm index 59fd730309..31940d4b09 100644 --- a/code/modules/mob/mob_transformation_simple.dm +++ b/code/modules/mob/mob_transformation_simple.dm @@ -4,7 +4,7 @@ //Note that this proc does NOT do MMI related stuff! /mob/proc/change_mob_type(var/new_type = null, var/turf/location = null, var/new_name = null as text, var/delete_old_mob = 0 as num, var/subspecies) - if(istype(src,/mob/new_player)) + if(isnewplayer(src)) to_chat(usr, span_red("cannot convert players who have not entered yet.")) return @@ -48,7 +48,7 @@ else M.key = key - if(subspecies && istype(M,/mob/living/carbon/human)) + if(subspecies && ishuman(M)) var/mob/living/carbon/human/H = M H.set_species(subspecies) diff --git a/code/modules/mob/say_vr.dm b/code/modules/mob/say_vr.dm index 08014a8290..e089ab5135 100644 --- a/code/modules/mob/say_vr.dm +++ b/code/modules/mob/say_vr.dm @@ -335,7 +335,7 @@ if(M.read_preference(/datum/preference/toggle/subtle_sounds)) M << sound('sound/talksounds/subtle_sound.ogg', volume = 50) for (var/mob/G in player_list) - if (istype(G, /mob/new_player)) + if (isnewplayer(G)) continue else if(isobserver(G) && G.client?.prefs?.read_preference(/datum/preference/toggle/ghost_ears) && \ G.client?.prefs?.read_preference(/datum/preference/toggle/ghost_see_whisubtle)) @@ -432,7 +432,7 @@ if(M.read_preference(/datum/preference/toggle/subtle_sounds)) M << sound('sound/talksounds/subtle_sound.ogg', volume = 50) for (var/mob/G in player_list) - if (istype(G, /mob/new_player)) + if (isnewplayer(G)) continue else if(isobserver(G) && G.client?.prefs?.read_preference(/datum/preference/toggle/ghost_ears) && \ G.client?.prefs?.read_preference(/datum/preference/toggle/ghost_see_whisubtle)) diff --git a/code/modules/modular_computers/computers/modular_computer/interaction.dm b/code/modules/modular_computers/computers/modular_computer/interaction.dm index 27f280668f..2a6e95c991 100644 --- a/code/modules/modular_computers/computers/modular_computer/interaction.dm +++ b/code/modules/modular_computers/computers/modular_computer/interaction.dm @@ -12,7 +12,7 @@ set category = "Object" set src in view(1) - if(usr.incapacitated() || !istype(usr, /mob/living)) + if(usr.incapacitated() || !isliving(usr)) to_chat(usr, span_warning("You can't do that.")) return @@ -36,7 +36,7 @@ set category = "Object" set src in view(1) - if(usr.incapacitated() || !istype(usr, /mob/living)) + if(usr.incapacitated() || !isliving(usr)) to_chat(usr, span_warning("You can't do that.")) return @@ -52,7 +52,7 @@ set category = "Object" set src in view(1) - if(usr.incapacitated() || !istype(usr, /mob/living)) + if(usr.incapacitated() || !isliving(usr)) to_chat(usr, span_warning("You can't do that.")) return diff --git a/code/modules/modular_computers/file_system/program.dm b/code/modules/modular_computers/file_system/program.dm index 045ac9fbcf..9d0edc3991 100644 --- a/code/modules/modular_computers/file_system/program.dm +++ b/code/modules/modular_computers/file_system/program.dm @@ -109,7 +109,7 @@ return 1 // Admin override - allows operation of any computer as aghosted admin, as if you had any required access. - if(istype(user, /mob/observer/dead) && check_rights(R_ADMIN|R_EVENT, 0, user)) + if(isobserver(user) && check_rights(R_ADMIN|R_EVENT, 0, user)) return 1 if(!istype(user)) diff --git a/code/modules/multiz/ladders.dm b/code/modules/multiz/ladders.dm index 7822a87d80..fd6066bc33 100644 --- a/code/modules/multiz/ladders.dm +++ b/code/modules/multiz/ladders.dm @@ -108,7 +108,7 @@ target_ladder.audible_message(span_notice("You hear something coming [direction] \the [src]"), runemessage = "clank clank") var/climb_modifier = 1 - if(istype(M, /mob/living/carbon/human)) + if(ishuman(M)) var/mob/living/carbon/human/MS = M climb_modifier = MS.species.climb_mult diff --git a/code/modules/multiz/movement.dm b/code/modules/multiz/movement.dm index d75ca96c44..0d5e6c05e9 100644 --- a/code/modules/multiz/movement.dm +++ b/code/modules/multiz/movement.dm @@ -21,7 +21,7 @@ var/swim_modifier = 1 var/climb_modifier = 1 - if(istype(src,/mob/living/carbon/human)) + if(ishuman(src)) var/mob/living/carbon/human/MS = src swim_modifier = MS.species.swim_mult climb_modifier = MS.species.climb_mult @@ -538,7 +538,7 @@ /mob/living/fall_impact(var/atom/hit_atom, var/damage_min = 0, var/damage_max = 5, var/silent = FALSE, var/planetary = FALSE) var/turf/landing = get_turf(hit_atom) var/safe_fall = FALSE - if(src.softfall || (istype(src, /mob/living/simple_mob) && src.mob_size <= MOB_SMALL)) + if(src.softfall || (isanimal(src) && src.mob_size <= MOB_SMALL)) safe_fall = TRUE if(planetary && src.CanParachute()) if(!silent) diff --git a/code/modules/multiz/movement_vr.dm b/code/modules/multiz/movement_vr.dm index ca467e0a14..aab026ed68 100644 --- a/code/modules/multiz/movement_vr.dm +++ b/code/modules/multiz/movement_vr.dm @@ -33,10 +33,10 @@ var/mob/living/pred = hit_atom var/safe_fall = FALSE - if(pred.softfall || (istype(pred, /mob/living/simple_mob) && pred.mob_size <= MOB_SMALL)) // TODO: add ability for mob below to be 'soft' and cushion fall + if(pred.softfall || (isanimal(pred) && pred.mob_size <= MOB_SMALL)) // TODO: add ability for mob below to be 'soft' and cushion fall safe_fall = TRUE - if(istype(pred, /mob/living/carbon/human)) + if(ishuman(pred)) var/mob/living/carbon/human/H = pred if(H.species.soft_landing) safe_fall = TRUE @@ -89,7 +89,7 @@ set category = "Object" set src in oview(1) - if(!istype(usr, /mob/living)) return //Why would ghosts want to climb? + if(!isliving(usr)) return //Why would ghosts want to climb? var/mob/living/L = usr var/climbing_delay_min = L.climbing_delay var/fall_chance = 0 diff --git a/code/modules/multiz/portals_vr.dm b/code/modules/multiz/portals_vr.dm index 4e097f1faf..2206a1af3d 100644 --- a/code/modules/multiz/portals_vr.dm +++ b/code/modules/multiz/portals_vr.dm @@ -16,7 +16,7 @@ return ..() /obj/structure/portal_event/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) @@ -24,7 +24,7 @@ return /obj/structure/portal_event/Crossed(AM as mob|obj) - 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) @@ -39,7 +39,7 @@ to_chat(user, span_notice("Your hand scatters \the [src]...")) qdel(src) //Delete portals which aren't set that people mess with. else return //do not send ghosts, zshadows, ai eyes, etc - else if(isliving(user) || istype(user, /mob/observer/dead) && user?.client?.holder) //unless they're staff + else if(isliving(user) || isobserver(user) && user?.client?.holder) //unless they're staff spawn(0) src.teleport(user) @@ -177,14 +177,14 @@ anchored = TRUE /obj/structure/portal_gateway/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 var/obj/effect/landmark/dest = pick(eventdestinations) if(dest) M << 'sound/effects/phasein.ogg' playsound(src, 'sound/effects/phasein.ogg', 100, 1) M.forceMove(dest.loc) - if(istype(M, /mob/living) && dest.abductor) + if(isliving(M) && dest.abductor) var/mob/living/L = M //Situations to get the mob out of if(L.buckled) diff --git a/code/modules/organs/blood.dm b/code/modules/organs/blood.dm index ac28193cc9..6cb13c0190 100644 --- a/code/modules/organs/blood.dm +++ b/code/modules/organs/blood.dm @@ -263,7 +263,7 @@ var/const/CE_STABLE_THRESHOLD = 0.5 B.data["blood_type"] = copytext(src.dna.b_type,1,0) // Putting this here due to return shenanigans. - if(istype(src,/mob/living/carbon/human)) + if(ishuman(src)) var/mob/living/carbon/human/H = src B.data["blood_colour"] = H.species.get_blood_colour(H) B.color = B.data["blood_colour"] @@ -393,7 +393,7 @@ var/const/CE_STABLE_THRESHOLD = 0.5 var/turf/T = get_turf(target) var/synth = 0 - if(istype(source,/mob/living/carbon/human)) + if(ishuman(source)) var/mob/living/carbon/human/M = source if(M.isSynthetic()) synth = 1 source = M.get_blood(M.vessel) diff --git a/code/modules/organs/internal/augment/armmounted.dm b/code/modules/organs/internal/augment/armmounted.dm index 3845de1072..ed480b4dac 100644 --- a/code/modules/organs/internal/augment/armmounted.dm +++ b/code/modules/organs/internal/augment/armmounted.dm @@ -144,7 +144,7 @@ else return - if(istype(owner, /mob/living/carbon/human)) + if(ishuman(owner)) var/mob/living/carbon/human/H = owner H.add_modifier(/datum/modifier/melee_surge, 0.75 MINUTES) diff --git a/code/modules/organs/internal/augment/bio.dm b/code/modules/organs/internal/augment/bio.dm index 94ea574717..f69d9e8c6b 100644 --- a/code/modules/organs/internal/augment/bio.dm +++ b/code/modules/organs/internal/augment/bio.dm @@ -98,6 +98,6 @@ else return - if(istype(owner, /mob/living/carbon/human)) + if(ishuman(owner)) var/mob/living/carbon/human/H = owner H.add_modifier(/datum/modifier/sprinting, 1 MINUTES) diff --git a/code/modules/organs/internal/stomach.dm b/code/modules/organs/internal/stomach.dm index 6dc7e6d506..4d1f6c67b5 100644 --- a/code/modules/organs/internal/stomach.dm +++ b/code/modules/organs/internal/stomach.dm @@ -19,7 +19,7 @@ create_reagents(30) /obj/item/organ/internal/stomach/handle_organ_proc_special() - if(owner && istype(owner, /mob/living/carbon/human)) + if(owner && ishuman(owner)) if(reagents) if(reagents.total_volume + 2 < max_acid_volume && prob(20)) reagents.add_reagent(acidtype, rand(1,2)) diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index 40f0dd3af7..0505d8d561 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -168,7 +168,7 @@ /obj/item/organ/external/examine() . = ..() - if(in_range(usr, src) || istype(usr, /mob/observer/dead)) + if(in_range(usr, src) || isobserver(usr)) for(var/obj/item/I in contents) if(istype(I, /obj/item/organ)) continue @@ -850,7 +850,7 @@ Note that amputating the affected organ does in fact remove the infection from t var/clamped = 0 var/mob/living/carbon/human/H - if(istype(owner,/mob/living/carbon/human)) + if(ishuman(owner)) H = owner //update damage counts diff --git a/code/modules/organs/pain.dm b/code/modules/organs/pain.dm index 468c8c1a3a..225474bad3 100644 --- a/code/modules/organs/pain.dm +++ b/code/modules/organs/pain.dm @@ -64,7 +64,7 @@ if(dam > maxdam && (maxdam == 0 || prob(70)) ) damaged_organ = E maxdam = dam - if(istype(src, /mob/living/carbon/human)) //VOREStation Edit Start + if(ishuman(src)) //VOREStation Edit Start var/mob/living/carbon/human/H = src maxdam *= H.species.trauma_mod //VOREStation edit end if(damaged_organ && chem_effects[CE_PAINKILLER] < maxdam) diff --git a/code/modules/overmap/spacetravel.dm b/code/modules/overmap/spacetravel.dm index 3ac1f9ad3c..664c37141e 100644 --- a/code/modules/overmap/spacetravel.dm +++ b/code/modules/overmap/spacetravel.dm @@ -102,7 +102,7 @@ return // Don't let AI eyes yeet themselves off the map - if(istype(A, /mob/observer/eye)) + if(isobserver(A)) return if(A.lost_in_space()) diff --git a/code/modules/paperwork/clipboard.dm b/code/modules/paperwork/clipboard.dm index 68b22b2927..ec0af6a64b 100644 --- a/code/modules/paperwork/clipboard.dm +++ b/code/modules/paperwork/clipboard.dm @@ -155,7 +155,7 @@ if(P && (P.loc == src) && istype(P, /obj/item/paper) ) - if(!(istype(usr, /mob/living/carbon/human) || istype(usr, /mob/observer/dead) || istype(usr, /mob/living/silicon))) + if(!(ishuman(usr) || isobserver(usr) || issilicon(usr))) usr << browse("[P.name][stars(P.info)][P.stamps]", "window=[P.name]") onclose(usr, "[P.name]") else diff --git a/code/modules/paperwork/folders.dm b/code/modules/paperwork/folders.dm index a7067ff75d..6da4f304a3 100644 --- a/code/modules/paperwork/folders.dm +++ b/code/modules/paperwork/folders.dm @@ -111,7 +111,7 @@ else if(href_list["read"]) var/obj/item/paper/P = locate(href_list["read"]) if(P && (P.loc == src) && istype(P)) - if(!(istype(usr, /mob/living/carbon/human) || istype(usr, /mob/observer/dead) || istype(usr, /mob/living/silicon))) + if(!(ishuman(usr) || isobserver(usr) || issilicon(usr))) usr << browse("[P.name][stars(P.info)][P.stamps]", "window=[P.name]") onclose(usr, "[P.name]") else diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index f07cdd1719..5fdf1213d4 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -159,13 +159,13 @@ /obj/item/paper/examine(mob/user) . = ..() - if(in_range(user, src) || istype(user, /mob/observer/dead)) + if(in_range(user, src) || isobserver(user)) show_content(usr) else . += span_notice("You have to go closer if you want to read it.") /obj/item/paper/proc/show_content(var/mob/user, var/forceshow=0) - if(!(forceshow || (istype(user, /mob/living/carbon/human) || istype(user, /mob/observer/dead) || istype(user, /mob/living/silicon) || (istype(user) && user.universal_understand)))) + if(!(forceshow || (ishuman(user) || isobserver(user) || issilicon(user) || (istype(user) && user.universal_understand)))) user << browse("[name][stars(info)][stamps]", "window=[name]") onclose(user, "[name]") else @@ -554,7 +554,7 @@ else if (P.name != initial(P.name)) B.name = P.name user.drop_from_inventory(P) - if (istype(user, /mob/living/carbon/human)) + if (ishuman(user)) var/mob/living/carbon/human/h_user = user if (h_user.r_hand == src) h_user.drop_from_inventory(src) diff --git a/code/modules/paperwork/paper_bundle.dm b/code/modules/paperwork/paper_bundle.dm index 470e7a9317..ff94a471ae 100644 --- a/code/modules/paperwork/paper_bundle.dm +++ b/code/modules/paperwork/paper_bundle.dm @@ -125,7 +125,7 @@ if(istype(pages[page], /obj/item/paper)) var/obj/item/paper/P = W - if(!(istype(usr, /mob/living/carbon/human) || istype(usr, /mob/observer/dead) || istype(usr, /mob/living/silicon))) + if(!(ishuman(usr) || isobserver(usr) || issilicon(usr))) dat+= "[P.name][stars(P.info)][P.stamps]" else dat+= "[P.name][P.info][P.stamps]" diff --git a/code/modules/paperwork/paper_sticky.dm b/code/modules/paperwork/paper_sticky.dm index fb26569dfb..027e978e9c 100644 --- a/code/modules/paperwork/paper_sticky.dm +++ b/code/modules/paperwork/paper_sticky.dm @@ -68,7 +68,7 @@ /obj/item/sticky_pad/MouseDrop(mob/user as mob) if(user == usr && !(usr.restrained() || usr.stat) && (usr.contents.Find(src) || in_range(src, usr))) - if(!istype(usr, /mob/living/simple_mob)) + if(!isanimal(usr)) if( !usr.get_active_hand() ) //if active hand is empty var/mob/living/carbon/human/H = user var/obj/item/organ/external/temp = H.organs_by_name["r_hand"] diff --git a/code/modules/paperwork/paperbin.dm b/code/modules/paperwork/paperbin.dm index ac18b85b71..90c3dd9861 100644 --- a/code/modules/paperwork/paperbin.dm +++ b/code/modules/paperwork/paperbin.dm @@ -22,7 +22,7 @@ /obj/item/paper_bin/MouseDrop(mob/user as mob) if(user == usr && !(usr.restrained() || usr.stat) && (usr.contents.Find(src) || in_range(src, usr))) - if(!istype(usr, /mob/living/simple_mob)) + if(!isanimal(usr)) if( !usr.get_active_hand() ) //if active hand is empty var/mob/living/carbon/human/H = user var/obj/item/organ/external/temp = H.organs_by_name["r_hand"] diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm index 5b78dc5698..c7ad6cc45e 100644 --- a/code/modules/paperwork/photography.dm +++ b/code/modules/paperwork/photography.dm @@ -96,7 +96,7 @@ var/global/photo_count = 0 /obj/item/storage/photo_album/MouseDrop(obj/over_object as obj) - if((istype(usr, /mob/living/carbon/human))) + if(ishuman(usr)) var/mob/living/carbon/human/M = usr if(!( istype(over_object, /obj/screen) )) return ..() @@ -201,7 +201,7 @@ var/global/photo_count = 0 // If what we got back is actually a picture, draw it. if(istype(img, /icon)) // Check if we're looking at a mob that's lying down - if(istype(A, /mob/living) && A:lying) + if(isliving(A) && A:lying) // If they are, apply that effect to their picture. img.BecomeLying() // Calculate where we are relative to the center of the photo diff --git a/code/modules/paperwork/silicon_photography.dm b/code/modules/paperwork/silicon_photography.dm index 5d34396130..4c936224ce 100644 --- a/code/modules/paperwork/silicon_photography.dm +++ b/code/modules/paperwork/silicon_photography.dm @@ -143,7 +143,7 @@ aiCamera.deletepicture() /obj/item/camera/siliconcam/proc/getsource() - if(istype(src.loc, /mob/living/silicon/ai)) + if(isAI(src.loc)) return src var/mob/living/silicon/robot/C = usr diff --git a/code/modules/pda/cart_apps.dm b/code/modules/pda/cart_apps.dm index a244d05815..cb62b84472 100644 --- a/code/modules/pda/cart_apps.dm +++ b/code/modules/pda/cart_apps.dm @@ -45,7 +45,7 @@ status_signal.data["msg1"] = data1 status_signal.data["msg2"] = data2 var/mob/user = pda.fingerprintslast - if(istype(pda.loc, /mob/living)) + if(isliving(pda.loc)) user = pda.loc log_admin("STATUS: [user] set status screen with [pda]. Message: [data1] [data2]") message_admins("STATUS: [user] set status screen with [pda]. Message: [data1] [data2]") diff --git a/code/modules/pda/pda_subtypes.dm b/code/modules/pda/pda_subtypes.dm index feee5500d9..1b687d54fa 100644 --- a/code/modules/pda/pda_subtypes.dm +++ b/code/modules/pda/pda_subtypes.dm @@ -216,7 +216,7 @@ /obj/item/pda/clown/Crossed(atom/movable/AM as mob|obj) //Clown PDA is slippery. if(AM.is_incorporeal()) return - if (istype(AM, /mob/living)) + if (isliving(AM)) var/mob/living/M = AM if(M.slip("the PDA",8) && M.real_name != src.owner && istype(src.cartridge, /obj/item/cartridge/clown)) diff --git a/code/modules/pda/radio.dm b/code/modules/pda/radio.dm index b16db773cd..48a05351e1 100644 --- a/code/modules/pda/radio.dm +++ b/code/modules/pda/radio.dm @@ -77,7 +77,7 @@ post_signal(control_freq, "command", "bot_status", "active", active, s_filter = bot_filter) /obj/item/radio/integrated/receive_signal(datum/signal/signal) - if(bot_type && istype(signal.source, /mob/living/bot) && signal.data["type"] == bot_type) + if(bot_type && isbot(signal.source) && signal.data["type"] == bot_type) if(!botlist) botlist = new() diff --git a/code/modules/pda/utilities.dm b/code/modules/pda/utilities.dm index 0fdc380fe6..19f8de0f34 100644 --- a/code/modules/pda/utilities.dm +++ b/code/modules/pda/utilities.dm @@ -57,7 +57,7 @@ user.show_message(span_notice(" Body Temperature: [C.bodytemperature-T0C]°C ([C.bodytemperature*1.8-459.67]°F)"), 1) if(C.tod && (C.stat == DEAD || (C.status_flags & FAKEDEATH))) user.show_message(span_notice(" Time of Death: [C.tod]")) - if(istype(C, /mob/living/carbon/human)) + if(ishuman(C)) var/mob/living/carbon/human/H = C var/list/damaged = H.get_damaged_organs(1,1) user.show_message(span_notice("Localized Damage, Brute/Burn:"),1) @@ -73,7 +73,7 @@ icon = "link" /datum/data/pda/utility/scanmode/dna/scan_mob(mob/living/C as mob, mob/living/user as mob) - if(istype(C, /mob/living/carbon/human)) + if(ishuman(C)) var/mob/living/carbon/human/H = C if(!istype(H.dna, /datum/dna)) to_chat(user, span_notice("No fingerprints found on [H]")) diff --git a/code/modules/power/antimatter/control.dm b/code/modules/power/antimatter/control.dm index ca1409571b..25ba3d80f5 100644 --- a/code/modules/power/antimatter/control.dm +++ b/code/modules/power/antimatter/control.dm @@ -253,7 +253,7 @@ /obj/machinery/power/am_control_unit/interact(mob/user) if((get_dist(src, user) > 1) || (stat & (BROKEN|NOPOWER))) - if(!istype(user, /mob/living/silicon/ai)) + if(!isAI(user)) user.unset_machine() user << browse(null, "window=AMcontrol") return @@ -293,7 +293,7 @@ /obj/machinery/power/am_control_unit/Topic(href, href_list) ..() //Ignore input if we are broken or guy is not touching us, AI can control from a ways away - if(stat & (BROKEN|NOPOWER) || (get_dist(src, usr) > 1 && !istype(usr, /mob/living/silicon/ai))) + if(stat & (BROKEN|NOPOWER) || (get_dist(src, usr) > 1 && !isAI(usr))) usr.unset_machine() usr << browse(null, "window=AMcontrol") return diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index a3d04e5bed..6d5ba1eff6 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -736,7 +736,7 @@ GLOBAL_LIST_EMPTY(apcs) add_fingerprint(user) //Human mob special interaction goes here. - if(istype(user,/mob/living/carbon/human)) + if(ishuman(user)) var/mob/living/carbon/human/H = user if(H.species.can_shred(H)) @@ -785,7 +785,7 @@ GLOBAL_LIST_EMPTY(apcs) if(!user) return - if(wiresexposed && !istype(user, /mob/living/silicon/ai)) + if(wiresexposed && !isAI(user)) wires.Interact(user) return //The panel is visibly dark when the wires are exposed, so we shouldn't be able to interact with it. diff --git a/code/modules/power/fusion/fusion_reactions.dm b/code/modules/power/fusion/fusion_reactions.dm index 3815eff221..73c277cc42 100644 --- a/code/modules/power/fusion/fusion_reactions.dm +++ b/code/modules/power/fusion/fusion_reactions.dm @@ -126,7 +126,7 @@ var/list/fusion_reactions for(var/mob/living/mob in living_mob_list) var/turf/T = get_turf(mob) if(T && (holder.z == T.z)) - if(istype(mob, /mob/living/carbon/human)) + if(ishuman(mob)) var/mob/living/carbon/human/H = mob H.hallucination += rand(100,150) diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm index a6d595e623..fc66eb453c 100644 --- a/code/modules/power/lighting.dm +++ b/code/modules/power/lighting.dm @@ -768,7 +768,7 @@ var/global/list/light_type_cache = list() to_chat(user, "There is no [get_fitting_name()] in this light.") return - if(istype(user,/mob/living/carbon/human)) + if(ishuman(user)) var/mob/living/carbon/human/H = user if(H.species.can_shred(H)) user.setClickCooldown(user.get_attack_speed()) diff --git a/code/modules/power/pacman2.dm b/code/modules/power/pacman2.dm index 038388f27b..d21e61d896 100644 --- a/code/modules/power/pacman2.dm +++ b/code/modules/power/pacman2.dm @@ -110,7 +110,7 @@ proc interact(mob/user) if (get_dist(src, user) > 1 ) - if (!istype(user, /mob/living/silicon/ai)) + if (!isAI(user)) user.machine = null user << browse(null, "window=port_gen") return diff --git a/code/modules/power/port_gen.dm b/code/modules/power/port_gen.dm index 71211f9be7..bf73d233a4 100644 --- a/code/modules/power/port_gen.dm +++ b/code/modules/power/port_gen.dm @@ -324,9 +324,9 @@ data["active"] = active - if(istype(user, /mob/living/silicon/ai)) + if(isAI(user)) data["is_ai"] = TRUE - else if(istype(user, /mob/living/silicon/robot) && !Adjacent(user)) + else if(isrobot(user) && !Adjacent(user)) data["is_ai"] = TRUE else data["is_ai"] = FALSE diff --git a/code/modules/power/power.dm b/code/modules/power/power.dm index b9f3df3fde..8f99e57399 100644 --- a/code/modules/power/power.dm +++ b/code/modules/power/power.dm @@ -302,7 +302,7 @@ //If following checks determine user is protected we won't alarm for long. if(PN) PN.trigger_warning(5) - if(istype(M,/mob/living/carbon/human)) + if(ishuman(M)) var/mob/living/carbon/human/H = M if(H.species.siemens_coefficient <= 0) return diff --git a/code/modules/power/singularity/containment_field.dm b/code/modules/power/singularity/containment_field.dm index 38499f3fa4..d5cad53096 100644 --- a/code/modules/power/singularity/containment_field.dm +++ b/code/modules/power/singularity/containment_field.dm @@ -53,7 +53,7 @@ shock(L) /obj/machinery/containment_field/HasProximity(turf/T, atom/movable/AM, old_loc) - if(!istype(AM, /mob/living) || AM:incorporeal_move) + if(!isliving(AM) || AM:incorporeal_move) return 0 if(!(get_dir(src,AM) in shockdirs)) return 0 diff --git a/code/modules/power/singularity/singularity.dm b/code/modules/power/singularity/singularity.dm index 33e8db710c..91da067db6 100644 --- a/code/modules/power/singularity/singularity.dm +++ b/code/modules/power/singularity/singularity.dm @@ -424,7 +424,7 @@ GLOBAL_LIST_BOILERPLATE(all_singularities, /obj/singularity) if(M.status_flags & GODMODE) continue if(M.stat == CONSCIOUS) - if (istype(M,/mob/living/carbon/human)) + if (ishuman(M)) var/mob/living/carbon/human/H = M if(istype(H.glasses,/obj/item/clothing/glasses/meson) && current_size != STAGE_SUPER) to_chat(H, span_notice("You look directly into The [src.name], good thing you had your protective eyewear on!")) diff --git a/code/modules/power/smes_construction.dm b/code/modules/power/smes_construction.dm index 912e005fcc..364662c16b 100644 --- a/code/modules/power/smes_construction.dm +++ b/code/modules/power/smes_construction.dm @@ -116,7 +116,7 @@ to_chat(usr, span_warning("Connection error: Destination Unreachable.")) // Cyborgs standing next to the SMES can play with the wiring. - if(istype(usr, /mob/living/silicon/robot) && Adjacent(usr) && panel_open) + if(isrobot(usr) && Adjacent(usr) && panel_open) wires.Interact(usr) // Proc: New() diff --git a/code/modules/power/supermatter/supermatter.dm b/code/modules/power/supermatter/supermatter.dm index c7e35a7998..777bc56fde 100644 --- a/code/modules/power/supermatter/supermatter.dm +++ b/code/modules/power/supermatter/supermatter.dm @@ -264,7 +264,7 @@ if((damage > emergency_point) && !public_alert) global_announcer.autosay("WARNING: SUPERMATTER CRYSTAL DELAMINATION IMMINENT!", "Supermatter Monitor") for(var/mob/M in player_list) // Rykka adds SM Delam alarm - if(!istype(M,/mob/new_player) && !isdeaf(M)) // Rykka adds SM Delam alarm + if(!isnewplayer(M) && !isdeaf(M)) // Rykka adds SM Delam alarm M << message_sound // Rykka adds SM Delam alarm admin_chat_message(message = "SUPERMATTER DELAMINATING!", color = "#FF2222") //VOREStation Add public_alert = 1 @@ -470,7 +470,7 @@ /obj/machinery/power/supermatter/Bumped(atom/AM as mob|obj) if(istype(AM, /obj/effect)) return - 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."),\ diff --git a/code/modules/projectiles/ammunition/smartmag.dm b/code/modules/projectiles/ammunition/smartmag.dm index 5c412b0c62..e7ef9b6192 100644 --- a/code/modules/projectiles/ammunition/smartmag.dm +++ b/code/modules/projectiles/ammunition/smartmag.dm @@ -204,7 +204,7 @@ set category = "Object" set src in usr - if(!istype(src.loc, /mob/living)) // Needs to be in your hands to reset + if(!isliving(src.loc)) // Needs to be in your hands to reset return var/mob/living/carbon/human/H = usr diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 3444707726..c4b040c86e 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -171,7 +171,7 @@ //Otherwise, if you want handle_click_empty() to be called, check in consume_next_projectile() and return null there. /obj/item/gun/proc/special_check(var/mob/user) - if(!istype(user, /mob/living)) + if(!isliving(user)) return 0 if(!user.IsAdvancedToolUser()) return 0 diff --git a/code/modules/projectiles/guns/energy/bsharpoon_vr.dm b/code/modules/projectiles/guns/energy/bsharpoon_vr.dm index 6a4a4764df..4a66976ae7 100644 --- a/code/modules/projectiles/guns/energy/bsharpoon_vr.dm +++ b/code/modules/projectiles/guns/energy/bsharpoon_vr.dm @@ -115,7 +115,7 @@ var/recievefailchance = failure_chance var/sendfailchance = failure_chance - if(istype(user, /mob/living)) + if(isliving(user)) var/mob/living/L = user if(LAZYLEN(L.buckled_mobs)) for(var/rider in L.buckled_mobs) diff --git a/code/modules/projectiles/guns/energy/cell_loaded_vr/ml3m_cells.dm b/code/modules/projectiles/guns/energy/cell_loaded_vr/ml3m_cells.dm index 6a73a38e33..055f36f49b 100644 --- a/code/modules/projectiles/guns/energy/cell_loaded_vr/ml3m_cells.dm +++ b/code/modules/projectiles/guns/energy/cell_loaded_vr/ml3m_cells.dm @@ -33,7 +33,7 @@ projectile_type = /obj/item/projectile/beam/medical_cell/brute /obj/item/projectile/beam/medical_cell/brute/on_hit(var/mob/living/carbon/human/target) - if(istype(target, /mob/living/carbon/human)) + if(ishuman(target)) if(target.stat != DEAD) target.adjustBruteLoss(-10) else @@ -46,7 +46,7 @@ projectile_type = /obj/item/projectile/beam/medical_cell/burn /obj/item/projectile/beam/medical_cell/burn/on_hit(var/mob/living/carbon/human/target) - if(istype(target, /mob/living/carbon/human)) + if(ishuman(target)) if(target.stat != DEAD) target.adjustFireLoss(-10) else @@ -59,7 +59,7 @@ projectile_type = /obj/item/projectile/beam/medical_cell/stabilize /obj/item/projectile/beam/medical_cell/stabilize/on_hit(var/mob/living/carbon/human/target) - if(istype(target, /mob/living/carbon/human)) + if(ishuman(target)) target.adjustOxyLoss(-30) for(var/name in list(BP_HEAD, BP_L_HAND, BP_R_HAND, BP_L_ARM, BP_R_ARM, BP_L_FOOT, BP_R_FOOT, BP_L_LEG, BP_R_LEG, BP_GROIN, BP_TORSO)) var/obj/item/organ/external/O = target.organs_by_name[name] @@ -87,7 +87,7 @@ projectile_type = /obj/item/projectile/beam/medical_cell/toxin /obj/item/projectile/beam/medical_cell/toxin/on_hit(var/mob/living/carbon/human/target) - if(istype(target, /mob/living/carbon/human)) + if(ishuman(target)) if(target.stat != DEAD) target.adjustToxLoss(-10) else @@ -100,7 +100,7 @@ projectile_type = /obj/item/projectile/beam/medical_cell/omni /obj/item/projectile/beam/medical_cell/omni/on_hit(var/mob/living/carbon/human/target) - if(istype(target, /mob/living/carbon/human)) + if(ishuman(target)) if(target.stat != DEAD) target.adjustBruteLoss(-5) target.adjustFireLoss(-5) @@ -116,7 +116,7 @@ projectile_type = /obj/item/projectile/beam/medical_cell/antirad /obj/item/projectile/beam/medical_cell/antirad/on_hit(var/mob/living/carbon/human/target) - if(istype(target, /mob/living/carbon/human)) + if(ishuman(target)) if(target.stat != DEAD) target.adjustToxLoss(-5) target.radiation = max(target.radiation - 350, 0) //same as 5 units of arithrazine, sans the brute damage @@ -130,7 +130,7 @@ projectile_type = /obj/item/projectile/beam/medical_cell/brute2 /obj/item/projectile/beam/medical_cell/brute2/on_hit(var/mob/living/carbon/human/target) - if(istype(target, /mob/living/carbon/human)) + if(ishuman(target)) if(target.stat != DEAD) target.adjustBruteLoss(-20) else @@ -143,7 +143,7 @@ projectile_type = /obj/item/projectile/beam/medical_cell/burn2 /obj/item/projectile/beam/medical_cell/burn2/on_hit(var/mob/living/carbon/human/target) - if(istype(target, /mob/living/carbon/human)) + if(ishuman(target)) if(target.stat != DEAD) target.adjustFireLoss(-20) else @@ -156,7 +156,7 @@ projectile_type = /obj/item/projectile/beam/medical_cell/stabilize2 /obj/item/projectile/beam/medical_cell/stabilize2/on_hit(var/mob/living/carbon/human/target) - if(istype(target, /mob/living/carbon/human)) + if(ishuman(target)) target.adjustOxyLoss(-200) for(var/name in list(BP_HEAD, BP_L_HAND, BP_R_HAND, BP_L_ARM, BP_R_ARM, BP_L_FOOT, BP_R_FOOT, BP_L_LEG, BP_R_LEG, BP_GROIN, BP_TORSO)) var/obj/item/organ/external/O = target.organs_by_name[name] @@ -179,7 +179,7 @@ projectile_type = /obj/item/projectile/beam/medical_cell/omni2 /obj/item/projectile/beam/medical_cell/omni2/on_hit(var/mob/living/carbon/human/target) - if(istype(target, /mob/living/carbon/human)) + if(ishuman(target)) if(target.stat != DEAD) target.adjustBruteLoss(-10) target.adjustFireLoss(-10) @@ -195,7 +195,7 @@ projectile_type = /obj/item/projectile/beam/medical_cell/toxin2 /obj/item/projectile/beam/medical_cell/toxin2/on_hit(var/mob/living/carbon/human/target) - if(istype(target, /mob/living/carbon/human)) + if(ishuman(target)) if(target.stat != DEAD) target.adjustToxLoss(-20) else @@ -208,7 +208,7 @@ projectile_type = /obj/item/projectile/beam/medical_cell/haste /obj/item/projectile/beam/medical_cell/haste/on_hit(var/mob/living/carbon/human/target) - if(istype(target, /mob/living/carbon/human)) + if(ishuman(target)) target.add_modifier(/datum/modifier/ml3mhaste, 20 SECONDS) else return 1 @@ -228,7 +228,7 @@ projectile_type = /obj/item/projectile/beam/medical_cell/resist /obj/item/projectile/beam/medical_cell/resist/on_hit(var/mob/living/carbon/human/target) - if(istype(target, /mob/living/carbon/human)) + if(ishuman(target)) target.add_modifier(/datum/modifier/resistance, 20 SECONDS) else return 1 @@ -248,7 +248,7 @@ projectile_type = /obj/item/projectile/beam/medical_cell/corpse_mend /obj/item/projectile/beam/medical_cell/corpse_mend/on_hit(var/mob/living/carbon/human/target) - if(istype(target, /mob/living/carbon/human)) + if(ishuman(target)) if(target.stat == DEAD) target.adjustBruteLoss(-50) target.adjustFireLoss(-50) @@ -264,7 +264,7 @@ projectile_type = /obj/item/projectile/beam/medical_cell/brute3 /obj/item/projectile/beam/medical_cell/brute3/on_hit(var/mob/living/carbon/human/target) - if(istype(target, /mob/living/carbon/human)) + if(ishuman(target)) if(target.stat != DEAD) target.adjustBruteLoss(-40) else @@ -277,7 +277,7 @@ projectile_type = /obj/item/projectile/beam/medical_cell/burn3 /obj/item/projectile/beam/medical_cell/burn3/on_hit(var/mob/living/carbon/human/target) - if(istype(target, /mob/living/carbon/human)) + if(ishuman(target)) if(target.stat != DEAD) target.adjustFireLoss(-40) else @@ -290,7 +290,7 @@ projectile_type = /obj/item/projectile/beam/medical_cell/toxin3 /obj/item/projectile/beam/medical_cell/toxin3/on_hit(var/mob/living/carbon/human/target) - if(istype(target, /mob/living/carbon/human)) + if(ishuman(target)) if(target.stat != DEAD) target.adjustToxLoss(-40) else @@ -303,7 +303,7 @@ projectile_type = /obj/item/projectile/beam/medical_cell/omni3 /obj/item/projectile/beam/medical_cell/omni3/on_hit(var/mob/living/carbon/human/target) - if(istype(target, /mob/living/carbon/human)) + if(ishuman(target)) if(target.stat != DEAD) target.adjustBruteLoss(-20) target.adjustFireLoss(-20) @@ -320,7 +320,7 @@ projectile_type = /obj/item/projectile/beam/medical_cell/shrink /obj/item/projectile/beam/medical_cell/shrink/on_hit(var/mob/living/carbon/human/target) - if(istype(target, /mob/living/carbon/human)) + if(ishuman(target)) target.resize(0.5) target.show_message(span_blue("The beam fires into your body, changing your size!")) target.update_icon() @@ -334,7 +334,7 @@ projectile_type = /obj/item/projectile/beam/medical_cell/grow /obj/item/projectile/beam/medical_cell/grow/on_hit(var/mob/living/carbon/human/target) - if(istype(target, /mob/living/carbon/human)) + if(ishuman(target)) target.resize(2.0) target.show_message(span_blue("The beam fires into your body, changing your size!")) target.update_icon() @@ -348,7 +348,7 @@ projectile_type = /obj/item/projectile/beam/medical_cell/normalsize /obj/item/projectile/beam/medical_cell/normalsize/on_hit(var/mob/living/carbon/human/target) - if(istype(target, /mob/living/carbon/human)) + if(ishuman(target)) target.resize(1) target.show_message(span_blue("The beam fires into your body, changing your size!")) target.update_icon() diff --git a/code/modules/projectiles/guns/energy/cell_loaded_vr/multi_cannon_cells.dm b/code/modules/projectiles/guns/energy/cell_loaded_vr/multi_cannon_cells.dm index 817117db9a..2fd189bb2b 100644 --- a/code/modules/projectiles/guns/energy/cell_loaded_vr/multi_cannon_cells.dm +++ b/code/modules/projectiles/guns/energy/cell_loaded_vr/multi_cannon_cells.dm @@ -21,7 +21,7 @@ /obj/item/ammo_casing/macrobattery/Destroy() STOP_PROCESSING(SSobj, src) . = ..() - + /obj/item/ammo_casing/macrobattery/process() ticks++ if(ticks%ticks_to_charge == 0) @@ -44,7 +44,7 @@ var/mob/living/user = multi_cannon.loc if(istype(user)) user?.hud_used.update_ammo_hud(user, multi_cannon) - return + return else BB = null return null @@ -57,8 +57,8 @@ if(charge >= max_charge) STOP_PROCESSING(SSobj, src) if(istype(loc,/obj/item/gun/projectile/multi_cannon)) - loc.update_icon() - + loc.update_icon() + // TGMC Ammo HUD - Update the HUD every time we're called to recharge. if(istype(loc, /obj/item/gun/projectile/multi_cannon)) var/obj/item/gun/projectile/multi_cannon = loc @@ -99,14 +99,14 @@ projectile_type = /obj/item/projectile/beam/medical_cell/phys_heal /obj/item/projectile/beam/medical_cell/phys_heal/on_hit(var/mob/living/carbon/human/target) - if(istype(target, /mob/living/carbon/human)) + if(ishuman(target)) target.adjustBruteLoss(-20) target.adjustFireLoss(-20) else - return 1 + return 1 /obj/item/projectile/beam/medical_cell/detox/on_hit(var/mob/living/carbon/human/target) - if(istype(target, /mob/living/carbon/human)) + if(ishuman(target)) target.adjustToxLoss(-15) target.radiation = max(target.radiation - 75, 0) //worse than mlem for rad, better for tox. else @@ -114,4 +114,4 @@ /obj/item/projectile/beam/heavylaser/lessheavy //all bark. no (or little) bite. damage = 15 - fire_sound = 'sound/weapons/Gunshot_cannon.ogg' \ No newline at end of file + fire_sound = 'sound/weapons/Gunshot_cannon.ogg' diff --git a/code/modules/projectiles/guns/energy/gunsword_vr.dm b/code/modules/projectiles/guns/energy/gunsword_vr.dm index 1ba9f267e4..4d36306f38 100644 --- a/code/modules/projectiles/guns/energy/gunsword_vr.dm +++ b/code/modules/projectiles/guns/energy/gunsword_vr.dm @@ -110,7 +110,7 @@ update_icon() update_held_icon() - if(istype(user,/mob/living/carbon/human)) + if(ishuman(user)) var/mob/living/carbon/human/H = user H.update_inv_l_hand() H.update_inv_r_hand() diff --git a/code/modules/projectiles/guns/projectile/shotgun_vr.dm b/code/modules/projectiles/guns/projectile/shotgun_vr.dm index f8cdfc8d3b..0fa8427c71 100644 --- a/code/modules/projectiles/guns/projectile/shotgun_vr.dm +++ b/code/modules/projectiles/guns/projectile/shotgun_vr.dm @@ -63,7 +63,7 @@ one_handed_penalty = 30 recoil = 5 - if(istype(user,/mob/living/carbon/human)) + if(ishuman(user)) var/mob/living/carbon/human/H = user H.update_inv_l_hand() H.update_inv_r_hand() diff --git a/code/modules/projectiles/guns/projectile/sniper/collapsible_sniper.dm b/code/modules/projectiles/guns/projectile/sniper/collapsible_sniper.dm index 786d101f33..bf1c1792e7 100644 --- a/code/modules/projectiles/guns/projectile/sniper/collapsible_sniper.dm +++ b/code/modules/projectiles/guns/projectile/sniper/collapsible_sniper.dm @@ -163,7 +163,7 @@ if(3) var/obj/item/gun/projectile/heavysniper/collapsible/gun = new (get_turf(src), 0) - if(usr && istype(usr, /mob/living/carbon/human)) + if(usr && ishuman(usr)) var/mob/living/carbon/human/user = usr user.unEquip(src, force=1) user.put_in_any_hand_if_possible(gun) || gun.dropInto(loc) diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm index d2bd86b593..9923445901 100644 --- a/code/modules/projectiles/projectile.dm +++ b/code/modules/projectiles/projectile.dm @@ -576,7 +576,7 @@ if(ismob(A)) var/mob/M = A - if(istype(A, /mob/living)) + if(isliving(A)) //if they have a neck grab on someone, that person gets hit instead var/obj/item/grab/G = locate() in M if(G && G.state >= GRAB_NECK) @@ -704,7 +704,7 @@ return FALSE var/impacted_organ = parse_zone(def_zone) - if(istype(target_mob, /mob/living/simple_mob)) + if(isanimal(target_mob)) var/mob/living/simple_mob/SM = target_mob var/decl/mob_organ_names/organ_plan = SM.organ_names impacted_organ = pick(organ_plan.hit_zones) diff --git a/code/modules/projectiles/projectile/beams.dm b/code/modules/projectiles/projectile/beams.dm index 8efdf1caa1..b6878235c5 100644 --- a/code/modules/projectiles/projectile/beams.dm +++ b/code/modules/projectiles/projectile/beams.dm @@ -355,11 +355,11 @@ /obj/item/projectile/beam/stun/disabler/on_hit(atom/target, blocked = 0, def_zone) . = ..(target, blocked, def_zone) - if(. && istype(target, /mob/living/silicon/robot) && prob(agony)) + if(. && isrobot(target) && prob(agony)) var/mob/living/silicon/robot/R = target var/drainamt = agony * (rand(5, 15) / 10) R.drain_power(0, 0, drainamt) - if(istype(firer, /mob/living/silicon/robot)) // Mischevious sappers, the swarm drones are. + if(isrobot(firer)) // Mischevious sappers, the swarm drones are. var/mob/living/silicon/robot/A = firer if(A.cell) A.cell.give(drainamt * 2) @@ -505,7 +505,7 @@ impact_type = /obj/effect/projectile/impact/medigun /obj/item/projectile/beam/medigun/on_hit(var/atom/target, var/blocked = 0) - if(istype(target, /mob/living/carbon/human)) + if(ishuman(target)) var/mob/living/carbon/human/M = target if(M.health < M.maxHealth) var/obj/effect/overlay/pulse = new /obj/effect/overlay(get_turf(M)) diff --git a/code/modules/projectiles/projectile/change.dm b/code/modules/projectiles/projectile/change.dm index 8576dc880e..b5ac55d4c8 100644 --- a/code/modules/projectiles/projectile/change.dm +++ b/code/modules/projectiles/projectile/change.dm @@ -12,13 +12,13 @@ wabbajack(change) /obj/item/projectile/change/proc/wabbajack(var/mob/M) - if(istype(M, /mob/living) && M.stat != DEAD) + if(isliving(M) && M.stat != DEAD) if(M.transforming) return if(M.has_brain_worms()) return //Borer stuff - RR - if(istype(M, /mob/living/silicon/robot)) + if(isrobot(M)) var/mob/living/silicon/robot/Robot = M if(Robot.mmi) qdel(Robot.mmi) diff --git a/code/modules/projectiles/projectile/hook.dm b/code/modules/projectiles/projectile/hook.dm index e4b3ca6626..1e09cf00ce 100644 --- a/code/modules/projectiles/projectile/hook.dm +++ b/code/modules/projectiles/projectile/hook.dm @@ -167,13 +167,13 @@ done_mob_unique = TRUE success = TRUE if(I_HURT) - if(prob(10) && istype(L, /mob/living/carbon/human)) + if(prob(10) && ishuman(L)) to_chat(L, span_warning("\The [src] rips at your hands!")) ranged_disarm(L) success = TRUE done_mob_unique = TRUE if(I_DISARM) - if(prob(disarm_chance) && istype(L, /mob/living/carbon/human)) + if(prob(disarm_chance) && ishuman(L)) ranged_disarm(L) else L.visible_message(span_danger("\The [src] sends \the [L] stumbling backwards.")) diff --git a/code/modules/projectiles/projectile/magnetic.dm b/code/modules/projectiles/projectile/magnetic.dm index 90bcc80f5e..e69b31df37 100644 --- a/code/modules/projectiles/projectile/magnetic.dm +++ b/code/modules/projectiles/projectile/magnetic.dm @@ -82,7 +82,7 @@ var/energetic_impact = 0 //Does this fuelrod cause a bright flash on impact with a mob? /obj/item/projectile/bullet/magnetic/fuelrod/on_hit(var/atom/target, var/blocked = 0, var/def_zone = null) //Future-proofing. Special effects for impact. - if(istype(target,/mob/living)) + if(isliving(target)) var/mob/living/V = target if(detonate_mob) if(V.loc) @@ -153,7 +153,7 @@ hud_state = "rocket_thermobaric" /obj/item/projectile/bullet/magnetic/fuelrod/supermatter/on_hit(var/atom/target, var/blocked = 0, var/def_zone = null) //You cannot touch the supermatter without disentigrating. Assumedly, this is true for condensed rods of it flying at relativistic speeds. - if(istype(target,/turf/simulated/wall) || istype(target,/mob/living)) + if(istype(target,/turf/simulated/wall) || isliving(target)) target.visible_message(span_danger("The [src] burns a perfect hole through \the [target] with a blinding flash!")) playsound(target, 'sound/effects/teleport.ogg', 40, 0) return ..(target, blocked, def_zone) diff --git a/code/modules/projectiles/projectile/special.dm b/code/modules/projectiles/projectile/special.dm index 8e2f2c5176..27ab791ec2 100644 --- a/code/modules/projectiles/projectile/special.dm +++ b/code/modules/projectiles/projectile/special.dm @@ -130,7 +130,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) return 1 diff --git a/code/modules/random_map/drop/droppod.dm b/code/modules/random_map/drop/droppod.dm index 09ef0e6d2e..4123664214 100644 --- a/code/modules/random_map/drop/droppod.dm +++ b/code/modules/random_map/drop/droppod.dm @@ -177,7 +177,7 @@ else var/list/candidates = list() for(var/client/player in GLOB.clients) - if(player.mob && istype(player.mob, /mob/observer/dead)) + if(player.mob && isobserver(player.mob)) candidates |= player if(!candidates.len) @@ -194,7 +194,7 @@ spawned_mob.tag = "awaiting drop" // Equip them, if they are human and it is desirable. - if(istype(spawned_mob, /mob/living/carbon/human)) + if(ishuman(spawned_mob)) var/antag_type = tgui_input_list(usr, "Select an equipment template to use or cancel for nude.", all_antag_types) if(antag_type) var/datum/antagonist/A = all_antag_types[antag_type] diff --git a/code/modules/reagents/reagent_containers/dropper.dm b/code/modules/reagents/reagent_containers/dropper.dm index ecf6010821..08bd8f312b 100644 --- a/code/modules/reagents/reagent_containers/dropper.dm +++ b/code/modules/reagents/reagent_containers/dropper.dm @@ -45,7 +45,7 @@ if(!do_mob(user, target, time)) return - if(istype(target, /mob/living/carbon/human)) + if(ishuman(target)) var/mob/living/carbon/human/victim = target var/obj/item/safe_thing = null diff --git a/code/modules/reagents/reagent_containers/patch.dm b/code/modules/reagents/reagent_containers/patch.dm index 8a453173f1..d2f8e7c041 100644 --- a/code/modules/reagents/reagent_containers/patch.dm +++ b/code/modules/reagents/reagent_containers/patch.dm @@ -23,7 +23,7 @@ var/mob/living/L = user if(M == L) - if(istype(M, /mob/living/carbon/human)) + if(ishuman(M)) var/mob/living/carbon/human/H = M var/obj/item/organ/external/affecting = H.get_organ(check_zone(L.zone_sel.selecting)) if(!affecting) @@ -44,7 +44,7 @@ qdel(src) return 1 - else if(istype(M, /mob/living/carbon/human)) + else if(ishuman(M)) var/mob/living/carbon/human/H = M var/obj/item/organ/external/affecting = H.get_organ(check_zone(L.zone_sel.selecting)) if(!affecting) diff --git a/code/modules/reagents/reagent_containers/pill.dm b/code/modules/reagents/reagent_containers/pill.dm index 148c5b88f2..4191d32d54 100644 --- a/code/modules/reagents/reagent_containers/pill.dm +++ b/code/modules/reagents/reagent_containers/pill.dm @@ -24,7 +24,7 @@ /obj/item/reagent_containers/pill/attack(mob/M as mob, mob/user as mob) if(M == user) - if(istype(M, /mob/living/carbon/human)) + if(ishuman(M)) var/mob/living/carbon/human/H = M if(!H.check_has_mouth()) to_chat(user, "Where do you intend to put \the [src]? You don't have a mouth!") @@ -41,7 +41,7 @@ qdel(src) return 1 - else if(istype(M, /mob/living/carbon/human)) + else if(ishuman(M)) var/mob/living/carbon/human/H = M if(!H.check_has_mouth()) diff --git a/code/modules/reagents/reagent_containers/syringes.dm b/code/modules/reagents/reagent_containers/syringes.dm index 458e8fe444..b0b0ab5a6d 100644 --- a/code/modules/reagents/reagent_containers/syringes.dm +++ b/code/modules/reagents/reagent_containers/syringes.dm @@ -130,7 +130,7 @@ var/datum/reagent/B drawing = 1 - if(istype(T, /mob/living/carbon/human)) + if(ishuman(T)) var/mob/living/carbon/human/H = T if(H.species && !H.should_have_organ(O_HEART)) H.reagents.trans_to_obj(src, amount) @@ -258,7 +258,7 @@ return /obj/item/reagent_containers/syringe/proc/syringestab(mob/living/carbon/target as mob, mob/living/carbon/user as mob) - if(istype(target, /mob/living/carbon/human)) + if(ishuman(target)) var/mob/living/carbon/human/H = target diff --git a/code/modules/reagents/reagents/core.dm b/code/modules/reagents/reagents/core.dm index 58ce6fe69a..5ee1838f99 100644 --- a/code/modules/reagents/reagents/core.dm +++ b/code/modules/reagents/reagents/core.dm @@ -34,7 +34,7 @@ ..() - if(!data["donor"] || istype(data["donor"], /mob/living/carbon/human)) + if(!data["donor"] || ishuman(data["donor"])) blood_splatter(T, src, 1) else if(istype(data["donor"], /mob/living/carbon/alien)) var/obj/effect/decal/cleanable/blood/B = blood_splatter(T, src, 1) @@ -270,7 +270,7 @@ L.water_act(amount / 25) // Div by 25, as water_act multiplies it by 5 in order to calculate firestack modification. remove_self(needed) // Put out cigarettes if splashed. - if(istype(L, /mob/living/carbon/human)) + if(ishuman(L)) var/mob/living/carbon/human/H = L if(H.wear_mask) if(istype(H.wear_mask, /obj/item/clothing/mask/smokable)) diff --git a/code/modules/reagents/reagents/dispenser.dm b/code/modules/reagents/reagents/dispenser.dm index eca058567d..b72ca66fe6 100644 --- a/code/modules/reagents/reagents/dispenser.dm +++ b/code/modules/reagents/reagents/dispenser.dm @@ -394,7 +394,7 @@ M.take_organ_damage(0, removed * power * 0.2) //burn damage, since it causes chemical burns. Acid doesn't make bones shatter, like brute trauma would. return if(!M.unacidable && removed > 0) - if(istype(M, /mob/living/carbon/human) && volume >= meltdose) + if(ishuman(M) && volume >= meltdose) var/mob/living/carbon/human/H = M var/obj/item/organ/external/affecting = H.get_organ(BP_HEAD) if(affecting) diff --git a/code/modules/reagents/reagents/food_drinks.dm b/code/modules/reagents/reagents/food_drinks.dm index 419b7f4656..1f6398ed1a 100644 --- a/code/modules/reagents/reagents/food_drinks.dm +++ b/code/modules/reagents/reagents/food_drinks.dm @@ -848,7 +848,7 @@ if(alien == IS_SKRELL) //Larger eyes means bigger targets. effective_strength = 8 - if(istype(M, /mob/living/carbon/human)) + if(ishuman(M)) var/mob/living/carbon/human/H = M if(!H.can_feel_pain()) return diff --git a/code/modules/reagents/reagents/other.dm b/code/modules/reagents/reagents/other.dm index c2abcbe9e9..ff8d4dd544 100644 --- a/code/modules/reagents/reagents/other.dm +++ b/code/modules/reagents/reagents/other.dm @@ -502,7 +502,7 @@ /datum/reagent/space_cleaner/touch_mob(var/mob/living/L, var/amount) ..() - if(istype(L, /mob/living/carbon/human)) + if(ishuman(L)) var/mob/living/carbon/human/H = L if(H.wear_mask) if(istype(H.wear_mask, /obj/item/clothing/mask/smokable)) diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm index 23ce1f00d0..401c43cfb3 100644 --- a/code/modules/recycling/disposal.dm +++ b/code/modules/recycling/disposal.dm @@ -734,7 +734,7 @@ // called when player tries to move while in a pipe /obj/structure/disposalholder/relaymove(mob/user as mob) - if(!istype(user,/mob/living)) + if(!isliving(user)) return var/mob/living/U = user diff --git a/code/modules/resleeving/autoresleever.dm b/code/modules/resleeving/autoresleever.dm index 52154baa05..af87579bcc 100644 --- a/code/modules/resleeving/autoresleever.dm +++ b/code/modules/resleeving/autoresleever.dm @@ -52,7 +52,7 @@ /obj/machinery/transhuman/autoresleever/attackby(var/mob/user) //Let's not let people mess with this. update_icon() - if(istype(user,/mob/observer/dead)) + if(isobserver(user)) attack_ghost(user) else return @@ -61,7 +61,7 @@ if(stat) to_chat(ghost, span_warning("This machine is not functioning...")) return - if(!istype(ghost,/mob/observer/dead)) + if(!isobserver(ghost)) return if(ghost.mind && ghost.mind.current && ghost.mind.current.stat != DEAD) if(istype(ghost.mind.current.loc, /obj/item/mmi)) diff --git a/code/modules/samples/samples.dm b/code/modules/samples/samples.dm index b2185f9d28..1cc0f6726f 100644 --- a/code/modules/samples/samples.dm +++ b/code/modules/samples/samples.dm @@ -70,7 +70,7 @@ return var/burn_user = TRUE - if(istype(M, /mob/living/carbon/human)) + if(ishuman(M)) var/mob/living/carbon/human/H = user var/obj/item/clothing/gloves/G = H.gloves var/obj/item/clothing/suit/S = H.wear_suit @@ -115,7 +115,7 @@ H.drop_from_inventory(src, get_turf(H)) return - if(istype(user, /mob/living/silicon/robot)) + if(isrobot(user)) burn_user = FALSE if(burn_user) @@ -127,7 +127,7 @@ return var/burn_user = TRUE - if(istype(M, /mob/living/carbon/human)) + if(ishuman(M)) var/mob/living/carbon/human/H = user var/obj/item/clothing/gloves/G = H.gloves var/obj/item/clothing/suit/S = H.wear_suit @@ -182,7 +182,7 @@ H.drop_from_inventory(src,get_turf(H)) qdel(src) - if(istype(user, /mob/living/silicon/robot)) + if(isrobot(user)) burn_user = FALSE if(burn_user) diff --git a/code/modules/spells/aoe_turf/charge.dm b/code/modules/spells/aoe_turf/charge.dm index 3171835c0c..4eb4530922 100644 --- a/code/modules/spells/aoe_turf/charge.dm +++ b/code/modules/spells/aoe_turf/charge.dm @@ -35,7 +35,7 @@ /spell/aoe_turf/charge/proc/cast_charge(var/atom/target) var/atom/charged_item - if(istype(target, /mob/living)) + if(isliving(target)) charged_item = mob_charge(target) if(istype(target, /obj/item/grab)) diff --git a/code/modules/spells/spell_code.dm b/code/modules/spells/spell_code.dm index ff27d7170f..7a85a8a3f4 100644 --- a/code/modules/spells/spell_code.dm +++ b/code/modules/spells/spell_code.dm @@ -139,7 +139,7 @@ var/list/spells = typesof(/spell) //needed for the badmin verb for now if(overlay) var/location - if(istype(target,/mob/living)) + if(isliving(target)) location = target.loc else if(istype(target,/turf)) location = target @@ -155,7 +155,7 @@ var/list/spells = typesof(/spell) //needed for the badmin verb for now /spell/proc/after_cast(list/targets) for(var/atom/target in targets) var/location = get_turf(target) - if(istype(target,/mob/living) && message) + if(isliving(target) && message) to_chat(target, "[message]") if(sparks_spread) var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread() @@ -198,7 +198,7 @@ var/list/spells = typesof(/spell) //needed for the badmin verb for now if(findNullRod(T)) return 0 - if(istype(user, /mob/living/simple_mob) && holder == user) + if(isanimal(user) && holder == user) var/mob/living/simple_mob/SM = user if(SM.purge) to_chat(SM, span_warning("The nullrod's power interferes with your own!")) diff --git a/code/modules/spells/spellbook.dm b/code/modules/spells/spellbook.dm index 0449d781c3..608fa4da28 100644 --- a/code/modules/spells/spellbook.dm +++ b/code/modules/spells/spellbook.dm @@ -88,7 +88,7 @@ if(H.stat || H.restrained()) return - if(!istype(H, /mob/living/carbon/human)) + if(!ishuman(H)) return 1 if(H.mind.special_role == JOB_APPRENTICE) @@ -404,7 +404,7 @@ desc = "This book is more horse than your mind has room for." /obj/item/spellbook/oneuse/horsemask/recoil(mob/living/carbon/user as mob) - if(istype(user, /mob/living/carbon/human)) + if(ishuman(user)) to_chat(user, "HOR-SIE HAS RISEN") var/obj/item/clothing/mask/horsehead/magichead = new /obj/item/clothing/mask/horsehead magichead.canremove = FALSE //curses! diff --git a/code/modules/tables/interactions.dm b/code/modules/tables/interactions.dm index 4bf70d2411..9f9739c234 100644 --- a/code/modules/tables/interactions.dm +++ b/code/modules/tables/interactions.dm @@ -92,7 +92,7 @@ // Handle harm intent grabbing/tabling. if(istype(W, /obj/item/grab) && get_dist(src,user)<2) var/obj/item/grab/G = W - if (istype(G.affecting, /mob/living)) + if (isliving(G.affecting)) var/mob/living/M = G.affecting var/obj/occupied = turf_is_crowded() if(occupied) diff --git a/code/modules/tables/tables.dm b/code/modules/tables/tables.dm index 4920d292d2..f4f3e8712f 100644 --- a/code/modules/tables/tables.dm +++ b/code/modules/tables/tables.dm @@ -166,7 +166,7 @@ var/list/table_icon_cache = list() return ..() /obj/structure/table/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) diff --git a/code/modules/tgs/v5/chat_commands.dm b/code/modules/tgs/v5/chat_commands.dm index 882632fc60..a2cb48501b 100644 --- a/code/modules/tgs/v5/chat_commands.dm +++ b/code/modules/tgs/v5/chat_commands.dm @@ -16,7 +16,7 @@ var/client/C = X if(C) counts++ - if(C && !(istype(C.mob,/mob/new_player) || istype(C.mob, /mob/observer))) + if(C && !(isnewplayer(C.mob) || istype(C.mob, /mob/observer))) if(C && C.mob && isbelly(C.mob.loc)) bellied++ if(C.is_afk()) diff --git a/code/modules/turbolift/turbolift.dm b/code/modules/turbolift/turbolift.dm index b13a7193c6..1e5e554870 100644 --- a/code/modules/turbolift/turbolift.dm +++ b/code/modules/turbolift/turbolift.dm @@ -192,7 +192,7 @@ for(var/turf/T in destination) for(var/atom/movable/AM in T) - if(istype(AM, /mob/living) && !(AM.is_incorporeal())) + if(isliving(AM) && !(AM.is_incorporeal())) var/mob/living/M = AM M.gib() else if(AM.simulated && !(istype(AM, /mob/observer)) && !(AM.is_incorporeal())) diff --git a/code/modules/vehicles/Securitrain_vr.dm b/code/modules/vehicles/Securitrain_vr.dm index 6a532f90ca..111a99427b 100644 --- a/code/modules/vehicles/Securitrain_vr.dm +++ b/code/modules/vehicles/Securitrain_vr.dm @@ -180,7 +180,7 @@ /obj/vehicle/train/security/engine/RunOver(var/mob/living/M) ..() - if(is_train_head() && istype(load, /mob/living/carbon/human)) + if(is_train_head() && ishuman(load)) var/mob/living/carbon/human/D = load to_chat(D, span_danger("You ran over \the [M]!")) visible_message(span_danger("\The [src] ran over \the [M]!")) @@ -218,7 +218,7 @@ set category = "Vehicle" set src in view(0) - if(!istype(usr, /mob/living/carbon/human)) + if(!ishuman(usr)) return if(on) @@ -239,7 +239,7 @@ set category = "Vehicle" set src in view(0) - if(!istype(usr, /mob/living/carbon/human)) + if(!ishuman(usr)) return if(!on) @@ -255,7 +255,7 @@ set category = "Vehicle" set src in view(0) - if(!istype(usr, /mob/living/carbon/human)) + if(!ishuman(usr)) return if(!key || (load && load != usr)) @@ -277,7 +277,7 @@ /obj/vehicle/train/security/trolley/load(var/atom/movable/C) if(ismob(C) && !passenger_allowed) return 0 - if(!istype(C,/obj/machinery) && !istype(C,/obj/structure/closet) && !istype(C,/obj/structure/largecrate) && !istype(C,/obj/structure/reagent_dispensers) && !istype(C,/obj/structure/ore_box) && !istype(C, /mob/living/carbon/human)) + if(!istype(C,/obj/machinery) && !istype(C,/obj/structure/closet) && !istype(C,/obj/structure/largecrate) && !istype(C,/obj/structure/reagent_dispensers) && !istype(C,/obj/structure/ore_box) && !ishuman(C)) return 0 //if there are any items you don't want to be able to interact with, add them to this check @@ -291,7 +291,7 @@ return 1 /obj/vehicle/train/security/engine/load(var/atom/movable/C) - if(!istype(C, /mob/living/carbon/human)) + if(!ishuman(C)) return 0 return ..() diff --git a/code/modules/vehicles/cargo_train.dm b/code/modules/vehicles/cargo_train.dm index e2544f8fdf..338169e9e9 100644 --- a/code/modules/vehicles/cargo_train.dm +++ b/code/modules/vehicles/cargo_train.dm @@ -172,7 +172,7 @@ /obj/vehicle/train/engine/RunOver(var/mob/living/M) ..() - if(is_train_head() && istype(load, /mob/living/carbon/human)) + if(is_train_head() && ishuman(load)) var/mob/living/carbon/human/D = load to_chat(D, span_bolddanger("You ran over [M]!")) visible_message(span_bolddanger("\The [src] ran over [M]!")) @@ -225,7 +225,7 @@ set category = "Vehicle" set src in view(0) - if(!istype(usr, /mob/living/carbon/human)) + if(!ishuman(usr)) return if(on) @@ -248,7 +248,7 @@ set category = "Vehicle" set src in view(0) - if(!istype(usr, /mob/living/carbon/human)) + if(!ishuman(usr)) return if(!on) @@ -264,7 +264,7 @@ set category = "Vehicle" set src in view(0) - if(!istype(usr, /mob/living/carbon/human)) + if(!ishuman(usr)) return if(!key || (load && load != usr)) @@ -286,7 +286,7 @@ /obj/vehicle/train/trolley/load(var/atom/movable/C, var/mob/user) if(ismob(C) && !passenger_allowed) return 0 - if(!istype(C,/obj/machinery) && !istype(C,/obj/structure/closet) && !istype(C,/obj/structure/largecrate) && !istype(C,/obj/structure/reagent_dispensers) && !istype(C,/obj/structure/ore_box) && !istype(C, /mob/living/carbon/human)) + if(!istype(C,/obj/machinery) && !istype(C,/obj/structure/closet) && !istype(C,/obj/structure/largecrate) && !istype(C,/obj/structure/reagent_dispensers) && !istype(C,/obj/structure/ore_box) && !ishuman(C)) return 0 //if there are any items you don't want to be able to interact with, add them to this check @@ -300,7 +300,7 @@ return 1 /obj/vehicle/train/engine/load(var/atom/movable/C, var/mob/user) - if(!istype(C, /mob/living/carbon/human)) + if(!ishuman(C)) return 0 return ..() diff --git a/code/modules/vehicles/quad.dm b/code/modules/vehicles/quad.dm index 3d8e3ade94..4090cca797 100644 --- a/code/modules/vehicles/quad.dm +++ b/code/modules/vehicles/quad.dm @@ -138,7 +138,7 @@ if(isturf(T)) A.Move(T) //bump things away when hit - if(istype(A, /mob/living)) + if(isliving(A)) var/mob/living/M = A visible_message(span_danger("[src] knocks over [M]!")) M.apply_effects(2, 2) // Knock people down for a short moment @@ -152,7 +152,7 @@ health -= round(M.mob_size / 4) // Less damage if they actually put the point in to emag it. var/turf/T2 = get_step(A, pick(throw_dirs)) M.throw_at(T2, 1, 1, src) - if(istype(load, /mob/living/carbon/human)) + if(ishuman(load)) var/mob/living/D = load to_chat(D, span_danger("You hit [M]!")) add_attack_logs(D,M,"Ran over with [src.name]") @@ -209,7 +209,7 @@ /obj/vehicle/train/trolley/trailer/proc/update_load() if(load) var/y_offset = load_offset_y - if(istype(load, /mob/living)) + if(isliving(load)) y_offset = mob_offset_y load.pixel_x = (initial(load.pixel_x) + 16 + load_offset_x + pixel_x) //Base location for the sprite, plus 16 to center it on the 'base' sprite of the trailer, plus the x shift of the trailer, then shift it by the same pixel_x as the trailer to track it. load.pixel_y = (initial(load.pixel_y) + y_offset + pixel_y) //Same as the above. @@ -251,7 +251,7 @@ if(isturf(T)) A.Move(T) //bump things away when hit - if(istype(A, /mob/living)) + if(isliving(A)) var/mob/living/M = A visible_message(span_danger("[src] knocks over [M]!")) M.apply_effects(1, 1) @@ -263,7 +263,7 @@ throw_dirs -= dir var/turf/T2 = get_step(A, pick(throw_dirs)) M.throw_at(T2, 1, 1, src) - if(istype(load, /mob/living/carbon/human)) + if(ishuman(load)) var/mob/living/D = load to_chat(D, span_danger("You hit [M]!")) add_attack_logs(D,M,"Ran over with [src.name]") diff --git a/code/modules/vehicles/rover_vr.dm b/code/modules/vehicles/rover_vr.dm index cf56c9541a..07dea876fb 100644 --- a/code/modules/vehicles/rover_vr.dm +++ b/code/modules/vehicles/rover_vr.dm @@ -178,7 +178,7 @@ /obj/vehicle/train/rover/engine/RunOver(var/mob/living/M) ..() - if(is_train_head() && istype(load, /mob/living/carbon/human)) + if(is_train_head() && ishuman(load)) var/mob/living/carbon/human/D = load to_chat(D, span_danger("You ran over \the [M]!")) visible_message(span_danger("\The [src] ran over \the [M]!")) @@ -216,7 +216,7 @@ set category = "Vehicle" set src in view(0) - if(!istype(usr, /mob/living/carbon/human)) + if(!ishuman(usr)) return if(on) @@ -237,7 +237,7 @@ set category = "Vehicle" set src in view(0) - if(!istype(usr, /mob/living/carbon/human)) + if(!ishuman(usr)) return if(!on) @@ -253,7 +253,7 @@ set category = "Vehicle" set src in view(0) - if(!istype(usr, /mob/living/carbon/human)) + if(!ishuman(usr)) return if(!key || (load && load != usr)) @@ -275,7 +275,7 @@ /obj/vehicle/train/rover/trolley/load(var/atom/movable/C) if(ismob(C) && !passenger_allowed) return 0 - if(!istype(C,/obj/machinery) && !istype(C,/obj/structure/closet) && !istype(C,/obj/structure/largecrate) && !istype(C,/obj/structure/reagent_dispensers) && !istype(C,/obj/structure/ore_box) && !istype(C, /mob/living/carbon/human)) + if(!istype(C,/obj/machinery) && !istype(C,/obj/structure/closet) && !istype(C,/obj/structure/largecrate) && !istype(C,/obj/structure/reagent_dispensers) && !istype(C,/obj/structure/ore_box) && !ishuman(C)) return 0 //if there are any items you don't want to be able to interact with, add them to this check @@ -289,7 +289,7 @@ return 1 /obj/vehicle/train/rover/engine/load(var/atom/movable/C) - if(!istype(C, /mob/living/carbon/human)) + if(!ishuman(C)) return 0 . = ..(C) diff --git a/code/modules/vehicles/train.dm b/code/modules/vehicles/train.dm index 018b1dfc05..935ce0d091 100644 --- a/code/modules/vehicles/train.dm +++ b/code/modules/vehicles/train.dm @@ -50,12 +50,12 @@ A.Move(T) //bump things away when hit if(emagged) - if(istype(A, /mob/living)) + if(isliving(A)) var/mob/living/M = A visible_message(span_red("[src] knocks over [M]!")) M.apply_effects(5, 5) //knock people down if you hit them M.apply_damages(22 / move_delay) // and do damage according to how fast the train is going - if(istype(load, /mob/living/carbon/human)) + if(ishuman(load)) var/mob/living/D = load to_chat(D, span_red("You hit [M]!")) add_attack_logs(D,M,"Ran over with [src.name]") @@ -133,7 +133,7 @@ set category = "Vehicle" set src in view(1) - if(!istype(usr, /mob/living/carbon/human)) + if(!ishuman(usr)) return if(!usr.canmove || usr.stat || usr.restrained() || !Adjacent(usr)) diff --git a/code/modules/vehicles/vehicle.dm b/code/modules/vehicles/vehicle.dm index e1bdca2bee..846e511b29 100644 --- a/code/modules/vehicles/vehicle.dm +++ b/code/modules/vehicles/vehicle.dm @@ -234,7 +234,7 @@ var/turf/Tsec = get_turf(src) //stuns people who are thrown off a train that has been blown up - if(istype(load, /mob/living)) + if(isliving(load)) var/mob/living/M = load M.apply_effects(5, 5) diff --git a/code/modules/ventcrawl/ventcrawl_atmospherics.dm b/code/modules/ventcrawl/ventcrawl_atmospherics.dm index fb04e89857..ad4ad0d179 100644 --- a/code/modules/ventcrawl/ventcrawl_atmospherics.dm +++ b/code/modules/ventcrawl/ventcrawl_atmospherics.dm @@ -18,7 +18,7 @@ . = ..() /obj/machinery/atmospherics/Entered(atom/movable/Obj) - if(istype(Obj, /mob/living)) + if(isliving(Obj)) var/mob/living/L = Obj L.ventcrawl_layer = layer . = ..() diff --git a/code/modules/vore/eating/bellymodes_vr.dm b/code/modules/vore/eating/bellymodes_vr.dm index a866b3a805..491b8fdb62 100644 --- a/code/modules/vore/eating/bellymodes_vr.dm +++ b/code/modules/vore/eating/bellymodes_vr.dm @@ -276,16 +276,16 @@ /obj/belly/proc/steal_nutrition(mob/living/L) if(L.nutrition <= 110) - if(drainmode == DR_SLEEP && istype(L,/mob/living/carbon/human)) //Slowly put prey to sleep + if(drainmode == DR_SLEEP && ishuman(L)) //Slowly put prey to sleep if(L.tiredness <= 105) L.tiredness = (L.tiredness + 6) if(L.tiredness <= 90 && L.tiredness >= 75) to_chat(L, span_warning("You are about to fall unconscious!")) to_chat(owner, span_warning("[L] is about to fall unconscious!")) - if(drainmode == DR_FAKE && istype(L,/mob/living/carbon/human)) //Slowly bring prey to the edge of sleep without crossing it + if(drainmode == DR_FAKE && ishuman(L)) //Slowly bring prey to the edge of sleep without crossing it if(L.tiredness <= 93) L.tiredness = (L.tiredness + 6) - if(drainmode == DR_WEIGHT && istype(L,/mob/living/carbon/human)) //Slowly drain your prey's weight and add it to your own + if(drainmode == DR_WEIGHT && ishuman(L)) //Slowly drain your prey's weight and add it to your own if(L.weight > 70) L.weight -= (0.01 * L.weight_loss) owner.weight += (0.01 * L.weight_loss) //intentionally dependant on the prey's weight loss ratio rather than the preds weight gain to keep them in pace with one another. diff --git a/code/modules/vore/eating/inbelly_spawn.dm b/code/modules/vore/eating/inbelly_spawn.dm index e2ef03a472..3a9d1fc4b1 100644 --- a/code/modules/vore/eating/inbelly_spawn.dm +++ b/code/modules/vore/eating/inbelly_spawn.dm @@ -39,7 +39,7 @@ Please do not abuse this ability. continue eligible_targets += S continue - if(istype(pred, /mob/living/simple_mob)) + if(isanimal(pred)) var/mob/living/simple_mob/SM = pred if(!SM.vore_active) // No vore, no bellies, no inbelly spawning continue diff --git a/code/modules/vore/eating/living_bellies.dm b/code/modules/vore/eating/living_bellies.dm index e21936da7c..fe352c8f38 100644 --- a/code/modules/vore/eating/living_bellies.dm +++ b/code/modules/vore/eating/living_bellies.dm @@ -14,7 +14,7 @@ for(var/obj/belly/B as anything in vore_organs) if(DM_FLAG_VORESPRITE_BELLY & B.vore_sprite_flags) new_fullness[B.belly_sprite_to_affect] += B.GetFullnessFromBelly() - if(istype(src, /mob/living/carbon/human) && DM_FLAG_VORESPRITE_ARTICLE & B.vore_sprite_flags) + if(ishuman(src) && DM_FLAG_VORESPRITE_ARTICLE & B.vore_sprite_flags) if(!new_fullness[B.undergarment_chosen]) new_fullness[B.undergarment_chosen] = 1 new_fullness[B.undergarment_chosen] += B.GetFullnessFromBelly() diff --git a/code/modules/vore/eating/living_vr.dm b/code/modules/vore/eating/living_vr.dm index c5f77334ad..c8d57c6a58 100644 --- a/code/modules/vore/eating/living_vr.dm +++ b/code/modules/vore/eating/living_vr.dm @@ -267,7 +267,7 @@ P.weight_messages = src.weight_messages P.allow_mind_transfer = src.allow_mind_transfer - P.vore_sprite_color = istype(src, /mob/living/carbon/human) ? src:vore_sprite_color : null + P.vore_sprite_color = ishuman(src) ? src:vore_sprite_color : null var/list/serialized = list() for(var/obj/belly/B as anything in src.vore_organs) @@ -585,7 +585,7 @@ log_and_message_admins("[key_name(src)] used the OOC escape button to get out of [crystal] owned by [crystal.owner]. [ADMIN_FLW(src)]") //You've been turned into an item! - else if(tf_mob_holder && istype(src, /mob/living/voice) && istype(src.loc, /obj/item)) + else if(tf_mob_holder && isvoice(src) && istype(src.loc, /obj/item)) var/obj/item/item_to_destroy = src.loc //If so, let's destroy the item they just TF'd out of. if(istype(src.loc, /obj/item/clothing)) //Are they in clothes? Delete the item then revert them. qdel(item_to_destroy) @@ -721,7 +721,7 @@ if(delay) swallow_time = delay else - swallow_time = istype(prey, /mob/living/carbon/human) ? belly.human_prey_swallow_time : belly.nonhuman_prey_swallow_time + swallow_time = ishuman(prey) ? belly.human_prey_swallow_time : belly.nonhuman_prey_swallow_time // Their AI should get notified so they can stab us prey.ai_holder?.react_to_attack(user) diff --git a/code/modules/vore/eating/stumblevore_vr.dm b/code/modules/vore/eating/stumblevore_vr.dm index 2cd19da9ce..53474a660f 100644 --- a/code/modules/vore/eating/stumblevore_vr.dm +++ b/code/modules/vore/eating/stumblevore_vr.dm @@ -13,13 +13,13 @@ /mob/living/Bump(atom/movable/AM) //. = ..() - if(istype(AM, /mob/living)) + if(isliving(AM)) if(buckled != AM && (((confused || is_blind()) && stat == CONSCIOUS && prob(50) && m_intent==I_RUN) || flying && flight_vore)) AM.stumble_into(src) return ..() // Because flips toggle density /mob/living/Crossed(var/atom/movable/AM) - if(istype(AM, /mob/living) && isturf(loc) && AM != src) + if(isliving(AM) && isturf(loc) && AM != src) var/mob/living/AMV = AM if(AMV.buckled != src && (((AMV.confused || AMV.is_blind()) && AMV.stat == CONSCIOUS && prob(50) && AMV.m_intent==I_RUN) || AMV.flying && AMV.flight_vore)) stumble_into(AMV) diff --git a/code/modules/vore/eating/vore_vr.dm b/code/modules/vore/eating/vore_vr.dm index 0eda2da683..4d3064b987 100644 --- a/code/modules/vore/eating/vore_vr.dm +++ b/code/modules/vore/eating/vore_vr.dm @@ -122,8 +122,8 @@ V::::::V V::::::VO:::::::OOO:::::::ORR:::::R R:::::REE::::::EEEEEE // Check if an object is capable of eating things, based on vore_organs // /proc/is_vore_predator(mob/living/O) - if(istype(O,/mob/living)) - if(istype(O,/mob/living/simple_mob)) //On-demand belly loading. + if(isliving(O)) + if(isanimal(O)) //On-demand belly loading. var/mob/living/simple_mob/SM = O if(SM.vore_active && !SM.voremob_loaded) SM.voremob_loaded = TRUE diff --git a/code/modules/vore/eating/vorepanel_vr.dm b/code/modules/vore/eating/vorepanel_vr.dm index 18dd73a64d..04ea19e846 100644 --- a/code/modules/vore/eating/vorepanel_vr.dm +++ b/code/modules/vore/eating/vorepanel_vr.dm @@ -250,7 +250,7 @@ var/global/list/belly_colorable_only_fullscreens = list("a_synth_flesh_mono", "voresprite_size_factor" = selected.size_factor_for_sprite, "belly_sprite_to_affect" = selected.belly_sprite_to_affect, "belly_sprite_option_shown" = LAZYLEN(host.vore_icon_bellies) >= 1 ? TRUE : FALSE, - "tail_option_shown" = istype(host, /mob/living/carbon/human), + "tail_option_shown" = ishuman(host), "tail_to_change_to" = selected.tail_to_change_to, "tail_colouration" = selected.tail_colouration, "tail_extra_overlay" = selected.tail_extra_overlay, diff --git a/code/modules/vore/fluffstuff/custom_clothes_vr.dm b/code/modules/vore/fluffstuff/custom_clothes_vr.dm index 9f10fd281f..3557aefd06 100644 --- a/code/modules/vore/fluffstuff/custom_clothes_vr.dm +++ b/code/modules/vore/fluffstuff/custom_clothes_vr.dm @@ -1881,7 +1881,7 @@ Departamental Swimsuits, for general use if(!..()) return 0 - if(istype(M,/mob/living/carbon/human)) + if(ishuman(M)) var/mob/living/carbon/human/H = M if(!(H.get_species() == SPECIES_PROMETHEAN)) //Only wearable by slimes, since species_restricted actually checks bodytype, not species return 0 @@ -2305,7 +2305,7 @@ Departamental Swimsuits, for general use set name = "Swap color" set category = "Object" set src in usr - if(!istype(usr, /mob/living)) return + if(!isliving(usr)) return if(usr.stat) return colorswap(usr) diff --git a/code/modules/vore/fluffstuff/custom_items_vr.dm b/code/modules/vore/fluffstuff/custom_items_vr.dm index 145757efab..eca1456e88 100644 --- a/code/modules/vore/fluffstuff/custom_items_vr.dm +++ b/code/modules/vore/fluffstuff/custom_items_vr.dm @@ -1048,7 +1048,7 @@ else activate(user) - if(istype(user,/mob/living/carbon/human)) + if(ishuman(user)) var/mob/living/carbon/human/H = user H.update_inv_l_hand() H.update_inv_r_hand() diff --git a/code/modules/vore/persist/persist_vr.dm b/code/modules/vore/persist/persist_vr.dm index 463f12aab7..9733dcaafe 100644 --- a/code/modules/vore/persist/persist_vr.dm +++ b/code/modules/vore/persist/persist_vr.dm @@ -19,7 +19,7 @@ if(!Player.mind || isnewplayer(Player)) continue // No mind we can do nothing, new players we care not for else if(Player.stat == DEAD) - if(istype(Player,/mob/observer/dead)) + if(isobserver(Player)) var/mob/observer/dead/O = Player if(O.started_as_observer) continue // They are just a pure observer, ignore diff --git a/code/modules/vore/resizing/resize_vr.dm b/code/modules/vore/resizing/resize_vr.dm index 39e411d835..e2e5466904 100644 --- a/code/modules/vore/resizing/resize_vr.dm +++ b/code/modules/vore/resizing/resize_vr.dm @@ -289,7 +289,7 @@ for (var/atom/movable/M in prey.loc) if (prey == M || pred == M) continue - if (istype(M, /mob/living)) + if (isliving(M)) var/mob/living/L = M if (!M.CanPass(src, prey.loc) && !(get_effective_size(FALSE) - L.get_effective_size(TRUE) >= size_ratio_needed || L.lying)) can_pass = FALSE diff --git a/code/modules/xenoarcheaology/artifacts/replicator_vr.dm b/code/modules/xenoarcheaology/artifacts/replicator_vr.dm index e8b1ff662a..7126b59083 100644 --- a/code/modules/xenoarcheaology/artifacts/replicator_vr.dm +++ b/code/modules/xenoarcheaology/artifacts/replicator_vr.dm @@ -142,7 +142,7 @@ M.forceMove(new_mob) //Did they put a person in it? - else if(istype(source_material,/mob/living)) + else if(isliving(source_material)) var/mob/living/M = source_material //Start of mob code shamelessly ripped from mouseray new_mob.faction = M.faction @@ -232,7 +232,7 @@ if(response != "Certain") to_chat(user, span_notice("[W] stops you from placing them in the machine.")) return - if(istype(inserted_mob, /mob/living/voice) || W.loc == src) //Sanity. + if(isvoice(inserted_mob) || W.loc == src) //Sanity. return log_and_message_admins("[user] has just placed [inserted_mob] into a mob transformation machine.", user) else @@ -261,13 +261,13 @@ if(response != "Certain") to_chat(user, span_notice("[W] stops you from placing them in the machine.")) return - if(istype(inserted_mob, /mob/living/voice) || W.loc == src) + if(isvoice(inserted_mob) || W.loc == src) return log_and_message_admins("[user] has just placed [inserted_mob] into a mob transformation machine.", user) user.drop_item() //Dropping a grab destroys it. //Grabs require a bit of extra work. //We want them to drop their clothing/items as well. - if(istype(inserted_mob, /mob/living/carbon/human)) //So, this WORKS. Works very well! + if(ishuman(inserted_mob)) //So, this WORKS. Works very well! var/mob/living/carbon/human/inserted_human = inserted_mob for(var/obj/item/I in inserted_mob) if(istype(I, /obj/item/implant) || istype(I, /obj/item/nif)) @@ -287,7 +287,7 @@ if(istype(W, /obj/item/holder/micro)) //I hate this but it's the only way to get their stuff to drop. var/obj/item/holder/micro/micro_holder = W var/mob/living/inserted_mob = micro_holder.held_mob //Get the actual mob. - if(istype(inserted_mob, /mob/living/carbon/human)) //Only humans have the drop_from_inventory proc. + if(ishuman(inserted_mob)) //Only humans have the drop_from_inventory proc. var/mob/living/carbon/human/inserted_human = inserted_mob for(var/obj/item/I in inserted_human) //Drop any remaining items! This only really seems to affect hands. if(istype(I, /obj/item/implant) || istype(I, /obj/item/nif)) @@ -451,7 +451,7 @@ M.forceMove(possessed_voice) //Places them in the 'voice' for later recovery! Essentially: The item contains a 'possessed voice' mob, which contains their original mob. - else if(istype(source_material,/mob/living))//Did they shove a person in there normally? + else if(isliving(source_material))//Did they shove a person in there normally? var/mob/living/M = source_material //If so, this cuts down the work we have to do! M.release_vore_contents(TRUE, TRUE) //Release their stomach contents. Don't spam the chat, either. spawned_obj.inhabit_item(M, original_name, M) @@ -500,7 +500,7 @@ if(response != "I accept the possibilities") to_chat(user, span_notice("[W] stops you from placing them in the machine.")) return - if(istype(inserted_mob, /mob/living/voice) || W.loc == src) //This is a sanity check to keep them from entering it multiple times. + if(isvoice(inserted_mob) || W.loc == src) //This is a sanity check to keep them from entering it multiple times. return log_and_message_admins("[user] has just placed [inserted_mob] into an item transformation machine.", user) else @@ -529,13 +529,13 @@ if(response != "I accept the possibilities") to_chat(user, span_notice("[W] stops you from placing them in the machine.")) return - if(istype(inserted_mob, /mob/living/voice) || W.loc == src) + if(isvoice(inserted_mob) || W.loc == src) return log_and_message_admins("[user] has just placed [inserted_mob] into an item transformation machine.", user) user.drop_item() //Dropping a grab destroys it. //Grabs require a bit of extra work. //We want them to drop their clothing/items as well. - if(istype(inserted_mob, /mob/living/carbon/human)) //So, this WORKS. Works very well! + if(ishuman(inserted_mob)) //So, this WORKS. Works very well! var/mob/living/carbon/human/inserted_human = inserted_mob for(var/obj/item/I in inserted_mob) if(istype(I, /obj/item/implant) || istype(I, /obj/item/nif)) @@ -553,7 +553,7 @@ if(istype(W, /obj/item/holder/micro)) //I hate this but it's the only way to get their stuff to drop. var/obj/item/holder/micro/micro_holder = W var/mob/living/inserted_mob = micro_holder.held_mob //Get the actual mob. - if(istype(inserted_mob, /mob/living/carbon/human)) //Only humans have the drop_from_inventory proc. + if(ishuman(inserted_mob)) //Only humans have the drop_from_inventory proc. var/mob/living/carbon/human/inserted_human = inserted_mob for(var/obj/item/I in inserted_human) //Drop any remaining items! This only really seems to affect hands. if(istype(I, /obj/item/implant) || istype(I, /obj/item/nif)) diff --git a/code/modules/xenoarcheaology/boulder.dm b/code/modules/xenoarcheaology/boulder.dm index bfc9d6e0fc..18cfe19fbd 100644 --- a/code/modules/xenoarcheaology/boulder.dm +++ b/code/modules/xenoarcheaology/boulder.dm @@ -86,7 +86,7 @@ /obj/structure/boulder/Bumped(AM) . = ..() - if(istype(AM,/mob/living/carbon/human)) + if(ishuman(AM)) var/mob/living/carbon/human/H = AM var/obj/item/pickaxe/P = H.get_inactive_hand() if(istype(P)) diff --git a/code/modules/xenoarcheaology/effects/badfeeling.dm b/code/modules/xenoarcheaology/effects/badfeeling.dm index 28b0d6eb15..df6383137c 100644 --- a/code/modules/xenoarcheaology/effects/badfeeling.dm +++ b/code/modules/xenoarcheaology/effects/badfeeling.dm @@ -30,7 +30,7 @@ /datum/artifact_effect/badfeeling/DoEffectTouch(var/mob/user) if(user) - if (istype(user, /mob/living/carbon/human)) + if (ishuman(user)) var/mob/living/carbon/human/H = user if(prob(50)) if(prob(75)) diff --git a/code/modules/xenoarcheaology/effects/cannibal.dm b/code/modules/xenoarcheaology/effects/cannibal.dm index dd842c4ec4..fb2a33380f 100644 --- a/code/modules/xenoarcheaology/effects/cannibal.dm +++ b/code/modules/xenoarcheaology/effects/cannibal.dm @@ -30,7 +30,7 @@ /datum/artifact_effect/cannibalfeeling/DoEffectTouch(var/mob/user) if(user) - if (istype(user, /mob/living/carbon/human)) + if (ishuman(user)) var/mob/living/carbon/human/H = user if(H.is_sentient()) if(prob(50)) diff --git a/code/modules/xenoarcheaology/effects/goodfeeling.dm b/code/modules/xenoarcheaology/effects/goodfeeling.dm index 92d267b1f6..ed03f4bd0b 100644 --- a/code/modules/xenoarcheaology/effects/goodfeeling.dm +++ b/code/modules/xenoarcheaology/effects/goodfeeling.dm @@ -28,7 +28,7 @@ /datum/artifact_effect/goodfeeling/DoEffectTouch(var/mob/user) if(user) - if (istype(user, /mob/living/carbon/human)) + if (ishuman(user)) var/mob/living/carbon/human/H = user if(prob(50)) if(prob(75)) diff --git a/code/modules/xenoarcheaology/effects/resurrect.dm b/code/modules/xenoarcheaology/effects/resurrect.dm index 752f2333dd..ceea8871a1 100644 --- a/code/modules/xenoarcheaology/effects/resurrect.dm +++ b/code/modules/xenoarcheaology/effects/resurrect.dm @@ -41,7 +41,7 @@ /datum/artifact_effect/resurrect/proc/attempt_revive(var/mob/living/L = null) var/atom/holder = get_master_holder() spawn() - if(istype(L, /mob/living/simple_mob)) + if(isanimal(L)) var/mob/living/simple_mob/SM = L SM.adjustBruteLoss(-40) SM.adjustFireLoss(-40) diff --git a/code/modules/xenoarcheaology/effects/roboheal.dm b/code/modules/xenoarcheaology/effects/roboheal.dm index f8a1820bcb..a88bc207e6 100644 --- a/code/modules/xenoarcheaology/effects/roboheal.dm +++ b/code/modules/xenoarcheaology/effects/roboheal.dm @@ -10,7 +10,7 @@ /datum/artifact_effect/roboheal/DoEffectTouch(var/mob/user) if(user) - if (istype(user, /mob/living/silicon/robot)) + if (isrobot(user)) var/mob/living/silicon/robot/R = user to_chat(R, span_blue("Your systems report damaged components mending by themselves!")) R.adjustBruteLoss(rand(-10,-30)) diff --git a/code/modules/xenoarcheaology/effects/robohurt.dm b/code/modules/xenoarcheaology/effects/robohurt.dm index 41b8caf72b..67c031049c 100644 --- a/code/modules/xenoarcheaology/effects/robohurt.dm +++ b/code/modules/xenoarcheaology/effects/robohurt.dm @@ -10,7 +10,7 @@ /datum/artifact_effect/robohurt/DoEffectTouch(var/mob/user) if(user) - if (istype(user, /mob/living/silicon/robot)) + if (isrobot(user)) var/mob/living/silicon/robot/R = user to_chat(R, span_red("Your systems report severe damage has been inflicted!")) R.adjustBruteLoss(rand(10,50)) diff --git a/code/modules/xenoarcheaology/finds/special.dm b/code/modules/xenoarcheaology/finds/special.dm index 0892dd4ebc..8eac756fa0 100644 --- a/code/modules/xenoarcheaology/finds/special.dm +++ b/code/modules/xenoarcheaology/finds/special.dm @@ -25,7 +25,7 @@ START_PROCESSING(SSobj, src) /obj/item/clothing/mask/gas/poltergeist/process() - if(heard_talk.len && istype(src.loc, /mob/living) && prob(10)) + if(heard_talk.len && isliving(src.loc) && prob(10)) var/mob/living/M = src.loc M.say(pick(heard_talk)) @@ -34,7 +34,7 @@ if(heard_talk.len > max_stored_messages) heard_talk.Remove(pick(heard_talk)) heard_talk.Add(multilingual_to_message(message_pieces)) - if(istype(src.loc, /mob/living) && world.time - last_twitch > 50) + if(isliving(src.loc) && world.time - last_twitch > 50) last_twitch = world.time diff --git a/code/modules/xenobio/items/slimepotions.dm b/code/modules/xenobio/items/slimepotions.dm index 600ca3264d..d0af937114 100644 --- a/code/modules/xenobio/items/slimepotions.dm +++ b/code/modules/xenobio/items/slimepotions.dm @@ -100,7 +100,7 @@ to_chat(user, span_notice("You feed the slime the agent, removing its hunger and calming it.")) // Simple Mobs. - else if(istype(M, /mob/living/simple_mob)) + else if(isanimal(M)) var/mob/living/simple_mob/SM = M if(!(SM.mob_class & MOB_CLASS_SLIME|MOB_CLASS_ANIMAL)) // So you can't use this on Russians/syndies/hivebots/etc. to_chat(user, span_warning("\The [SM] only works on slimes and animals.")) diff --git a/code/modules/xenobio/items/weapons.dm b/code/modules/xenobio/items/weapons.dm index cbfab6d0c4..288820dd18 100644 --- a/code/modules/xenobio/items/weapons.dm +++ b/code/modules/xenobio/items/weapons.dm @@ -90,7 +90,7 @@ VORESTATION REMOVAL agony = 3 /obj/item/projectile/beam/stun/xeno/on_hit(var/atom/target, var/blocked = 0, var/def_zone = null) - if(istype(target, /mob/living)) + if(isliving(target)) var/mob/living/L = target if(L.mob_class & MOB_CLASS_SLIME) if(isslime(L)) diff --git a/code/modules/xenobio/items/weapons_vr.dm b/code/modules/xenobio/items/weapons_vr.dm index 210e3139d8..10160efc2d 100644 --- a/code/modules/xenobio/items/weapons_vr.dm +++ b/code/modules/xenobio/items/weapons_vr.dm @@ -82,7 +82,7 @@ to_chat(user,span_warning("Your rehydrator flashes an error as it attempts to process your target.")) playsound(src, 'sound/weapons/empty.ogg', 50, 1) return - if(istype(A, /mob/living)) + if(isliving(A)) to_chat(user,span_warning("The rehydrator's saftey systems prevent firing into living creatures!")) playsound(src, 'sound/weapons/empty.ogg', 50, 1) return @@ -138,7 +138,7 @@ if(S.stat != DEAD) return FALSE return TRUE - if(istype(AM, /mob/living/carbon/human)) + if(ishuman(AM)) var/mob/living/carbon/human/H = AM if(!istype(H.species, /datum/species/monkey)) return FALSE diff --git a/code/modules/xenobio/machinery/processor.dm b/code/modules/xenobio/machinery/processor.dm index 28146bd6b5..00f7799494 100644 --- a/code/modules/xenobio/machinery/processor.dm +++ b/code/modules/xenobio/machinery/processor.dm @@ -89,7 +89,7 @@ to_be_processed.Remove(S) qdel(S) - if(istype(AM, /mob/living/carbon/human)) + if(ishuman(AM)) var/mob/living/carbon/human/M = AM playsound(src, 'sound/effects/splat.ogg', 50, 1) to_be_processed.Remove(M) @@ -103,7 +103,7 @@ if(S.stat != DEAD) return FALSE return TRUE - if(istype(AM, /mob/living/carbon/human)) + if(ishuman(AM)) var/mob/living/carbon/human/H = AM if(!istype(H.species, /datum/species/monkey)) return FALSE diff --git a/code/modules/xenobio2/tools/xeno_trait_scanner.dm b/code/modules/xenobio2/tools/xeno_trait_scanner.dm index 5b00748eda..f40145b329 100644 --- a/code/modules/xenobio2/tools/xeno_trait_scanner.dm +++ b/code/modules/xenobio2/tools/xeno_trait_scanner.dm @@ -26,7 +26,7 @@ var/obj/item/paper/P = new /obj/item/paper(get_turf(src)) P.name = "paper - [form_title]" P.info = "[last_data]" - if(istype(user,/mob/living/carbon/human)) + if(ishuman(user)) user.put_in_hands(P) user.visible_message("\The [src] spits out a piece of paper.") return diff --git a/maps/RandomZLevels/stationCollision.dm b/maps/RandomZLevels/stationCollision.dm index 3ea3aa7355..e6d8ea489e 100644 --- a/maps/RandomZLevels/stationCollision.dm +++ b/maps/RandomZLevels/stationCollision.dm @@ -182,7 +182,7 @@ var/sc_safecode5 = "[rand(0,9)]" /obj/machinery/singularity/narsie/sc_Narsie/consume(var/atom/A) if(is_type_in_list(A, uneatable)) return 0 - if (istype(A,/mob/living)) + if (isliving(A)) var/mob/living/L = A L.gib() else if(istype(A,/obj/)) diff --git a/maps/gateway_archive_vr/labyrinth.dm b/maps/gateway_archive_vr/labyrinth.dm index 7290806b9a..8c87c573bf 100644 --- a/maps/gateway_archive_vr/labyrinth.dm +++ b/maps/gateway_archive_vr/labyrinth.dm @@ -168,7 +168,7 @@ playsound(chassis, 'sound/items/AirHorn.ogg', 100, 1) chassis.occupant_message(span_infoplain(span_red(span_giant("HONK")))) for(var/mob/living/carbon/M in ohearers(6, chassis)) - if(istype(M, /mob/living/carbon/human)) + if(ishuman(M)) var/mob/living/carbon/human/H = M if(istype(H.l_ear, /obj/item/clothing/ears/earmuffs) || istype(H.r_ear, /obj/item/clothing/ears/earmuffs)) continue diff --git a/maps/gateway_archive_vr/stationCollision.dm b/maps/gateway_archive_vr/stationCollision.dm index c507cc0895..0b53d9a452 100644 --- a/maps/gateway_archive_vr/stationCollision.dm +++ b/maps/gateway_archive_vr/stationCollision.dm @@ -182,7 +182,7 @@ var/sc_safecode5 = "[rand(0,9)]" /obj/machinery/singularity/narsie/sc_Narsie/consume(var/atom/A) if(is_type_in_list(A, uneatable)) return 0 - if (istype(A,/mob/living)) + if (isliving(A)) var/mob/living/L = A L.gib() else if(istype(A,/obj/)) diff --git a/maps/gateway_archive_vr/wildwest.dm b/maps/gateway_archive_vr/wildwest.dm index 510e8014af..9265e85fa0 100644 --- a/maps/gateway_archive_vr/wildwest.dm +++ b/maps/gateway_archive_vr/wildwest.dm @@ -27,7 +27,7 @@ to_chat(user, "The Wish Granter lies silent.") return - else if(!istype(user, /mob/living/carbon/human)) + else if(!ishuman(user)) to_chat(user, "You feel a dark stirring inside of the Wish Granter, something you want nothing of. Your instincts are better than any man's.") return @@ -120,7 +120,7 @@ if(triggered) return - if(istype(M, /mob/living/carbon/human) || istype(M, /mob/living/carbon/monkey)) + if(ishuman(M) || istype(M, /mob/living/carbon/monkey)) for(var/mob/O in viewers(world.view, src.loc)) to_chat(O, span_red("[M] triggered the [icon2html(src, O.client)] [src]")) triggered = 1 diff --git a/maps/gateway_vr/wildwest.dm b/maps/gateway_vr/wildwest.dm index 1e16c09f6d..3bbd1fee76 100644 --- a/maps/gateway_vr/wildwest.dm +++ b/maps/gateway_vr/wildwest.dm @@ -31,7 +31,7 @@ to_chat(user, "The Wish Granter lies silent.") return - else if(!istype(user, /mob/living/carbon/human)) + else if(!ishuman(user)) to_chat(user, "You feel a dark stirring inside of the Wish Granter, something you want nothing of. Your instincts are better than any man's.") return @@ -123,7 +123,7 @@ if(triggered) return - if(istype(M, /mob/living/carbon/human) || istype(M, /mob/living/carbon/monkey)) + if(ishuman(M) || istype(M, /mob/living/carbon/monkey)) for(var/mob/O in viewers(world.view, src.loc)) to_chat(O, "[M] triggered the [icon2html(src)] [src]") triggered = 1