diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm index 56cf125ad71..bcdb727781f 100644 --- a/code/__HELPERS/game.dm +++ b/code/__HELPERS/game.dm @@ -348,7 +348,7 @@ continue else if(afk_check && M.client.is_afk()) continue - else if(human_check && !istype(M, /mob/living/carbon/human)) + else if(human_check && !ishuman(M)) continue else if(istype(M, /mob/new_player)) // exclude people in the lobby continue diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index d90ae1925bb..d38f50c01a3 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -971,7 +971,7 @@ var/list/WALLITEMS_INVERSE = list( /proc/is_A_facing_B(atom/A,atom/B) if(!istype(A) || !istype(B)) return 0 - if(istype(A, /mob/living)) + if(isliving(A)) var/mob/living/LA = A if(LA.lying) return 0 diff --git a/code/datums/diseases/_MobProcs.dm b/code/datums/diseases/_MobProcs.dm index 001614a66aa..f4b1fb0c031 100644 --- a/code/datums/diseases/_MobProcs.dm +++ b/code/datums/diseases/_MobProcs.dm @@ -82,7 +82,7 @@ var/target_zone = pick(head_ch;1,body_ch;2,hands_ch;3,feet_ch;4) - if(istype(src, /mob/living/carbon/human)) + if(ishuman(src)) var/mob/living/carbon/human/H = src switch(target_zone) @@ -117,7 +117,7 @@ Cl = H.shoes passed = prob((Cl.permeability_coefficient*100) - 1) - else if(istype(src, /mob/living/carbon/monkey)) + else if(ismonkey(src)) var/mob/living/carbon/monkey/M = src switch(target_zone) if(1) diff --git a/code/datums/diseases/advance/symptoms/beard.dm b/code/datums/diseases/advance/symptoms/beard.dm index 37ff9f7a4ac..3c26bcd4d65 100644 --- a/code/datums/diseases/advance/symptoms/beard.dm +++ b/code/datums/diseases/advance/symptoms/beard.dm @@ -28,7 +28,7 @@ BONUS ..() if(prob(SYMPTOM_ACTIVATION_PROB)) var/mob/living/M = A.affected_mob - if(istype(M, /mob/living/carbon/human)) + if(ishuman(M)) var/mob/living/carbon/human/H = M switch(A.stage) if(1, 2) diff --git a/code/datums/diseases/advance/symptoms/damage_converter.dm b/code/datums/diseases/advance/symptoms/damage_converter.dm index ab79e52eb87..6216d05b924 100644 --- a/code/datums/diseases/advance/symptoms/damage_converter.dm +++ b/code/datums/diseases/advance/symptoms/damage_converter.dm @@ -87,7 +87,7 @@ Bonus var/get_damage = rand(1, 2) - if(istype(M, /mob/living/carbon/human)) + if(ishuman(M)) var/mob/living/carbon/human/H = M var/list/parts = H.get_damaged_bodyparts(1,1) diff --git a/code/datums/diseases/advance/symptoms/shedding.dm b/code/datums/diseases/advance/symptoms/shedding.dm index 900ffbc60b3..add3c6e1c61 100644 --- a/code/datums/diseases/advance/symptoms/shedding.dm +++ b/code/datums/diseases/advance/symptoms/shedding.dm @@ -29,7 +29,7 @@ BONUS if(prob(SYMPTOM_ACTIVATION_PROB)) var/mob/living/M = A.affected_mob M << "[pick("Your scalp itches.", "Your skin feels flakey.")]" - if(istype(M, /mob/living/carbon/human)) + if(ishuman(M)) var/mob/living/carbon/human/H = M switch(A.stage) if(3, 4) diff --git a/code/datums/diseases/advance/symptoms/skin.dm b/code/datums/diseases/advance/symptoms/skin.dm index 09ffbdf7e81..09b0f0a6de3 100644 --- a/code/datums/diseases/advance/symptoms/skin.dm +++ b/code/datums/diseases/advance/symptoms/skin.dm @@ -28,7 +28,7 @@ BONUS ..() if(prob(SYMPTOM_ACTIVATION_PROB)) var/mob/living/M = A.affected_mob - if(istype(M, /mob/living/carbon/human)) + if(ishuman(M)) var/mob/living/carbon/human/H = M if(H.skin_tone == "albino") return @@ -72,7 +72,7 @@ BONUS ..() if(prob(SYMPTOM_ACTIVATION_PROB)) var/mob/living/M = A.affected_mob - if(istype(M, /mob/living/carbon/human)) + if(ishuman(M)) var/mob/living/carbon/human/H = M if(H.skin_tone == "african2") return diff --git a/code/datums/diseases/advance/symptoms/youth.dm b/code/datums/diseases/advance/symptoms/youth.dm index 6d90d2b8cdc..d7607ed4f0e 100644 --- a/code/datums/diseases/advance/symptoms/youth.dm +++ b/code/datums/diseases/advance/symptoms/youth.dm @@ -28,7 +28,7 @@ BONUS ..() if(prob(SYMPTOM_ACTIVATION_PROB * 2)) var/mob/living/M = A.affected_mob - if(istype(M, /mob/living/carbon/human)) + if(ishuman(M)) var/mob/living/carbon/human/H = M switch(A.stage) if(1) diff --git a/code/datums/diseases/wizarditis.dm b/code/datums/diseases/wizarditis.dm index 2e6d2a52cce..ab0d309edcc 100644 --- a/code/datums/diseases/wizarditis.dm +++ b/code/datums/diseases/wizarditis.dm @@ -55,7 +55,7 @@ STI KALY - blind /datum/disease/wizarditis/proc/spawn_wizard_clothes(chance = 0) - if(istype(affected_mob, /mob/living/carbon/human)) + if(ishuman(affected_mob)) var/mob/living/carbon/human/H = affected_mob if(prob(chance)) if(!istype(H.head, /obj/item/clothing/head/wizard)) diff --git a/code/datums/helper_datums/teleport.dm b/code/datums/helper_datums/teleport.dm index c00950a6fee..f3751587530 100644 --- a/code/datums/helper_datums/teleport.dm +++ b/code/datums/helper_datums/teleport.dm @@ -167,7 +167,7 @@ var/list/bagholding = teleatom.search_contents_for(/obj/item/weapon/storage/backpack/holding) if(bagholding.len) precision = max(rand(1,100)*bagholding.len,100) - if(istype(teleatom, /mob/living)) + if(isliving(teleatom)) var/mob/living/MM = teleatom MM << "The bluespace interface on your bag of holding interferes with the teleport!" return 1 diff --git a/code/datums/mind.dm b/code/datums/mind.dm index b7c70b57878..baa1d2eac21 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -512,9 +512,9 @@ if (ticker.mode.config_tag=="monkey") text = uppertext(text) text = "[text]: " - if (istype(current, /mob/living/carbon/human)) + if (ishuman(current)) text += "healthy|infected|HUMAN|other" - else if (istype(current, /mob/living/carbon/monkey)) + else if (ismonkey(current)) var/found = 0 for(var/datum/disease/D in current.viruses) if(istype(D, /datum/disease/transformation/jungle_fever)) found = 1 @@ -583,10 +583,7 @@ out += sections[i]+"
" - if (((src in ticker.mode.head_revolutionaries) || \ - (src in ticker.mode.traitors) || \ - (src in ticker.mode.syndicates)) && \ - istype(current,/mob/living/carbon/human) ) + if(((src in ticker.mode.head_revolutionaries) || (src in ticker.mode.traitors) || (src in ticker.mode.syndicates)) && ishuman(current)) text = "Uplink: give" var/obj/item/device/uplink/U = find_syndicate_uplink() @@ -662,7 +659,7 @@ if ("assassinate","protect","debrain","maroon") 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 @@ -1298,7 +1295,7 @@ if(spawnloc) current.loc = spawnloc - if(istype(current, /mob/living/carbon/human)) + if(ishuman(current)) var/mob/living/carbon/human/H = current qdel(H.belt) qdel(H.back) diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index 83648e92d7a..cc1a8f561af 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -324,7 +324,7 @@ /area/Entered(A) - if(!istype(A,/mob/living)) + if(!isliving(A)) return var/mob/living/L = A diff --git a/code/game/atoms.dm b/code/game/atoms.dm index f08316fc060..fbbde83a9db 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -77,7 +77,7 @@ reagents.conditional_update() else if(istype(A, /atom/movable)) var/atom/movable/M = A - if(istype(M.loc, /mob/living)) + if(isliving(M.loc)) var/mob/living/L = M.loc L.unEquip(M) M.loc = src diff --git a/code/game/gamemodes/antag_spawner.dm b/code/game/gamemodes/antag_spawner.dm index a94738c6dc4..2aecd4f054b 100644 --- a/code/game/gamemodes/antag_spawner.dm +++ b/code/game/gamemodes/antag_spawner.dm @@ -47,7 +47,7 @@ if(H.stat || H.restrained()) return - if(!istype(H, /mob/living/carbon/human)) + if(!ishuman(H)) return 1 if(loc == H || (in_range(src, H) && istype(loc, /turf))) diff --git a/code/game/gamemodes/devil/devil.dm b/code/game/gamemodes/devil/devil.dm index 743e95ad910..0aafc57ccb5 100644 --- a/code/game/gamemodes/devil/devil.dm +++ b/code/game/gamemodes/devil/devil.dm @@ -20,7 +20,7 @@ var/global/list/whiteness = list ( /mob/living/proc/check_devil_bane_multiplier(obj/item/weapon, mob/living/attacker) switch(mind.devilinfo.bane) if(BANE_WHITECLOTHES) - if(istype(attacker, /mob/living/carbon/human)) + if(ishuman(attacker)) var/mob/living/carbon/human/H = attacker if(H.w_uniform && istype(H.w_uniform, /obj/item/clothing/under)) var/obj/item/clothing/under/U = H.w_uniform diff --git a/code/game/gamemodes/devil/devilinfo.dm b/code/game/gamemodes/devil/devilinfo.dm index 0b9b4b59213..313843d580b 100644 --- a/code/game/gamemodes/devil/devilinfo.dm +++ b/code/game/gamemodes/devil/devilinfo.dm @@ -186,7 +186,7 @@ var/global/list/lawlorify = list ( /datum/devilinfo/proc/regress_humanoid() owner.current << "Your powers weaken, have more contracts be signed to regain power." - if(istype(owner.current, /mob/living/carbon/human)) + if(ishuman(owner.current)) var/mob/living/carbon/human/H = owner.current H.set_species(/datum/species/human, 1) H.regenerate_icons() @@ -209,7 +209,7 @@ var/global/list/lawlorify = list ( /datum/devilinfo/proc/increase_blood_lizard() owner.current << "You feel as though your humanoid form is about to shed. You will soon turn into a blood lizard." sleep(50) - if(istype(owner.current, /mob/living/carbon/human)) + if(ishuman(owner.current)) var/mob/living/carbon/human/H = owner.current H.set_species(/datum/species/lizard, 1) H.underwear = "Nude" @@ -374,7 +374,7 @@ var/global/list/lawlorify = list ( return 0 return 1 if(BANISH_FUNERAL_GARB) - if(istype(body, /mob/living/carbon/human)) + if(ishuman(body)) var/mob/living/carbon/human/H = body if(H.w_uniform && istype(H.w_uniform, /obj/item/clothing/under/burial)) return 1 diff --git a/code/game/gamemodes/meteor/meteors.dm b/code/game/gamemodes/meteor/meteors.dm index a1272ee75da..194a0bca0af 100644 --- a/code/game/gamemodes/meteor/meteors.dm +++ b/code/game/gamemodes/meteor/meteors.dm @@ -140,7 +140,7 @@ //first bust whatever is in the turf for(var/atom/A in T) if(A != src) - if(istype(A, /mob/living)) + if(isliving(A)) A.visible_message("[src] slams into [A].", "[src] slams into you!.") A.ex_act(hitpwr) diff --git a/code/game/gamemodes/miniantags/abduction/abduction_gear.dm b/code/game/gamemodes/miniantags/abduction/abduction_gear.dm index da641ae216c..7cb4fd7fccb 100644 --- a/code/game/gamemodes/miniantags/abduction/abduction_gear.dm +++ b/code/game/gamemodes/miniantags/abduction/abduction_gear.dm @@ -32,7 +32,7 @@ mode = VEST_STEALTH armor = stealth_armor icon_state = "vest_stealth" - if(istype(loc, /mob/living/carbon/human)) + if(ishuman(loc)) var/mob/living/carbon/human/H = loc H.update_inv_wear_suit() for(var/X in actions) @@ -50,7 +50,7 @@ if(disguise == null) return stealth_active = 1 - if(istype(loc, /mob/living/carbon/human)) + if(ishuman(loc)) var/mob/living/carbon/human/M = loc PoolOrNew(/obj/effect/overlay/temp/dir_setting/ninja/cloak, list(get_turf(M), M.dir)) @@ -64,7 +64,7 @@ if(!stealth_active) return stealth_active = 0 - if(istype(loc, /mob/living/carbon/human)) + if(ishuman(loc)) var/mob/living/carbon/human/M = loc PoolOrNew(/obj/effect/overlay/temp/dir_setting/ninja, list(get_turf(M), M.dir)) @@ -91,7 +91,7 @@ ActivateStealth() /obj/item/clothing/suit/armor/abductor/vest/proc/Adrenaline() - if(istype(loc, /mob/living/carbon/human)) + if(ishuman(loc)) if(combat_cooldown != initial(combat_cooldown)) loc << "Combat injection is still recharging." return @@ -172,7 +172,7 @@ mark(target, user) /obj/item/device/abductor/gizmo/proc/scan(atom/target, mob/living/user) - if(istype(target,/mob/living/carbon/human)) + if(ishuman(target)) if(console!=null) console.AddSnapshot(target) user << "You scan [target] and add them to the database." @@ -181,7 +181,7 @@ if(marked == target) user << "This specimen is already marked!" return - if(istype(target,/mob/living/carbon/human)) + if(ishuman(target)) if(isabductor(target)) marked = target user << "You mark [target] for future retrieval." diff --git a/code/game/gamemodes/nuclear/nuclear.dm b/code/game/gamemodes/nuclear/nuclear.dm index 0270d153573..c07253e0ac8 100644 --- a/code/game/gamemodes/nuclear/nuclear.dm +++ b/code/game/gamemodes/nuclear/nuclear.dm @@ -166,7 +166,7 @@ /datum/game_mode/proc/are_operatives_dead() for(var/datum/mind/operative_mind in syndicates) - if (istype(operative_mind.current,/mob/living/carbon/human) && (operative_mind.current.stat!=2)) + if(ishuman(operative_mind.current) && (operative_mind.current.stat!=2)) return 0 return 1 diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index 8fd17b07c30..3e1bc6256a8 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -323,7 +323,7 @@ var/area/A = SSshuttle.emergency.areaInstance for(var/mob/living/player in player_list) - if(get_area(player) == A && player.mind && player.stat != DEAD && istype(player, /mob/living/carbon/human)) + if(get_area(player) == A && player.mind && player.stat != DEAD && ishuman(player)) var/mob/living/carbon/human/H = player if(H.dna.species.id != "human") return 0 diff --git a/code/game/gamemodes/wizard/artefact.dm b/code/game/gamemodes/wizard/artefact.dm index 7bd85dfdd35..14e475144e0 100644 --- a/code/game/gamemodes/wizard/artefact.dm +++ b/code/game/gamemodes/wizard/artefact.dm @@ -172,7 +172,7 @@ return for(var/X in spooky_scaries) - if(!istype(X, /mob/living/carbon/human)) + if(!ishuman(X)) spooky_scaries.Remove(X) continue var/mob/living/carbon/human/H = X diff --git a/code/game/gamemodes/wizard/soulstone.dm b/code/game/gamemodes/wizard/soulstone.dm index 0cb14a1f13d..4cdd7123f1f 100644 --- a/code/game/gamemodes/wizard/soulstone.dm +++ b/code/game/gamemodes/wizard/soulstone.dm @@ -53,7 +53,7 @@ user << "There is no power left in the shard.\ " return - if(!istype(M, /mob/living/carbon/human))//If target is not a human. + if(!ishuman(M))//If target is not a human. return ..() if(iscultist(M)) user << "\"Come now, do not capture your fellow's soul.\"" diff --git a/code/game/gamemodes/wizard/spellbook.dm b/code/game/gamemodes/wizard/spellbook.dm index 5cb7ec18535..5718c688989 100644 --- a/code/game/gamemodes/wizard/spellbook.dm +++ b/code/game/gamemodes/wizard/spellbook.dm @@ -657,7 +657,7 @@ if(H.stat || H.restrained()) return - if(!istype(H, /mob/living/carbon/human)) + if(!ishuman(H)) return 1 if(H.mind.special_role == "apprentice") @@ -833,7 +833,7 @@ desc = "This book is more horse than your mind has room for." /obj/item/weapon/spellbook/oneuse/barnyard/recoil(mob/living/carbon/user) - if(istype(user, /mob/living/carbon/human)) + if(ishuman(user)) user <<"HOR-SIE HAS RISEN" var/obj/item/clothing/mask/horsehead/magichead = new /obj/item/clothing/mask/horsehead magichead.flags |= NODROP //curses! diff --git a/code/game/machinery/camera/tracking.dm b/code/game/machinery/camera/tracking.dm index f4bd51ef02f..89080938269 100644 --- a/code/game/machinery/camera/tracking.dm +++ b/code/game/machinery/camera/tracking.dm @@ -54,7 +54,7 @@ // Human check var/human = 0 - if(istype(M, /mob/living/carbon/human)) + if(ishuman(M)) human = 1 var/name = M.name diff --git a/code/game/machinery/computer/medical.dm b/code/game/machinery/computer/medical.dm index 62c7230851b..c9d112e27e9 100644 --- a/code/game/machinery/computer/medical.dm +++ b/code/game/machinery/computer/medical.dm @@ -212,7 +212,7 @@ src.temp = null if(href_list["scan"]) if(src.scan) - if(istype(usr,/mob/living/carbon/human) && !usr.get_active_held_item()) + if(ishuman(usr) && !usr.get_active_held_item()) usr.put_in_hands(scan) else scan.loc = get_turf(src) diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm index d1b5a3e5baa..a742d120f0b 100644 --- a/code/game/machinery/computer/security.dm +++ b/code/game/machinery/computer/security.dm @@ -295,7 +295,7 @@ What a mess.*/ if("Confirm Identity") if(scan) - if(istype(usr,/mob/living/carbon/human) && !usr.get_active_held_item()) + if(ishuman(usr) && !usr.get_active_held_item()) usr.put_in_hands(scan) else scan.loc = get_turf(src) diff --git a/code/game/machinery/firealarm.dm b/code/game/machinery/firealarm.dm index 3d319be807b..1d9ef9bd082 100644 --- a/code/game/machinery/firealarm.dm +++ b/code/game/machinery/firealarm.dm @@ -244,7 +244,7 @@ var/area/A = src.loc var/d1 var/dat - if (istype(user, /mob/living/carbon/human) || user.has_unlimited_silicon_privilege) + if(ishuman(user) || user.has_unlimited_silicon_privilege) A = A.loc if (A.party) diff --git a/code/game/machinery/iv_drip.dm b/code/game/machinery/iv_drip.dm index f9f3439b6ac..51be5c91094 100644 --- a/code/game/machinery/iv_drip.dm +++ b/code/game/machinery/iv_drip.dm @@ -154,7 +154,7 @@ set name = "Remove IV Container" set src in view(1) - if(!istype(usr, /mob/living)) + if(!isliving(usr)) usr << "You can't do that!" return @@ -171,7 +171,7 @@ set name = "Toggle Mode" set src in view(1) - if(!istype(usr, /mob/living)) + if(!isliving(usr)) usr << "You can't do that!" return diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm index ff65967f610..fb778f0be60 100644 --- a/code/game/machinery/newscaster.dm +++ b/code/game/machinery/newscaster.dm @@ -267,7 +267,7 @@ var/list/obj/machinery/newscaster/allCasters = list() /obj/machinery/newscaster/attack_hand(mob/user) if(stat & (NOPOWER|BROKEN)) return - if(istype(user, /mob/living/carbon/human) || istype(user,/mob/living/silicon) ) + if(ishuman(user) || issilicon(user)) var/mob/living/human_or_robot_user = user var/dat scan_user(human_or_robot_user) diff --git a/code/game/machinery/porta_turret/portable_turret.dm b/code/game/machinery/porta_turret/portable_turret.dm index 2d7a16be1e2..6afc1d4855c 100644 --- a/code/game/machinery/porta_turret/portable_turret.dm +++ b/code/game/machinery/porta_turret/portable_turret.dm @@ -197,7 +197,7 @@ "[stun_all ? "Yes" : "No"]", "[check_anomalies ? "Yes" : "No"]" ) else - if(istype(user,/mob/living/carbon/human)) + if(ishuman(user)) var/mob/living/carbon/human/H = user if(lasercolor == "b" && istype(H.wear_suit, /obj/item/clothing/suit/redtag)) return @@ -471,7 +471,7 @@ continue //if the target is a human and not in our faction, analyze threat level - if(istype(C, /mob/living/carbon/human) && !in_faction(C)) + if(ishuman(C) && !in_faction(C)) if(assess_perp(C) >= 4) targets += C diff --git a/code/game/mecha/equipment/tools/work_tools.dm b/code/game/mecha/equipment/tools/work_tools.dm index f4f33c7a40c..139dd0db77f 100644 --- a/code/game/mecha/equipment/tools/work_tools.dm +++ b/code/game/mecha/equipment/tools/work_tools.dm @@ -50,7 +50,7 @@ else occupant_message("[target] is firmly secured!") - else if(istype(target,/mob/living)) + else if(isliving(target)) var/mob/living/M = target if(M.stat == DEAD) return if(chassis.occupant.a_intent == "harm") @@ -99,7 +99,7 @@ else occupant_message("[target] is firmly secured!") - else if(istype(target,/mob/living)) + else if(isliving(target)) var/mob/living/M = target if(M.stat == DEAD) return if(chassis.occupant.a_intent == "harm") diff --git a/code/game/mecha/equipment/weapons/weapons.dm b/code/game/mecha/equipment/weapons/weapons.dm index ba7ef9d54c2..81f693e4c8f 100644 --- a/code/game/mecha/equipment/weapons/weapons.dm +++ b/code/game/mecha/equipment/weapons/weapons.dm @@ -154,7 +154,7 @@ playsound(chassis, 'sound/items/AirHorn.ogg', 100, 1) chassis.occupant_message("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.ears, /obj/item/clothing/ears/earmuffs)) continue diff --git a/code/game/objects/effects/decals/Cleanable/misc.dm b/code/game/objects/effects/decals/Cleanable/misc.dm index e07a94d73e1..885ab1d6be1 100644 --- a/code/game/objects/effects/decals/Cleanable/misc.dm +++ b/code/game/objects/effects/decals/Cleanable/misc.dm @@ -88,9 +88,9 @@ var/list/viruses = list() /obj/effect/decal/cleanable/vomit/attack_hand(var/mob/user) - if(istype(user,/mob/living/carbon/human)) + if(ishuman(user)) var/mob/living/carbon/human/H = user - if(H.dna.species.id == "fly") + if(isflyperson(H)) playsound(get_turf(src), 'sound/items/drink.ogg', 50, 1) //slurp H.visible_message("[H] extends a small proboscis into the vomit pool, sucking it with a slurping sound.") if(reagents) diff --git a/code/game/objects/effects/spiders.dm b/code/game/objects/effects/spiders.dm index 48b7a88f0b7..550e8e4e690 100644 --- a/code/game/objects/effects/spiders.dm +++ b/code/game/objects/effects/spiders.dm @@ -56,7 +56,7 @@ if(height==0) return 1 if(istype(mover, /mob/living/simple_animal/hostile/poison/giant_spider)) return 1 - else if(istype(mover, /mob/living)) + else if(isliving(mover)) if(prob(50)) mover << "You get stuck in \the [src] for a moment." return 0 diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm index f2932a64dd6..c7e7602ca53 100644 --- a/code/game/objects/items/devices/flashlight.dm +++ b/code/game/objects/items/devices/flashlight.dm @@ -56,7 +56,7 @@ return var/mob/living/carbon/human/H = M //mob has protective eyewear - if(istype(M, /mob/living/carbon/human) && ((H.head && H.head.flags_cover & HEADCOVERSEYES) || (H.wear_mask && H.wear_mask.flags_cover & MASKCOVERSEYES) || (H.glasses && H.glasses.flags_cover & GLASSESCOVERSEYES))) + if(ishuman(M) && ((H.head && H.head.flags_cover & HEADCOVERSEYES) || (H.wear_mask && H.wear_mask.flags_cover & MASKCOVERSEYES) || (H.glasses && H.glasses.flags_cover & GLASSESCOVERSEYES))) user << "You're going to need to remove that [(H.head && H.head.flags_cover & HEADCOVERSEYES) ? "helmet" : (H.wear_mask && H.wear_mask.flags_cover & MASKCOVERSEYES) ? "mask": "glasses"] first." return diff --git a/code/game/objects/items/devices/radio/electropack.dm b/code/game/objects/items/devices/radio/electropack.dm index caf6e0ba55c..bfd6135bf14 100644 --- a/code/game/objects/items/devices/radio/electropack.dm +++ b/code/game/objects/items/devices/radio/electropack.dm @@ -63,7 +63,7 @@ var/mob/living/carbon/C = usr if(usr.stat || usr.restrained() || C.back == src) 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) && usr.contents.Find(src)) || usr.contents.Find(master) || (in_range(src, usr) && isturf(loc))) usr.set_machine(src) if(href_list["freq"]) SSradio.remove_object(src, frequency) @@ -124,7 +124,7 @@ /obj/item/device/electropack/attack_self(mob/user) - if(!istype(user, /mob/living/carbon/human)) + if(!ishuman(user)) return user.set_machine(src) var/dat = {"Turned [on ? "On" : "Off"] - diff --git a/code/game/objects/items/latexballoon.dm b/code/game/objects/items/latexballoon.dm index 5eba01086ed..bdbc0c0bdac 100644 --- a/code/game/objects/items/latexballoon.dm +++ b/code/game/objects/items/latexballoon.dm @@ -26,7 +26,7 @@ playsound(src, 'sound/weapons/Gunshot.ogg', 100, 1) icon_state = "latexballon_bursted" item_state = "lgloves" - if(istype(src.loc, /mob/living)) + if(isliving(loc)) var/mob/living/user = src.loc user.update_inv_hands() loc.assume_air(air_contents) diff --git a/code/game/objects/items/weapons/cards_ids.dm b/code/game/objects/items/weapons/cards_ids.dm index a68fe241fd3..bd400f6ddce 100644 --- a/code/game/objects/items/weapons/cards_ids.dm +++ b/code/game/objects/items/weapons/cards_ids.dm @@ -145,12 +145,12 @@ update_label("John Doe", "Clowny") if(istype(O, /obj/item/weapon/card/id)) var/obj/item/weapon/card/id/I = O src.access |= I.access - if(istype(user, /mob/living) && user.mind) + if(isliving(user) && user.mind) if(user.mind.special_role) usr << "The card's microscanners activate as you pass it over the ID, copying its access." /obj/item/weapon/card/id/syndicate/attack_self(mob/user) - if(istype(user, /mob/living) && user.mind) + if(isliving(user) && user.mind) if(user.mind.special_role) if(alert(user, "Action", "Agent ID", "Show", "Forge") == "Forge") var t = copytext(sanitize(input(user, "What name would you like to put on this card?", "Agent card name", registered_name ? registered_name : (ishuman(user) ? user.real_name : user.name))as text | null),1,26) diff --git a/code/game/objects/items/weapons/clown_items.dm b/code/game/objects/items/weapons/clown_items.dm index a2846e703b0..956688fa448 100644 --- a/code/game/objects/items/weapons/clown_items.dm +++ b/code/game/objects/items/weapons/clown_items.dm @@ -155,7 +155,7 @@ if (!spam_flag) var/turf/T = get_turf(src) for(M in ohearers(7, T)) - if(istype(M, /mob/living/carbon/human)) + if(ishuman(M)) var/mob/living/carbon/human/H = M if((istype(H.ears, /obj/item/clothing/ears/earmuffs)) || H.ear_deaf) continue diff --git a/code/game/objects/items/weapons/implants/implant.dm b/code/game/objects/items/weapons/implants/implant.dm index 6c99031e8da..f3584d1d094 100644 --- a/code/game/objects/items/weapons/implants/implant.dm +++ b/code/game/objects/items/weapons/implants/implant.dm @@ -47,7 +47,7 @@ for(var/X in actions) var/datum/action/A = X A.Grant(source) - if(istype(source, /mob/living/carbon/human)) + if(ishuman(source)) var/mob/living/carbon/human/H = source H.sec_hud_set_implants() @@ -63,7 +63,7 @@ for(var/X in actions) var/datum/action/A = X A.Grant(source) - if(istype(source, /mob/living/carbon/human)) + if(ishuman(source)) var/mob/living/carbon/human/H = source H.sec_hud_set_implants() diff --git a/code/game/objects/items/weapons/singularityhammer.dm b/code/game/objects/items/weapons/singularityhammer.dm index e8ef7dc9402..27d91f15d16 100644 --- a/code/game/objects/items/weapons/singularityhammer.dm +++ b/code/game/objects/items/weapons/singularityhammer.dm @@ -33,12 +33,14 @@ /obj/item/weapon/twohanded/singularityhammer/proc/vortex(turf/pull, mob/wielder) for(var/atom/X in orange(5,pull)) if(istype(X, /atom/movable)) - if(X == wielder) continue - if((X) &&(!X:anchored) && (!istype(X,/mob/living/carbon/human))) - step_towards(X,pull) - step_towards(X,pull) - step_towards(X,pull) - else if(istype(X,/mob/living/carbon/human)) + var/atom/movable/A = X + if(A == wielder) + continue + if(A && !A.anchored && !ishuman(X)) + step_towards(A,pull) + step_towards(A,pull) + step_towards(A,pull) + else if(ishuman(X)) var/mob/living/carbon/human/H = X if(istype(H.shoes,/obj/item/clothing/shoes/magboots)) var/obj/item/clothing/shoes/magboots/M = H.shoes @@ -99,7 +101,7 @@ /obj/item/weapon/twohanded/mjollnir/throw_impact(atom/target) . = ..() - if(istype(target, /mob/living)) + if(isliving(target)) var/mob/living/L = target L.Stun(3) shock(L) diff --git a/code/game/objects/items/weapons/storage/belt.dm b/code/game/objects/items/weapons/storage/belt.dm index 0b248912b93..d6ef1dac938 100644 --- a/code/game/objects/items/weapons/storage/belt.dm +++ b/code/game/objects/items/weapons/storage/belt.dm @@ -454,7 +454,7 @@ if(contents.len) icon_state += "-sabre" item_state += "-sabre" - if(loc && istype(loc, /mob/living)) + if(loc && isliving(loc)) var/mob/living/L = loc L.regenerate_icons() ..() diff --git a/code/game/objects/items/weapons/storage/storage.dm b/code/game/objects/items/weapons/storage/storage.dm index c7c2889afb2..19b88ca8016 100644 --- a/code/game/objects/items/weapons/storage/storage.dm +++ b/code/game/objects/items/weapons/storage/storage.dm @@ -500,7 +500,7 @@ /obj/item/weapon/storage/emp_act(severity) - if(!istype(loc, /mob/living)) + if(!isliving(loc)) for(var/obj/O in contents) O.emp_act(severity) ..() diff --git a/code/game/objects/items/weapons/tanks/watertank.dm b/code/game/objects/items/weapons/tanks/watertank.dm index 86404905456..9cd88a660a9 100644 --- a/code/game/objects/items/weapons/tanks/watertank.dm +++ b/code/game/objects/items/weapons/tanks/watertank.dm @@ -415,7 +415,7 @@ loc << "[src] turns off." /obj/item/weapon/reagent_containers/chemtank/process() - if(!istype(loc,/mob/living/carbon/human)) + if(!ishuman(loc)) turn_off() return if(!reagents.total_volume) diff --git a/code/game/objects/items/weapons/twohanded.dm b/code/game/objects/items/weapons/twohanded.dm index e597a00abca..58f18f9a493 100644 --- a/code/game/objects/items/weapons/twohanded.dm +++ b/code/game/objects/items/weapons/twohanded.dm @@ -57,7 +57,7 @@ /obj/item/weapon/twohanded/proc/wield(mob/living/carbon/user) if(wielded) return - if(istype(user,/mob/living/carbon/monkey) ) + if(ismonkey(user)) user << "It's too heavy for you to wield fully." return if(user.get_inactive_held_item()) @@ -472,7 +472,7 @@ if(!proximity) return user.faction |= "greytide(\ref[user])" - if(istype(AM, /mob/living)) + if(isliving(AM)) var/mob/living/L = AM if(istype (L, /mob/living/simple_animal/hostile/illusion)) return @@ -523,7 +523,7 @@ return (BRUTELOSS) /obj/item/weapon/twohanded/pitchfork/demonic/pickup(mob/user) - if(istype(user, /mob/living)) + if(isliving(user)) var/mob/living/U = user if(U.mind && !U.mind.devilinfo && (U.mind.soulOwner == U.mind)) //Burn hands unless they are a devil or have sold their soul U.visible_message("As [U] picks [src] up, [U]'s arms briefly catch fire.", \ diff --git a/code/game/objects/structures/noticeboard.dm b/code/game/objects/structures/noticeboard.dm index 411ea3ec003..de2b2a7d24e 100644 --- a/code/game/objects/structures/noticeboard.dm +++ b/code/game/objects/structures/noticeboard.dm @@ -70,7 +70,7 @@ if(href_list["read"]) var/obj/item/weapon/paper/P = locate(href_list["read"]) if((P && P.loc == src)) - if(!( istype(usr, /mob/living/carbon/human) )) + if(!ishuman(usr)) usr << browse("[P.name][stars(P.info)]", "window=[P.name]") onclose(usr, "[P.name]") else diff --git a/code/game/objects/structures/plasticflaps.dm b/code/game/objects/structures/plasticflaps.dm index 8341812fcfc..8aaf18cf5ed 100644 --- a/code/game/objects/structures/plasticflaps.dm +++ b/code/game/objects/structures/plasticflaps.dm @@ -8,8 +8,8 @@ layer = ABOVE_MOB_LAYER /obj/structure/plasticflaps/CanAStarPass(ID, to_dir, caller) - if(istype(caller, /mob/living)) - if(istype(caller,/mob/living/simple_animal/bot)) + if(isliving(caller)) + if(isbot(caller)) return 1 var/mob/living/M = caller @@ -35,9 +35,9 @@ return 0 - else if(istype(A, /mob/living)) // You Shall Not Pass! + else if(isliving(A)) // You Shall Not Pass! var/mob/living/M = A - if(istype(A,/mob/living/simple_animal/bot)) //Bots understand the secrets + if(isbot(A)) //Bots understand the secrets return 1 if(M.buckled && istype(M.buckled, /mob/living/simple_animal/bot/mulebot)) // mulebot passenger gets a free pass. return 1 @@ -64,7 +64,7 @@ /obj/structure/plasticflaps/mining/New() air_update_turf(1) . = ..() - + /obj/structure/plasticflaps/mining/CanAtmosPass() return FALSE diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index d47aaa90f2d..9df8084a3b8 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -1481,7 +1481,7 @@ I.layer = initial(I.layer) I.dropped(M) - 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/sneakers/black(observer), slot_shoes) diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm index b7dc53adae1..27be73487c4 100644 --- a/code/modules/admin/verbs/debug.dm +++ b/code/modules/admin/verbs/debug.dm @@ -241,7 +241,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that if(!ticker || !ticker.mode) alert("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].") var/mob/living/carbon/human/H = M spawn(0) @@ -257,7 +257,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that if(!ticker || !ticker.mode) alert("Wait until the game starts") return - if(istype(M, /mob/living/carbon/human)) + if(ishuman(M)) log_admin("[key_name(src)] has blobized [M.key].") var/mob/living/carbon/human/H = M spawn(0) @@ -427,7 +427,7 @@ var/global/list/g_fancy_list_of_types = null if(!ticker || !ticker.mode) alert("Wait until the game starts") return - if (istype(M, /mob/living/carbon/human)) + if(ishuman(M)) var/mob/living/carbon/human/H = M var/obj/item/worn = H.wear_id var/obj/item/weapon/card/id/id = null diff --git a/code/modules/awaymissions/mission_code/stationCollision.dm b/code/modules/awaymissions/mission_code/stationCollision.dm index e213e8e3e3c..cfcca70e208 100644 --- a/code/modules/awaymissions/mission_code/stationCollision.dm +++ b/code/modules/awaymissions/mission_code/stationCollision.dm @@ -175,7 +175,7 @@ var/sc_safecode5 = "[rand(0,9)]" /obj/singularity/narsie/sc_Narsie/consume(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/code/modules/awaymissions/mission_code/wildwest.dm b/code/modules/awaymissions/mission_code/wildwest.dm index a5d07bdc5bb..d6cb20e57e3 100644 --- a/code/modules/awaymissions/mission_code/wildwest.dm +++ b/code/modules/awaymissions/mission_code/wildwest.dm @@ -58,7 +58,7 @@ user << "The Wish Granter lies silent." return - else if(!istype(user, /mob/living/carbon/human)) + else if(!ishuman(user)) 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 @@ -121,15 +121,15 @@ icon_state = "blobpod" var/triggered = 0 -/obj/effect/meatgrinder/Crossed(AM as mob|obj) +/obj/effect/meatgrinder/Crossed(AM) Bumped(AM) -/obj/effect/meatgrinder/Bumped(mob/M as mob|obj) +/obj/effect/meatgrinder/Bumped(mob/M) if(triggered) return - if(istype(M, /mob/living/carbon/human) && M.stat != DEAD && M.ckey) + if(ishuman(M) && M.stat != DEAD && M.ckey) for(var/mob/O in viewers(world.view, src.loc)) visible_message("[M] triggered the [src]!") triggered = 1 diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index a6c062a3642..510a3a523ed 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -437,7 +437,7 @@ BLIND // can't see anything if(user && notifyAttach) user << "You attach [I] to [src]." - if(istype(loc, /mob/living/carbon/human)) + if(ishuman(loc)) var/mob/living/carbon/human/H = loc H.update_inv_w_uniform() @@ -457,7 +457,7 @@ BLIND // can't see anything else user << "You detach [T] from [src] and it falls on the floor." - if(istype(loc, /mob/living/carbon/human)) + if(ishuman(loc)) var/mob/living/carbon/human/H = loc H.update_inv_w_uniform() @@ -517,7 +517,7 @@ BLIND // can't see anything if(3) usr << "Your suit will now report your exact vital lifesigns as well as your coordinate position." - if(istype(loc,/mob/living/carbon/human)) + if(ishuman(loc)) var/mob/living/carbon/human/H = loc if(H.w_uniform == src) H.update_suit_sensors() diff --git a/code/modules/clothing/glasses/engine_goggles.dm b/code/modules/clothing/glasses/engine_goggles.dm index 5f9df788728..a44178fc92f 100644 --- a/code/modules/clothing/glasses/engine_goggles.dm +++ b/code/modules/clothing/glasses/engine_goggles.dm @@ -42,7 +42,7 @@ if(!mode) return - if(!istype(loc,/mob/living/carbon/human)) + if(!ishuman(loc)) invis_update() return @@ -78,7 +78,7 @@ O.invisibility = INVISIBILITY_MAXIMUM /obj/item/clothing/glasses/meson/engine/proc/t_ray_on() - if(!istype(loc,/mob/living/carbon/human)) + if(!ishuman(loc)) return 0 var/mob/living/carbon/human/user = loc diff --git a/code/modules/clothing/head/helmet.dm b/code/modules/clothing/head/helmet.dm index a69289080ce..337442a674e 100644 --- a/code/modules/clothing/head/helmet.dm +++ b/code/modules/clothing/head/helmet.dm @@ -230,7 +230,7 @@ icon_state = state - if(istype(loc, /mob/living/carbon/human)) + if(ishuman(loc)) var/mob/living/carbon/human/H = loc H.update_inv_head() diff --git a/code/modules/clothing/masks/hailer.dm b/code/modules/clothing/masks/hailer.dm index 74113da31e8..bfe675748d6 100644 --- a/code/modules/clothing/masks/hailer.dm +++ b/code/modules/clothing/masks/hailer.dm @@ -69,7 +69,7 @@ set category = "Object" set name = "HALT" set src in usr - if(!istype(usr, /mob/living)) + if(!isliving(usr)) return if(!can_use(usr)) return diff --git a/code/modules/clothing/spacesuits/hardsuit.dm b/code/modules/clothing/spacesuits/hardsuit.dm index 37a2973c461..9378fbf2b4a 100644 --- a/code/modules/clothing/spacesuits/hardsuit.dm +++ b/code/modules/clothing/spacesuits/hardsuit.dm @@ -585,7 +585,7 @@ playsound(loc, 'sound/machines/ding.ogg', 50, 1) STOP_PROCESSING(SSobj, src) shield_state = "[shield_on]" - if(istype(loc, /mob/living/carbon/human)) + if(ishuman(loc)) var/mob/living/carbon/human/C = loc C.update_inv_wear_suit() diff --git a/code/modules/clothing/suits/wiz_robe.dm b/code/modules/clothing/suits/wiz_robe.dm index d2cd1a16b96..0d43b4705d6 100644 --- a/code/modules/clothing/suits/wiz_robe.dm +++ b/code/modules/clothing/suits/wiz_robe.dm @@ -162,7 +162,7 @@ set category = "Object" set name = "Summon Stick Minions" set src in usr - if(!istype(usr, /mob/living)) + if(!isliving(usr)) return if(!robe_charge) usr << "\The robe's internal magic supply is still recharging!" diff --git a/code/modules/events/holiday/xmas.dm b/code/modules/events/holiday/xmas.dm index c6f6ed5c910..5821f00588c 100644 --- a/code/modules/events/holiday/xmas.dm +++ b/code/modules/events/holiday/xmas.dm @@ -47,7 +47,7 @@ var/cracked = 0 /obj/item/weapon/toy/xmas_cracker/attack(mob/target, mob/user) - if( !cracked && istype(target,/mob/living/carbon/human) && (target.stat == CONSCIOUS) && !target.get_active_held_item() ) + if( !cracked && ishuman(target) && (target.stat == CONSCIOUS) && !target.get_active_held_item() ) target.visible_message("[user] and [target] pop \an [src]! *pop*", "You pull \an [src] with [target]! *pop*", "You hear a pop.") var/obj/item/weapon/paper/Joke = new /obj/item/weapon/paper(user.loc) Joke.name = "[pick("awful","terrible","unfunny")] joke" diff --git a/code/modules/events/immovable_rod.dm b/code/modules/events/immovable_rod.dm index 5495c652189..b49ed5a4c6f 100644 --- a/code/modules/events/immovable_rod.dm +++ b/code/modules/events/immovable_rod.dm @@ -76,12 +76,12 @@ In my current plan for it, 'solid' will be defined as anything with density == 1 x = clong.x y = clong.y - if (istype(clong, /turf) || istype(clong, /obj)) + if(isturf(clong) || isobj(clong)) if(clong.density) clong.ex_act(2) - else if (istype(clong, /mob)) - if(istype(clong, /mob/living/carbon/human)) + else if(ismob(clong)) + if(ishuman(clong)) var/mob/living/carbon/human/H = clong H.visible_message("[H.name] is penetrated by an immovable rod!" , "The rod penetrates you!" , "You hear a CLANG!") H.adjustBruteLoss(160) diff --git a/code/modules/flufftext/Hallucination.dm b/code/modules/flufftext/Hallucination.dm index 7e34d6a1b3a..2c69abfe524 100644 --- a/code/modules/flufftext/Hallucination.dm +++ b/code/modules/flufftext/Hallucination.dm @@ -622,7 +622,7 @@ var/list/non_fakeattack_weapons = list(/obj/item/weapon/gun/projectile, /obj/ite var/list/slots_free = list(l,r) if(l_hand) slots_free -= l if(r_hand) slots_free -= r - 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 diff --git a/code/modules/games/cards.dm b/code/modules/games/cards.dm index cf7e6ae024d..e00dc38691b 100644 --- a/code/modules/games/cards.dm +++ b/code/modules/games/cards.dm @@ -81,7 +81,7 @@ if(flag) return //It's adjacent, is the user, or is on the user's person - if (istype(A, /mob/living)) + if(isliving(A)) src.dealTo(A, user) else return ..() diff --git a/code/modules/hydroponics/grown/flowers.dm b/code/modules/hydroponics/grown/flowers.dm index 824ceadd50b..784b9ee44ff 100644 --- a/code/modules/hydroponics/grown/flowers.dm +++ b/code/modules/hydroponics/grown/flowers.dm @@ -181,7 +181,7 @@ /obj/item/weapon/grown/novaflower/attack(mob/living/carbon/M, mob/user) if(!..()) return - if(istype(M, /mob/living)) + if(isliving(M)) M << "You are lit on fire from the intense heat of the [name]!" M.adjust_fire_stacks(seed.potency / 20) if(M.IgniteMob()) diff --git a/code/modules/hydroponics/grown/nettle.dm b/code/modules/hydroponics/grown/nettle.dm index be78c4ef8b2..04ac147e52d 100644 --- a/code/modules/hydroponics/grown/nettle.dm +++ b/code/modules/hydroponics/grown/nettle.dm @@ -98,7 +98,7 @@ /obj/item/weapon/grown/nettle/death/attack(mob/living/carbon/M, mob/user) if(!..()) return - if(istype(M, /mob/living)) + if(isliving(M)) M << "You are stunned by the powerful acid of the Deathnettle!" add_logs(user, M, "attacked", src) diff --git a/code/modules/hydroponics/grown/replicapod.dm b/code/modules/hydroponics/grown/replicapod.dm index 2fc857d23c4..598f97c0640 100644 --- a/code/modules/hydroponics/grown/replicapod.dm +++ b/code/modules/hydroponics/grown/replicapod.dm @@ -66,19 +66,19 @@ else if(M.ckey == ckey && M.stat == DEAD && !M.suiciding) make_podman = 1 - if(istype(M, /mob/living)) + if(isliving(M)) var/mob/living/L = M make_podman = !L.hellbound break else //If the player has ghosted from his corpse before blood was drawn, his ckey is no longer attached to the mob, so we need to match up the cloned player through the mind key for(var/mob/M in player_list) if(mind && M.mind && ckey(M.mind.key) == ckey(mind.key) && M.ckey && M.client && M.stat == 2 && !M.suiciding) - if(istype(M, /mob/dead/observer)) + if(isobserver(M)) var/mob/dead/observer/O = M if(!O.can_reenter_corpse) break make_podman = 1 - if(istype(M, /mob/living)) + if(isliving(M)) var/mob/living/L = M make_podman = !L.hellbound ckey_holder = M.ckey diff --git a/code/modules/jobs/access.dm b/code/modules/jobs/access.dm index 0b15123b142..83cec3a131e 100644 --- a/code/modules/jobs/access.dm +++ b/code/modules/jobs/access.dm @@ -112,12 +112,12 @@ if(IsAdminGhost(M)) //Access can't stop the abuse return 1 - else if(istype(M, /mob/living/carbon/human)) + else 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_held_item()) || src.check_access(H.wear_id)) return 1 - else if(istype(M, /mob/living/carbon/monkey) || istype(M, /mob/living/carbon/alien/humanoid)) + else if(ismonkey(M) || isalienadult(M)) var/mob/living/carbon/george = M //they can only hold things :( if(check_access(george.get_active_held_item())) diff --git a/code/modules/mining/equipment.dm b/code/modules/mining/equipment.dm index 7e139965aa2..b6bb5597250 100644 --- a/code/modules/mining/equipment.dm +++ b/code/modules/mining/equipment.dm @@ -285,7 +285,7 @@ /obj/item/weapon/lazarus_injector/afterattack(atom/target, mob/user, proximity_flag) if(!loaded) return - if(istype(target, /mob/living) && proximity_flag) + if(isliving(target) && proximity_flag) if(istype(target, /mob/living/simple_animal)) var/mob/living/simple_animal/M = target if(M.sentience_type != revive_type) diff --git a/code/modules/mining/fulton.dm b/code/modules/mining/fulton.dm index fe7cf2e6818..81a1c070d5a 100644 --- a/code/modules/mining/fulton.dm +++ b/code/modules/mining/fulton.dm @@ -71,7 +71,7 @@ var/list/total_extraction_beacons = list() var/image/balloon var/image/balloon2 var/image/balloon3 - if(istype(A, /mob/living)) + if(isliving(A)) var/mob/living/M = A M.Weaken(16) // Keep them from moving during the duration of the extraction M.buckled = 0 // Unbuckle them to prevent anchoring problems @@ -104,7 +104,7 @@ var/list/total_extraction_beacons = list() sleep(10) playsound(holder_obj.loc, 'sound/items/fultext_launch.wav', 50, 1, -3) animate(holder_obj, pixel_z = 1000, time = 30) - if(istype(A, /mob/living/carbon/human)) + if(ishuman(A)) var/mob/living/carbon/human/L = A L.SetParalysis(0) L.drowsyness = 0 @@ -173,12 +173,12 @@ var/list/total_extraction_beacons = list() var/atom/movable/stored_obj /obj/item/weapon/extraction_pack/proc/check_for_living_mobs(atom/A) - if(istype(A, /mob/living)) + if(isliving(A)) var/mob/living/L = A if(L.stat != DEAD) return 1 for(var/thing in A.GetAllContents()) - if(istype(A, /mob/living)) + if(isliving(A)) var/mob/living/L = A if(L.stat != DEAD) return 1 diff --git a/code/modules/mining/lavaland/necropolis_chests.dm b/code/modules/mining/lavaland/necropolis_chests.dm index e97a66b7070..e53c101c955 100644 --- a/code/modules/mining/lavaland/necropolis_chests.dm +++ b/code/modules/mining/lavaland/necropolis_chests.dm @@ -96,7 +96,7 @@ if(wisp.orbiting) var/atom/A = wisp.orbiting.orbiting - if(istype(A, /mob/living)) + if(isliving(A)) var/mob/living/M = A M.sight &= ~SEE_MOBS M << "Your vision returns to \ diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm index db741e5f04c..8eabc787709 100644 --- a/code/modules/mining/mine_turfs.dm +++ b/code/modules/mining/mine_turfs.dm @@ -434,7 +434,7 @@ /turf/closed/mineral/Bumped(AM as mob|obj) ..() - if(istype(AM,/mob/living/carbon/human)) + if(ishuman(AM)) var/mob/living/carbon/human/H = AM var/obj/item/I = H.is_holding_item_of_type(/obj/item/weapon/pickaxe) if(I) diff --git a/code/modules/mob/interactive.dm b/code/modules/mob/interactive.dm index 7be2862b0fc..6061964f5b0 100644 --- a/code/modules/mob/interactive.dm +++ b/code/modules/mob/interactive.dm @@ -1216,27 +1216,25 @@ if(shouldTryHeal == 1) for(var/mob/living/carbon/human/C in nearby) - if(istype(C,/mob/living/carbon/human)) //I haven't the foggiest clue why this is turning up non-carbons but sure here whatever - if(C.health <= 75) - if(get_dist(src,C) <= 2) - src.say("Wait, [C], let me heal you!") - M.attack(C,src) - sleep(25) - else - tryWalk(get_turf(C)) + if(C.health <= 75) + if(get_dist(src,C) <= 2) + src.say("Wait, [C], let me heal you!") + M.attack(C,src) + sleep(25) + else + tryWalk(get_turf(C)) else if(shouldTryHeal == 2) if(HPS) if(HPS.reagents.total_volume <= 0) HPS.reagents.add_reagent("tricordrazine",30) for(var/mob/living/carbon/human/C in nearby) - if(istype(C,/mob/living/carbon/human)) - if(C.health <= 75 && C.reagents.get_reagent_amount("tricordrazine") <= 0) // make sure they wont be overdosing - if(get_dist(src,C) <= 2) - src.say("Wait, [C], let me heal you!") - HPS.attack(C,src) - sleep(25) - else - tryWalk(get_turf(C)) + if(C.health <= 75 && C.reagents.get_reagent_amount("tricordrazine") <= 0) // make sure they wont be overdosing + if(get_dist(src,C) <= 2) + src.say("Wait, [C], let me heal you!") + HPS.attack(C,src) + sleep(25) + else + tryWalk(get_turf(C)) /mob/living/carbon/human/interactive/proc/dojanitor(obj) @@ -1514,7 +1512,7 @@ if((TARGET && (doing & FIGHTING))) // this is a redundancy check var/mob/living/M = TARGET - if(istype(M,/mob/living)) + if(isliving(M)) if(M.health > 1) //THROWING OBJECTS for(var/A in allContents) diff --git a/code/modules/mob/living/bloodcrawl.dm b/code/modules/mob/living/bloodcrawl.dm index 9f9b9fb5e30..8fb5aa0cced 100644 --- a/code/modules/mob/living/bloodcrawl.dm +++ b/code/modules/mob/living/bloodcrawl.dm @@ -68,7 +68,7 @@ return // if the thing we're pulling isn't alive - if (!(istype(pullee, /mob/living))) + if (!isliving(pullee)) return var/mob/living/victim = pullee diff --git a/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm b/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm index 3a9e938df39..5ffffbd562a 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm @@ -65,7 +65,7 @@ return ..() if(A) - if(istype(A, /mob/living)) + if(isliving(A)) var/mob/living/L = A var/blocked = 0 if(ishuman(A)) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 833d5c1772d..e04bbd5b023 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -272,7 +272,7 @@ ///////HUDs/////// if(href_list["hud"]) - if(istype(usr, /mob/living/carbon/human)) + if(ishuman(usr)) var/mob/living/carbon/human/H = usr var/perpname = get_face_name(get_id_name("")) if(istype(H.glasses, /obj/item/clothing/glasses/hud)) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 74a24079251..a7b8bf933fb 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -244,8 +244,6 @@ temperature -= change if(actual < desired) temperature = desired -// if(istype(src, /mob/living/carbon/human)) -// world << "[src] ~ [src.bodytemperature] ~ [temperature]" return temperature diff --git a/code/modules/mob/living/silicon/pai/software.dm b/code/modules/mob/living/silicon/pai/software.dm index 7ccef7e871b..d975d770600 100644 --- a/code/modules/mob/living/silicon/pai/software.dm +++ b/code/modules/mob/living/silicon/pai/software.dm @@ -195,7 +195,7 @@ if(href_list["getdna"]) var/mob/living/M = card.loc var/count = 0 - while(!istype(M, /mob/living)) + while(!isliving(M)) if(!M || !M.loc) return 0 //For a runtime where M ends up in nullspace (similar to bluespace but less colourful) M = M.loc count++ @@ -497,8 +497,8 @@

Host Bioscan


"} var/mob/living/M = card.loc - if(!istype(M, /mob/living)) - while (!istype(M, /mob/living)) + if(!isliving(M)) + while(!isliving(M)) if(istype(M, /turf)) src.temp = "Error: No biological host found.
" src.subscreen = 0 diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 5b3b3ee6e2e..f968118a12b 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -608,12 +608,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_held_item()) || check_access(H.wear_id)) return 1 - else if(istype(M, /mob/living/carbon/monkey)) + else if(ismonkey(M)) var/mob/living/carbon/monkey/george = M //they can only hold things :( if(istype(george.get_active_held_item(), /obj/item)) @@ -706,7 +706,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_animal/bot/ed209bot.dm b/code/modules/mob/living/simple_animal/bot/ed209bot.dm index fa4e69cf5ee..9b08a1f308b 100644 --- a/code/modules/mob/living/simple_animal/bot/ed209bot.dm +++ b/code/modules/mob/living/simple_animal/bot/ed209bot.dm @@ -126,7 +126,7 @@ Auto Patrol[]"}, return dat /mob/living/simple_animal/bot/ed209/Topic(href, href_list) - if(lasercolor && (istype(usr,/mob/living/carbon/human))) + if(lasercolor && ishuman(usr)) var/mob/living/carbon/human/H = usr if((lasercolor == "b") && (istype(H.wear_suit, /obj/item/clothing/suit/redtag)))//Opposing team cannot operate it return @@ -528,16 +528,12 @@ Auto Patrol[]"}, spawn(2) icon_state = "[lasercolor]ed209[on]" var/threat = 5 - if(istype(C, /mob/living/carbon/human)) - C.stuttering = 5 - C.Stun(5) - C.Weaken(5) + C.Weaken(5) + C.Stun(5) + C.stuttering = 5 + if(ishuman(C)) var/mob/living/carbon/human/H = C threat = H.assess_threat(src) - else - C.Weaken(5) - C.stuttering = 5 - C.Stun(5) add_logs(src,C,"stunned") if(declare_arrests) var/area/location = get_area(src) diff --git a/code/modules/mob/living/simple_animal/bot/secbot.dm b/code/modules/mob/living/simple_animal/bot/secbot.dm index 69be54689f6..9a709560132 100644 --- a/code/modules/mob/living/simple_animal/bot/secbot.dm +++ b/code/modules/mob/living/simple_animal/bot/secbot.dm @@ -189,7 +189,7 @@ Auto Patrol: []"}, /mob/living/simple_animal/bot/secbot/hitby(atom/movable/AM, skipcatch = 0, hitpush = 1, blocked = 0) if(istype(AM, /obj/item)) var/obj/item/I = AM - if(I.throwforce < src.health && I.thrownby && (istype(I.thrownby, /mob/living/carbon/human))) + if(I.throwforce < src.health && I.thrownby && ishuman(I.thrownby)) var/mob/living/carbon/human/H = I.thrownby retaliate(H) ..() @@ -215,7 +215,7 @@ Auto Patrol: []"}, spawn(2) icon_state = "secbot[on]" var/threat = 5 - if(istype(C, /mob/living/carbon/human)) + if(ishuman(C)) C.stuttering = 5 C.Stun(5) C.Weaken(5) diff --git a/code/modules/mob/living/simple_animal/friendly/drone/drones_as_items.dm b/code/modules/mob/living/simple_animal/friendly/drone/drones_as_items.dm index 3841616201e..077265552de 100644 --- a/code/modules/mob/living/simple_animal/friendly/drone/drones_as_items.dm +++ b/code/modules/mob/living/simple_animal/friendly/drone/drones_as_items.dm @@ -55,7 +55,7 @@ if(!drone) return - if(istype(loc, /mob/living)) + if(isliving(loc)) var/mob/living/L = loc L << "[drone] is trying to escape!" if(!do_after(drone, 50, target = L)) diff --git a/code/modules/mob/living/simple_animal/hostile/illusion.dm b/code/modules/mob/living/simple_animal/hostile/illusion.dm index 7c556ff897c..9b9b0ee4aa1 100644 --- a/code/modules/mob/living/simple_animal/hostile/illusion.dm +++ b/code/modules/mob/living/simple_animal/hostile/illusion.dm @@ -49,7 +49,7 @@ /mob/living/simple_animal/hostile/illusion/AttackingTarget() ..() - if(istype(target, /mob/living) && prob(multiply_chance)) + if(isliving(target) && prob(multiply_chance)) var/mob/living/L = target if(L.stat == DEAD) return diff --git a/code/modules/mob/living/simple_animal/hostile/statue.dm b/code/modules/mob/living/simple_animal/hostile/statue.dm index 739a332d653..998cbebc3d5 100644 --- a/code/modules/mob/living/simple_animal/hostile/statue.dm +++ b/code/modules/mob/living/simple_animal/hostile/statue.dm @@ -207,7 +207,7 @@ /obj/effect/proc_holder/spell/targeted/night_vision/cast(list/targets,mob/user = usr) for(var/mob/living/target in targets) - if(istype(target, /mob/living/carbon/human)) + if(ishuman(target)) var/mob/living/carbon/human/H = target if(H.dna.species.invis_sight == SEE_INVISIBLE_LIVING) H.dna.species.invis_sight = SEE_INVISIBLE_NOLIGHTING diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index 8de22d32685..c0113b19c58 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -372,7 +372,7 @@ else if(!istype(M, childtype) && M.gender == MALE) //Better safe than sorry ;_; partner = M - else if(istype(M, /mob/living) && !faction_check(M)) //shyness check. we're not shy in front of things that share a faction with us. + else if(isliving(M) && !faction_check(M)) //shyness check. we're not shy in front of things that share a faction with us. alone = 0 continue if(alone && partner && children < 3) diff --git a/code/modules/mob/living/simple_animal/slime/life.dm b/code/modules/mob/living/simple_animal/slime/life.dm index a4cf1c4a7bb..74fca2da05e 100644 --- a/code/modules/mob/living/simple_animal/slime/life.dm +++ b/code/modules/mob/living/simple_animal/slime/life.dm @@ -343,7 +343,7 @@ if(issilicon(L) && (rabid || attacked)) // They can't eat silicons, but they can glomp them in defence targets += L // Possible target found! - if(istype(L, /mob/living/carbon/human)) //Ignore slime(wo)men + if(ishuman(L)) //Ignore slime(wo)men var/mob/living/carbon/human/H = L if(src.type in H.dna.species.ignored_by) continue diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 1b1808518f8..3ca49fe838c 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -714,7 +714,7 @@ var/next_mob_id = 0 layer = initial(layer) update_transform() update_action_buttons_icon() - if(istype(src, /mob/living)) + if(isliving(src)) var/mob/living/L = src if(L.has_status_effect(/datum/status_effect/freon)) canmove = 0 diff --git a/code/modules/mob/mob_transformation_simple.dm b/code/modules/mob/mob_transformation_simple.dm index f6b918d2f3a..826b248c60b 100644 --- a/code/modules/mob/mob_transformation_simple.dm +++ b/code/modules/mob/mob_transformation_simple.dm @@ -50,7 +50,7 @@ client.prefs.copy_to(H) H.dna.update_dna_identity() - if(mind && istype(M, /mob/living)) + if(mind && isliving(M)) mind.transfer_to(M, 1) // second argument to force key move to new mob else M.key = key diff --git a/code/modules/ninja/ninja_event.dm b/code/modules/ninja/ninja_event.dm index 1df674feb32..2a82af08084 100644 --- a/code/modules/ninja/ninja_event.dm +++ b/code/modules/ninja/ninja_event.dm @@ -66,7 +66,7 @@ Contents: var/list/possible_targets = list() for(var/datum/mind/M in ticker.minds) if(M.current && M.current.stat != DEAD) - if(istype(M.current,/mob/living/carbon/human)) + if(ishuman(M.current)) if(M.special_role) possible_targets[M] = 0 //bad-guy else if(M.assigned_role in command_positions) diff --git a/code/modules/ninja/suit/gloves.dm b/code/modules/ninja/suit/gloves.dm index f4273460c7c..b37bc147cb9 100644 --- a/code/modules/ninja/suit/gloves.dm +++ b/code/modules/ninja/suit/gloves.dm @@ -41,7 +41,7 @@ /obj/item/clothing/gloves/space_ninja/Touch(atom/A,proximity) if(!candrain || draining) return 0 - if(!istype(loc, /mob/living/carbon/human)) + if(!ishuman(loc)) return 0 //Only works while worn var/mob/living/carbon/human/H = loc diff --git a/code/modules/ninja/suit/n_suit_verbs/energy_net_nets.dm b/code/modules/ninja/suit/n_suit_verbs/energy_net_nets.dm index 67f9e8e8255..010b69edf54 100644 --- a/code/modules/ninja/suit/n_suit_verbs/energy_net_nets.dm +++ b/code/modules/ninja/suit/n_suit_verbs/energy_net_nets.dm @@ -69,10 +69,11 @@ It is possible to destroy the net by the occupant or someone else. invisibility = INVISIBILITY_ABSTRACT//Make the net invisible so all the animations can play out. health = INFINITY//Make the net invincible so that an explosion/something else won't kill it while, spawn() is running. for(var/obj/item/W in M) - if(istype(M,/mob/living/carbon/human)) - if(W==M:w_uniform) + if(ishuman(M)) + var/mob/living/carbon/human/H = M + if(W == H.w_uniform) continue//So all they're left with are shoes and uniform. - if(W==M:shoes) + if(W == H.shoes) continue M.unEquip(W) diff --git a/code/modules/ninja/suit/n_suit_verbs/ninja_teleporting.dm b/code/modules/ninja/suit/n_suit_verbs/ninja_teleporting.dm index 50fdd52b241..12c9b82a584 100644 --- a/code/modules/ninja/suit/n_suit_verbs/ninja_teleporting.dm +++ b/code/modules/ninja/suit/n_suit_verbs/ninja_teleporting.dm @@ -12,7 +12,7 @@ Contents: //Handles elporting while grabbing someone /obj/item/clothing/suit/space/space_ninja/proc/handle_teleport_grab(turf/T, mob/living/H) - if(H.pulling && (istype(H.pulling, /mob/living))) + if(H.pulling && (isliving(H.pulling))) var/mob/living/victim = H.pulling if(!victim.anchored) victim.forceMove(locate(T.x+rand(-1,1),T.y+rand(-1,1),T.z)) diff --git a/code/modules/paperwork/photocopier.dm b/code/modules/paperwork/photocopier.dm index b5e0c64b81a..ede40532dcc 100644 --- a/code/modules/paperwork/photocopier.dm +++ b/code/modules/paperwork/photocopier.dm @@ -369,7 +369,7 @@ ass = null updateUsrDialog() return 0 - else if(istype(ass,/mob/living/carbon/human)) + else if(ishuman(ass)) if(!ass.get_item_by_slot(slot_w_uniform) && !ass.get_item_by_slot(slot_wear_suit)) return 1 else diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm index 58fcfd4e639..5ec6076deb0 100644 --- a/code/modules/paperwork/photography.dm +++ b/code/modules/paperwork/photography.dm @@ -210,8 +210,10 @@ for(var/atom/A in sorted) var/icon/img = getFlatIcon(A) - if(istype(A, /mob/living) && A:lying) - img.Turn(A:lying) + if(isliving(A)) + var/mob/living/L = A + if(L.lying) + img.Turn(L.lying) var/offX = 32 * (A.x - center.x) + A.pixel_x + 33 var/offY = 32 * (A.y - center.y) + A.pixel_y + 33 @@ -247,7 +249,7 @@ var/list/holding = list() - if(istype(M, /mob/living)) + if(isliving(M)) var/mob/living/L = M for(var/obj/item/I in L.held_items) diff --git a/code/modules/power/power.dm b/code/modules/power/power.dm index 3d2a726adc4..b2450fa28f3 100644 --- a/code/modules/power/power.dm +++ b/code/modules/power/power.dm @@ -279,7 +279,7 @@ /proc/electrocute_mob(mob/living/carbon/M, power_source, obj/source, siemens_coeff = 1) if(istype(M.loc,/obj/mecha)) return 0 //feckin mechs are dumb - if(istype(M,/mob/living/carbon/human)) + if(ishuman(M)) var/mob/living/carbon/human/H = M if(H.gloves) var/obj/item/clothing/gloves/G = H.gloves diff --git a/code/modules/power/singularity/singularity.dm b/code/modules/power/singularity/singularity.dm index 2dda4c96dbb..96ee044fb77 100644 --- a/code/modules/power/singularity/singularity.dm +++ b/code/modules/power/singularity/singularity.dm @@ -395,7 +395,7 @@ 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)) var/obj/item/clothing/glasses/meson/MS = H.glasses diff --git a/code/modules/power/supermatter/supermatter.dm b/code/modules/power/supermatter/supermatter.dm index 28b0a7ef434..d14f1af8735 100644 --- a/code/modules/power/supermatter/supermatter.dm +++ b/code/modules/power/supermatter/supermatter.dm @@ -299,7 +299,7 @@ /obj/machinery/power/supermatter_shard/Bumped(atom/AM as mob|obj) - if(istype(AM, /mob/living)) + if(isliving(AM)) AM.visible_message("\The [AM] slams into \the [src] inducing a resonance... \his body starts to glow and catch flame before flashing into ash.",\ "You slam into \the [src] as your ears are filled with unearthly ringing. Your last thought is \"Oh, fuck.\"",\ "You hear an unearthly noise as a wave of heat washes over you.") @@ -315,7 +315,7 @@ /obj/machinery/power/supermatter_shard/proc/Consume(atom/movable/AM) - if(istype(AM, /mob/living)) + if(isliving(AM)) var/mob/living/user = AM message_admins("[src] has consumed [key_name_admin(user)]? (FLW) (JMP).") investigate_log("has consumed [key_name(user)].", "supermatter") diff --git a/code/modules/power/tesla/energy_ball.dm b/code/modules/power/tesla/energy_ball.dm index 4f6fc7641b8..714e490aa25 100644 --- a/code/modules/power/tesla/energy_ball.dm +++ b/code/modules/power/tesla/energy_ball.dm @@ -194,7 +194,7 @@ var/list/blacklisted_tesla_types = typecacheof(list(/obj/machinery/atmospherics, else if(closest_grounding_rod || is_type_in_typecache(A, blacklisted_tesla_types)) continue - else if(istype(A, /mob/living)) + else if(isliving(A)) var/dist = get_dist(source, A) var/mob/living/L = A if(dist <= zap_range && (dist < closest_dist || !closest_mob) && L.stat != DEAD) diff --git a/code/modules/projectiles/guns/energy/nuclear.dm b/code/modules/projectiles/guns/energy/nuclear.dm index 474e5373227..527f4cd8814 100644 --- a/code/modules/projectiles/guns/energy/nuclear.dm +++ b/code/modules/projectiles/guns/energy/nuclear.dm @@ -93,7 +93,7 @@ ..() /obj/item/weapon/gun/energy/gun/nuclear/proc/failcheck() - if(prob(fail_chance) && istype(loc, /mob/living)) + if(prob(fail_chance) && isliving(loc)) var/mob/living/M = loc switch(fail_tick) if(0 to 200) diff --git a/code/modules/projectiles/projectile/bullets.dm b/code/modules/projectiles/projectile/bullets.dm index ab287338cc9..dfeeb98b2d8 100644 --- a/code/modules/projectiles/projectile/bullets.dm +++ b/code/modules/projectiles/projectile/bullets.dm @@ -250,7 +250,7 @@ breakthings = FALSE /obj/item/projectile/bullet/sniper/soporific/on_hit(atom/target, blocked = 0) - if((blocked != 100) && istype(target, /mob/living)) + if((blocked != 100) && isliving(target)) var/mob/living/L = target L.Sleeping(20) return ..() diff --git a/code/modules/reagents/chemistry/holder.dm b/code/modules/reagents/chemistry/holder.dm index bdc42b7c03c..8e9248ea81a 100644 --- a/code/modules/reagents/chemistry/holder.dm +++ b/code/modules/reagents/chemistry/holder.dm @@ -420,7 +420,7 @@ var/const/INJECT = 5 //injection for(var/_reagent in cached_reagents) var/datum/reagent/R = _reagent if(R.id == reagent) - if(my_atom && istype(my_atom, /mob/living)) + if(my_atom && isliving(my_atom)) var/mob/living/M = my_atom R.on_mob_delete(M) qdel(R) diff --git a/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm b/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm index de0b529b446..c8db6407aba 100644 --- a/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm @@ -54,7 +54,7 @@ All effects don't start immediately, but rather get worse over time; the rate is return /datum/reagent/consumable/ethanol/reaction_mob(mob/living/M, method=TOUCH, reac_volume)//Splashing people with ethanol isn't quite as good as fuel. - if(!istype(M, /mob/living)) + if(!isliving(M)) return if(method in list(TOUCH, VAPOR, PATCH)) @@ -680,7 +680,7 @@ All effects don't start immediately, but rather get worse over time; the rate is boozepwr = 60 /datum/reagent/consumable/ethanol/bananahonk/on_mob_life(mob/living/M) - if( ( istype(M, /mob/living/carbon/human) && M.job in list("Clown") ) || istype(M, /mob/living/carbon/monkey) ) + if((ishuman(M) && M.job in list("Clown") ) || ismonkey(M)) M.heal_bodypart_damage(1,1, 0) . = 1 return ..() || . @@ -694,7 +694,7 @@ All effects don't start immediately, but rather get worse over time; the rate is boozepwr = 59 //Proof that clowns are better than mimes right here /datum/reagent/consumable/ethanol/silencer/on_mob_life(mob/living/M) - if(istype(M, /mob/living/carbon/human) && M.job in list("Mime")) + if(ishuman(M) && M.job in list("Mime")) M.heal_bodypart_damage(1,1) . = 1 return ..() || . diff --git a/code/modules/reagents/chemistry/reagents/drink_reagents.dm b/code/modules/reagents/chemistry/reagents/drink_reagents.dm index 122e8840c81..12b2a5bff66 100644 --- a/code/modules/reagents/chemistry/reagents/drink_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/drink_reagents.dm @@ -94,7 +94,7 @@ color = "#863333" // rgb: 175, 175, 0 /datum/reagent/consumable/banana/on_mob_life(mob/living/M) - if( ( istype(M, /mob/living/carbon/human) && M.job in list("Clown") ) || istype(M, /mob/living/carbon/monkey) ) + if((ishuman(M) && M.job in list("Clown") ) || ismonkey(M)) M.heal_bodypart_damage(1,1, 0) . = 1 ..() @@ -105,7 +105,7 @@ description = "Absolutely nothing." /datum/reagent/consumable/nothing/on_mob_life(mob/living/M) - if(istype(M, /mob/living/carbon/human) && M.job in list("Mime")) + if(ishuman(M) && M.job in list("Mime")) M.heal_bodypart_damage(1,1, 0) . = 1 ..() diff --git a/code/modules/reagents/chemistry/reagents/food_reagents.dm b/code/modules/reagents/chemistry/reagents/food_reagents.dm index e65c395f7c7..08489d37e46 100644 --- a/code/modules/reagents/chemistry/reagents/food_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/food_reagents.dm @@ -173,7 +173,7 @@ color = "#B31008" // rgb: 179, 16, 8 /datum/reagent/consumable/condensedcapsaicin/reaction_mob(mob/living/M, method=TOUCH, reac_volume) - if(!istype(M, /mob/living/carbon/human) && !istype(M, /mob/living/carbon/monkey)) + if(!ishuman(M) && !ismonkey(M)) return var/mob/living/carbon/victim = M @@ -193,7 +193,7 @@ safe_thing = victim.wear_mask //only humans can have helmets and glasses - if(istype(victim, /mob/living/carbon/human)) + if(ishuman(victim)) var/mob/living/carbon/human/H = victim if( H.head ) if ( H.head.flags_cover & MASKCOVERSEYES ) @@ -324,7 +324,7 @@ color = "#FF00FF" // rgb: 255, 0, 255 /datum/reagent/consumable/sprinkles/on_mob_life(mob/living/M) - if(istype(M, /mob/living/carbon/human) && M.job in list("Security Officer", "Head of Security", "Detective", "Warden")) + if(ishuman(M) && M.job in list("Security Officer", "Head of Security", "Detective", "Warden")) M.heal_bodypart_damage(1,1, 0) . = 1 ..() diff --git a/code/modules/reagents/chemistry/reagents/other_reagents.dm b/code/modules/reagents/chemistry/reagents/other_reagents.dm index 7dc3b698f84..4bc44632e0f 100644 --- a/code/modules/reagents/chemistry/reagents/other_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/other_reagents.dm @@ -270,7 +270,7 @@ overdose_threshold = 11 //Slightly more than one un-nozzled spraybottle. /datum/reagent/spraytan/reaction_mob(mob/living/M, method=TOUCH, reac_volume, show_message = 1) - if(istype(M, /mob/living/carbon/human)) + if(ishuman(M)) if(method == PATCH || method == VAPOR) var/mob/living/carbon/human/N = M if(N.dna.species.id == "human") @@ -335,7 +335,7 @@ /datum/reagent/spraytan/overdose_process(mob/living/M) metabolization_rate = 1 * REAGENTS_METABOLISM - if(istype(M, /mob/living/carbon/human)) + if(ishuman(M)) var/mob/living/carbon/human/N = M if(N.dna.species.id == "human") // If they're human, turn em to the "orange" race, and give em spiky black hair N.skin_tone = "orange" @@ -635,7 +635,7 @@ ..() /datum/reagent/iron/reaction_mob(mob/living/M, method=TOUCH, reac_volume) - if(!istype(M, /mob/living)) + if(!isliving(M)) return if(M.has_bane(BANE_IRON)) //If the target is weak to cold iron, then poison them. if(holder && holder.chem_temp < 100) // COLD iron. @@ -657,7 +657,7 @@ color = "#D0D0D0" // rgb: 208, 208, 208 /datum/reagent/silver/reaction_mob(mob/living/M, method=TOUCH, reac_volume) - if(!istype(M, /mob/living)) + if(!isliving(M)) return if(M.has_bane(BANE_SILVER)) M.reagents.add_reagent("toxin", reac_volume) @@ -703,7 +703,7 @@ color = "#660000" // rgb: 102, 0, 0 /datum/reagent/fuel/reaction_mob(mob/living/M, method=TOUCH, reac_volume)//Splashing people with welding fuel to make them easy to ignite! - if(!istype(M, /mob/living)) + if(!isliving(M)) return if(method == TOUCH || method == VAPOR) M.adjust_fire_stacks(reac_volume / 10) @@ -741,7 +741,7 @@ if(method == TOUCH || method == VAPOR) if(iscarbon(M)) var/mob/living/carbon/C = M - if(istype(M,/mob/living/carbon/human)) + if(ishuman(M)) var/mob/living/carbon/human/H = M if(H.lip_style) H.lip_style = null diff --git a/code/modules/reagents/chemistry/reagents/toxin_reagents.dm b/code/modules/reagents/chemistry/reagents/toxin_reagents.dm index 69255dee31c..4ece92a9410 100644 --- a/code/modules/reagents/chemistry/reagents/toxin_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/toxin_reagents.dm @@ -74,7 +74,7 @@ return /datum/reagent/toxin/plasma/reaction_mob(mob/living/M, method=TOUCH, reac_volume)//Splashing people with plasma is stronger than fuel! - if(!istype(M, /mob/living)) + if(!isliving(M)) return if(method == TOUCH || method == VAPOR) M.adjust_fire_stacks(reac_volume / 5) @@ -520,7 +520,7 @@ M.adjustOxyLoss(rand(5,25), 0) . = 1 if(3) - if(istype(M, /mob/living/carbon/human)) + if(ishuman(M)) var/mob/living/carbon/human/H = M if(!H.heart_attack) H.heart_attack = 1 // rip in pepperoni diff --git a/code/modules/research/xenobiology/xenobiology.dm b/code/modules/research/xenobiology/xenobiology.dm index c42594790e9..31a752c9bda 100644 --- a/code/modules/research/xenobiology/xenobiology.dm +++ b/code/modules/research/xenobiology/xenobiology.dm @@ -564,7 +564,7 @@ playsound(get_turf(src), 'sound/magic/TIMEPARADOX2.ogg', 100, 1, -1) for(var/i in 1 to duration-1) for(var/atom/A in orange (freezerange, src.loc)) - if(istype(A, /mob/living)) + if(isliving(A)) var/mob/living/M = A if(M in immune) continue diff --git a/code/modules/ruins/objects_and_mobs/sin_ruins.dm b/code/modules/ruins/objects_and_mobs/sin_ruins.dm index 609f295acbd..f5eaff65c52 100644 --- a/code/modules/ruins/objects_and_mobs/sin_ruins.dm +++ b/code/modules/ruins/objects_and_mobs/sin_ruins.dm @@ -79,7 +79,7 @@ /obj/effect/gluttony/CanPass(atom/movable/mover, turf/target, height=0)//So bullets will fly over and stuff. if(height==0) return 1 - if(istype(mover, /mob/living/carbon/human)) + if(ishuman(mover)) var/mob/living/carbon/human/H = mover if(H.nutrition >= NUTRITION_LEVEL_FAT) H.visible_message("[H] pushes through [src]!", "You've seen and eaten worse than this.") @@ -123,7 +123,7 @@ return if(!istype(user)) return - if(istype(AM, /mob/living/carbon/human)) + if(ishuman(AM)) var/mob/living/carbon/human/H = AM if(user.real_name != H.dna.real_name) user.real_name = H.dna.real_name diff --git a/code/modules/spells/spell.dm b/code/modules/spells/spell.dm index c8ad0935759..45e6d700cb4 100644 --- a/code/modules/spells/spell.dm +++ b/code/modules/spells/spell.dm @@ -249,7 +249,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin if(overlay) for(var/atom/target in targets) var/location - if(istype(target,/mob/living)) + if(isliving(target)) location = target.loc else if(istype(target,/turf)) location = target @@ -263,11 +263,11 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin /obj/effect/proc_holder/spell/proc/after_cast(list/targets) for(var/atom/target in targets) var/location - if(istype(target,/mob/living)) + if(isliving(target)) location = target.loc else if(istype(target,/turf)) location = target - if(istype(target,/mob/living) && message) + if(isliving(target) && message) target << text("[message]") if(sparks_spread) var/datum/effect_system/spark_spread/sparks = new diff --git a/code/modules/spells/spell_types/charge.dm b/code/modules/spells/spell_types/charge.dm index ebd4933f58d..c97369e774b 100644 --- a/code/modules/spells/spell_types/charge.dm +++ b/code/modules/spells/spell_types/charge.dm @@ -18,7 +18,7 @@ var/charged_item = null var/burnt_out = 0 - if(L.pulling && (istype(L.pulling, /mob/living))) + if(L.pulling && isliving(L.pulling)) var/mob/living/M = L.pulling if(M.mob_spell_list.len != 0 || (M.mind && M.mind.spell_list.len != 0)) for(var/obj/effect/proc_holder/spell/S in M.mob_spell_list) diff --git a/code/modules/spells/spell_types/wizard.dm b/code/modules/spells/spell_types/wizard.dm index 78790328ea3..b330adcdf9f 100644 --- a/code/modules/spells/spell_types/wizard.dm +++ b/code/modules/spells/spell_types/wizard.dm @@ -354,13 +354,13 @@ throwtarget = get_edge_target_turf(user, get_dir(user, get_step_away(AM, user))) distfromcaster = get_dist(user, AM) if(distfromcaster == 0) - if(istype(AM, /mob/living)) + if(isliving(AM)) var/mob/living/M = AM M.Weaken(5) M.adjustBruteLoss(5) M << "You're slammed into the floor by [user]!" else - if(istype(AM, /mob/living)) + if(isliving(AM)) var/mob/living/M = AM M.Weaken(stun_amt) M << "You're thrown back by [user]!" diff --git a/code/modules/surgery/organs/augments_chest.dm b/code/modules/surgery/organs/augments_chest.dm index 5121e955a1b..8e336ec6494 100644 --- a/code/modules/surgery/organs/augments_chest.dm +++ b/code/modules/surgery/organs/augments_chest.dm @@ -96,7 +96,7 @@ else cooldown += 200 - if(istype(owner, /mob/living/carbon/human)) + if(ishuman(owner)) var/mob/living/carbon/human/H = owner if(H.stat != DEAD && prob(50 / severity)) H.heart_attack = TRUE diff --git a/code/modules/surgery/organs/augments_eyes.dm b/code/modules/surgery/organs/augments_eyes.dm index eef8bf6dfd3..5c14365d981 100644 --- a/code/modules/surgery/organs/augments_eyes.dm +++ b/code/modules/surgery/organs/augments_eyes.dm @@ -18,7 +18,7 @@ /obj/item/organ/cyberimp/eyes/Insert(var/mob/living/carbon/M, var/special = 0) ..() - if(istype(owner, /mob/living/carbon/human) && eye_color) + if(ishuman(owner) && eye_color) var/mob/living/carbon/human/HMN = owner old_eye_color = HMN.eye_color HMN.eye_color = eye_color @@ -30,7 +30,7 @@ /obj/item/organ/cyberimp/eyes/Remove(var/mob/living/carbon/M, var/special = 0) M.sight ^= sight_flags - if(istype(M,/mob/living/carbon/human) && eye_color) + if(ishuman(M) && eye_color) var/mob/living/carbon/human/HMN = owner HMN.eye_color = old_eye_color HMN.regenerate_icons()