diff --git a/code/__HELPERS/AnimationLibrary.dm b/code/__HELPERS/AnimationLibrary.dm index 738783ed826..11ca2eb6593 100644 --- a/code/__HELPERS/AnimationLibrary.dm +++ b/code/__HELPERS/AnimationLibrary.dm @@ -5,7 +5,7 @@ */ /proc/animate_fade_grayscale(atom/A, time = 5) - if(!istype(A) && !istype(A, /client)) + if(!istype(A) && !isclient(A)) return A.color = null animate(A, color = MATRIX_GREYSCALE, time = time, easing = SINE_EASING) diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm index b8bdecbef4d..e6a0c134a13 100644 --- a/code/__HELPERS/game.dm +++ b/code/__HELPERS/game.dm @@ -162,7 +162,7 @@ L |= M //log_world("[recursion_limit] = [M] - [get_turf(M)] - ([M.x], [M.y], [M.z])") - else if(include_radio && istype(A, /obj/item/radio)) + else if(include_radio && isradio(A)) if(sight_check && !isInSight(A, O)) continue L |= A @@ -191,7 +191,7 @@ if(M.client || include_clientless) hear += M //log_world("Start = [M] - [get_turf(M)] - ([M.x], [M.y], [M.z])") - else if(istype(A, /obj/item/radio)) + else if(isradio(A)) hear += A if(isobj(A) || ismob(A)) diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index 21d5a3859ed..5233ee164e6 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -803,7 +803,7 @@ Returns 1 if the chain up to the area contains the given typepath X.name = "wall" qdel(O) // prevents multiple shuttle corners from stacking continue - if(!istype(O,/obj)) continue + if(!isobj(O)) continue O.loc.Exited(O) O.setLoc(X,teleported=1) O.loc.Entered(O) @@ -944,7 +944,7 @@ Returns 1 if the chain up to the area contains the given typepath for(var/obj/O in T) - if(!istype(O,/obj)) + if(!isobj(O)) continue objs += O @@ -1437,7 +1437,7 @@ GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new) if(istype(A, /datum)) var/datum/D = A return !QDELETED(D) - if(istype(A, /client)) + if(isclient(A)) return TRUE return FALSE diff --git a/code/_onclick/adjacent.dm b/code/_onclick/adjacent.dm index f9096ad6492..49211cf7c25 100644 --- a/code/_onclick/adjacent.dm +++ b/code/_onclick/adjacent.dm @@ -74,7 +74,7 @@ // This is necessary for storage items not on your person. /obj/item/Adjacent(atom/neighbor, recurse = 1) if(neighbor == loc) return 1 - if(istype(loc,/obj/item)) + if(isitem(loc)) if(recurse > 0) return loc.Adjacent(neighbor,recurse - 1) return 0 diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index 9199e2ce690..f02b3538fab 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -112,7 +112,7 @@ if(!modifiers["catcher"] && A.IsObscured()) return - if(istype(loc,/obj/mecha)) + if(ismecha(loc)) if(!locate(/turf) in list(A,A.loc)) // Prevents inventory from being drilled return var/obj/mecha/M = loc diff --git a/code/_onclick/hud/alien.dm b/code/_onclick/hud/alien.dm index e7edc06d70a..c9b0f7fdc4e 100644 --- a/code/_onclick/hud/alien.dm +++ b/code/_onclick/hud/alien.dm @@ -6,7 +6,7 @@ icon_state = "leap_off" /obj/screen/alien/leap/Click() - if(istype(usr, /mob/living/carbon/alien/humanoid)) + if(isalienadult(usr)) var/mob/living/carbon/alien/humanoid/hunter/AH = usr AH.toggle_leap() @@ -53,7 +53,7 @@ static_inventory += using move_intent = using - if(istype(mymob, /mob/living/carbon/alien/humanoid/hunter)) + if(isalienhunter(mymob)) mymob.leap_icon = new /obj/screen/alien/leap() mymob.leap_icon.icon = 'icons/mob/screen_alien.dmi' mymob.leap_icon.screen_loc = ui_alien_storage_r diff --git a/code/_onclick/hud/human.dm b/code/_onclick/hud/human.dm index 40116b4d5c7..b95569e3909 100644 --- a/code/_onclick/hud/human.dm +++ b/code/_onclick/hud/human.dm @@ -20,7 +20,7 @@ icon_state = "act_equip" /obj/screen/human/equip/Click() - if(istype(usr.loc,/obj/mecha)) // stops inventory actions in a mech + if(ismecha(usr.loc)) // stops inventory actions in a mech return 1 var/mob/living/carbon/human/H = usr H.quick_equip() diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index ab783f7c060..56444393026 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -155,7 +155,7 @@ return TRUE if(usr.incapacitated(ignore_restraints = TRUE)) return TRUE - if(istype(usr.loc,/obj/mecha)) // stops inventory actions in a mech + if(ismecha(usr.loc)) // stops inventory actions in a mech return TRUE if(master) var/obj/item/I = usr.get_active_hand() @@ -410,7 +410,7 @@ return 1 if(usr.incapacitated()) return 1 - if(istype(usr.loc,/obj/mecha)) // stops inventory actions in a mech + if(ismecha(usr.loc)) // stops inventory actions in a mech return 1 if(hud?.mymob && slot_id) @@ -453,7 +453,7 @@ return 1 if(usr.incapacitated()) return 1 - if(istype(usr.loc,/obj/mecha)) // stops inventory actions in a mech + if(ismecha(usr.loc)) // stops inventory actions in a mech return 1 if(ismob(usr)) diff --git a/code/_onclick/telekinesis.dm b/code/_onclick/telekinesis.dm index 66bcab2691f..159d9d62e39 100644 --- a/code/_onclick/telekinesis.dm +++ b/code/_onclick/telekinesis.dm @@ -132,7 +132,7 @@ return // todo: something like attack_self not laden with assumptions inherent to attack_self - if(istype(focus,/obj/item) && target.Adjacent(focus) && !user.in_throw_mode) + if(isitem(focus) && target.Adjacent(focus) && !user.in_throw_mode) var/obj/item/I = focus var/resolved = target.attackby(I, user, params) if(!resolved && target && I) @@ -159,7 +159,7 @@ return I == focus /obj/item/tk_grab/proc/focus_object(obj/target, mob/user) - if(!istype(target,/obj)) + if(!isobj(target)) return//Cant throw non objects atm might let it do mobs later if(target.anchored || !isturf(target.loc)) qdel(src) diff --git a/code/controllers/subsystem/overlays.dm b/code/controllers/subsystem/overlays.dm index 9e8b3b5c6ed..7f26fdd2f89 100644 --- a/code/controllers/subsystem/overlays.dm +++ b/code/controllers/subsystem/overlays.dm @@ -92,7 +92,7 @@ SUBSYSTEM_DEF(overlays) else if(isicon(overlay)) new_overlays += icon2appearance(overlay) else - if(isloc(overlay)) + if(isatom(overlay)) var/atom/A = overlay if(A.flags_2 & OVERLAY_QUEUED_2) COMPILE_OVERLAYS(A) diff --git a/code/controllers/subsystem/parallax.dm b/code/controllers/subsystem/parallax.dm index d0cfadae95d..d6f88ee0d5d 100644 --- a/code/controllers/subsystem/parallax.dm +++ b/code/controllers/subsystem/parallax.dm @@ -39,7 +39,7 @@ SUBSYSTEM_DEF(parallax) var/atom/movable/A = C.eye if(!istype(A)) continue - for (A; isloc(A.loc) && !isturf(A.loc); A = A.loc); + for (A; isatom(A.loc) && !isturf(A.loc); A = A.loc); if(A != C.movingmob) if(C.movingmob != null && C.movingmob.client_mobs_in_contents) diff --git a/code/datums/datumvars.dm b/code/datums/datumvars.dm index ed4507a67ee..f31d0f014f8 100644 --- a/code/datums/datumvars.dm +++ b/code/datums/datumvars.dm @@ -490,7 +490,7 @@ var/datum/D = value item = "[VV_HTML_ENCODE(name)] \ref[value] = [D.type]" - else if(istype(value, /client)) + else if(isclient(value)) var/client/C = value item = "[VV_HTML_ENCODE(name)] \ref[value] = [C] [C.type]" // @@ -569,7 +569,7 @@ if(!check_rights(R_VAREDIT)) return var/D = locateUID(href_list["datumedit"]) - if(!istype(D,/datum) && !istype(D,/client)) + if(!istype(D,/datum) && !isclient(D)) to_chat(usr, "This can only be used on instances of types /client or /datum") return @@ -579,7 +579,7 @@ if(!check_rights(R_VAREDIT)) return var/atom/D = locateUID(href_list["subject"]) - if(!istype(D,/datum) && !istype(D,/client)) + if(!istype(D,/datum) && !isclient(D)) to_chat(usr, "This can only be used on instances of types /client or /datum") return if(!(href_list["var"] in D.vars)) @@ -594,7 +594,7 @@ if(!check_rights(R_VAREDIT)) return var/D = locateUID(href_list["datumchange"]) - if(!istype(D,/datum) && !istype(D,/client)) + if(!istype(D,/datum) && !isclient(D)) to_chat(usr, "This can only be used on instances of types /client or /datum") return diff --git a/code/datums/diseases/_MobProcs.dm b/code/datums/diseases/_MobProcs.dm index 552d30f6095..62bc1700e94 100644 --- a/code/datums/diseases/_MobProcs.dm +++ b/code/datums/diseases/_MobProcs.dm @@ -86,7 +86,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) diff --git a/code/datums/diseases/advance/symptoms/beard.dm b/code/datums/diseases/advance/symptoms/beard.dm index 75bf2267ff9..d2c9819e098 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 var/obj/item/organ/external/head/head_organ = H.get_organ("head") switch(A.stage) diff --git a/code/datums/diseases/advance/symptoms/damage_converter.dm b/code/datums/diseases/advance/symptoms/damage_converter.dm index 922a0ee2819..9b5fcf6981f 100644 --- a/code/datums/diseases/advance/symptoms/damage_converter.dm +++ b/code/datums/diseases/advance/symptoms/damage_converter.dm @@ -37,7 +37,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_organs(TRUE, TRUE, AFFECT_ORGANIC_ORGAN) //1,1 because it needs inputs. diff --git a/code/datums/diseases/advance/symptoms/shedding.dm b/code/datums/diseases/advance/symptoms/shedding.dm index a1f244c5566..f3affdbd097 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 to_chat(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 if(NO_HAIR in H.dna.species.species_traits) return // Hair can't fall out if you don't have any diff --git a/code/datums/diseases/advance/symptoms/skin.dm b/code/datums/diseases/advance/symptoms/skin.dm index a3346dce800..d1b8f37eec5 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.s_tone == -85) 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.s_tone == 85) return diff --git a/code/datums/diseases/advance/symptoms/youth.dm b/code/datums/diseases/advance/symptoms/youth.dm index 5165f7916f4..e95196aa254 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 6daf9eccf8e..5e5cfb4cbc1 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) && !isplasmaman(H)) if(!istype(H.head, /obj/item/clothing/head/wizard)) diff --git a/code/datums/mind.dm b/code/datums/mind.dm index d5582d6010f..19cdbed8fcd 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -608,7 +608,7 @@ var/list/possible_targets = list() var/list/possible_targets_random = list() for(var/datum/mind/possible_target in SSticker.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 // Allows for admins to pick off station roles if(!is_invalid_target(possible_target)) possible_targets_random += possible_target.current // For random picking, only valid targets diff --git a/code/datums/spell.dm b/code/datums/spell.dm index e40702f762f..2cc2e979dbc 100644 --- a/code/datums/spell.dm +++ b/code/datums/spell.dm @@ -375,7 +375,7 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell)) 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 @@ -393,11 +393,11 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell)) SHOULD_CALL_PARENT(TRUE) 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) to_chat(target, text("[message]")) if(sparks_spread) do_sparks(sparks_amt, 0, location) diff --git a/code/datums/spells/turf_teleport.dm b/code/datums/spells/turf_teleport.dm index e674405d0bb..4cbe53e51ca 100644 --- a/code/datums/spells/turf_teleport.dm +++ b/code/datums/spells/turf_teleport.dm @@ -25,7 +25,7 @@ var/list/turfs = new/list() for(var/turf/T in range(target,outer_tele_radius)) if(T in range(target,inner_tele_radius)) continue - if(istype(T,/turf/space) && !include_space) continue + if(isspaceturf(T) && !include_space) continue if(T.density && !include_dense) continue if(T.x>world.maxx-outer_tele_radius || T.xworld.maxy-outer_tele_radius || T.yYou leap and slam your head against the inside of [container]! Ouch!") user.AdjustParalysis(6 SECONDS) @@ -699,7 +699,7 @@ else to_chat(user, "Mood: You sense strange thoughts from [M.name].") - if(istype(M,/mob/living/carbon/human)) + if(ishuman(M)) var/numbers[0] var/mob/living/carbon/human/H = M if(H.mind && H.mind.initial_account) diff --git a/code/game/gamemodes/blob/blob_report.dm b/code/game/gamemodes/blob/blob_report.dm index de538be6ccd..91ebf25a66c 100644 --- a/code/game/gamemodes/blob/blob_report.dm +++ b/code/game/gamemodes/blob/blob_report.dm @@ -44,7 +44,7 @@ var/station_zlevel = level_name_to_num(MAIN_STATION) for(var/turf/T in block(locate(1, 1, station_zlevel), locate(world.maxx, world.maxy, station_zlevel))) - if(istype(T,/turf/simulated/floor)) + if(isfloorturf(T)) if(!(T:burnt)) src.floor += 12 else diff --git a/code/game/gamemodes/cult/cult_structures.dm b/code/game/gamemodes/cult/cult_structures.dm index 3a7ab920643..f1a7456e310 100644 --- a/code/game/gamemodes/cult/cult_structures.dm +++ b/code/game/gamemodes/cult/cult_structures.dm @@ -93,7 +93,7 @@ if(!QDELETED(src) && picked_type && Adjacent(user) && !user.incapacitated() && cooldowntime <= world.time) cooldowntime = world.time + creation_delay var/obj/O = new picked_type - if(istype(O, /obj/structure) || !user.put_in_hands(O)) + if(isstructure(O) || !user.put_in_hands(O)) O.forceMove(get_turf(src)) to_chat(user, replacetext("[creation_message]", "%ITEM%", "[O.name]")) diff --git a/code/game/gamemodes/miniantags/abduction/abduction_gear.dm b/code/game/gamemodes/miniantags/abduction/abduction_gear.dm index b6be18b0af5..a624c5c9431 100644 --- a/code/game/gamemodes/miniantags/abduction/abduction_gear.dm +++ b/code/game/gamemodes/miniantags/abduction/abduction_gear.dm @@ -272,7 +272,7 @@ var/list/all_items = M.GetAllContents() for(var/obj/I in all_items) - if(istype(I, /obj/item/radio)) + if(isradio(I)) var/obj/item/radio/R = I R.listening = FALSE // Prevents the radio from buzzing due to the EMP, preserving possible stealthiness. R.emp_act(1) diff --git a/code/game/gamemodes/miniantags/guardian/types/bomb.dm b/code/game/gamemodes/miniantags/guardian/types/bomb.dm index 0a472e626f3..510b72df978 100644 --- a/code/game/gamemodes/miniantags/guardian/types/bomb.dm +++ b/code/game/gamemodes/miniantags/guardian/types/bomb.dm @@ -22,7 +22,7 @@ if(get_dist(get_turf(src), get_turf(A)) > 1) to_chat(src, "You're too far from [A] to disguise it as a bomb.") return - if(istype(A, /obj/)) + if(isobj(A)) if(bomb_cooldown <= world.time && !stat) var/obj/item/guardian_bomb/B = new /obj/item/guardian_bomb(get_turf(A)) add_attack_logs(src, A, "booby trapped (summoner: [summoner])") diff --git a/code/game/gamemodes/miniantags/morph/morph.dm b/code/game/gamemodes/miniantags/morph/morph.dm index b6b2d2c2955..7b013e55f35 100644 --- a/code/game/gamemodes/miniantags/morph/morph.dm +++ b/code/game/gamemodes/miniantags/morph/morph.dm @@ -283,7 +283,7 @@ if(ambush_prepared) ambush_attack(L) return TRUE // No double attack - else if(istype(target,/obj/item)) // Eat items just to be annoying + else if(isitem(target)) // Eat items just to be annoying var/obj/item/I = target if(!I.anchored) try_eat(I) diff --git a/code/game/gamemodes/nuclear/nuclear.dm b/code/game/gamemodes/nuclear/nuclear.dm index 467ba4b3a1d..aea167d9dd6 100644 --- a/code/game/gamemodes/nuclear/nuclear.dm +++ b/code/game/gamemodes/nuclear/nuclear.dm @@ -309,7 +309,7 @@ /datum/game_mode/proc/is_operatives_are_dead() for(var/datum/mind/operative_mind in syndicates) - if(!istype(operative_mind.current,/mob/living/carbon/human)) + if(!ishuman(operative_mind.current)) if(operative_mind.current) if(operative_mind.current.stat!=2) return 0 diff --git a/code/game/gamemodes/wizard/artefact.dm b/code/game/gamemodes/wizard/artefact.dm index 7cfb1b219ff..710719016d6 100644 --- a/code/game/gamemodes/wizard/artefact.dm +++ b/code/game/gamemodes/wizard/artefact.dm @@ -718,7 +718,7 @@ GLOBAL_LIST_EMPTY(multiverse) if(unlimited) //no point, the list isn't used. 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/raginmages.dm b/code/game/gamemodes/wizard/raginmages.dm index 50b06cb4bac..307fe8ebad8 100644 --- a/code/game/gamemodes/wizard/raginmages.dm +++ b/code/game/gamemodes/wizard/raginmages.dm @@ -35,13 +35,13 @@ for(var/datum/mind/wizard in wizards) if(isnull(wizard.current)) continue - if(!istype(wizard.current,/mob/living/carbon)) + if(!iscarbon(wizard.current)) if(istype(get_area(wizard.current), /area/wizard_station)) // We don't want people camping other wizards to_chat(wizard.current, "If there aren't any admins on and another wizard is camping you in the wizard lair, report them on the forums") message_admins("[wizard.current] was transformed in the wizard lair, another wizard is likely camping") end_squabble(get_area(wizard.current)) continue - if(istype(wizard.current,/mob/living/carbon/brain)) + if(isbrain(wizard.current)) if(istype(get_area(wizard.current), /area/wizard_station)) // We don't want people camping other wizards to_chat(wizard.current, "If there aren't any admins on and another wizard is camping you in the wizard lair, report them on the forums") message_admins("[wizard.current] was brainified in the wizard lair, another wizard is likely camping") diff --git a/code/game/gamemodes/wizard/spellbook.dm b/code/game/gamemodes/wizard/spellbook.dm index eef025e45d0..5040e40de00 100644 --- a/code/game/gamemodes/wizard/spellbook.dm +++ b/code/game/gamemodes/wizard/spellbook.dm @@ -1050,7 +1050,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.flags |= NODROP | DROPDEL //curses! diff --git a/code/game/gamemodes/wizard/wizard.dm b/code/game/gamemodes/wizard/wizard.dm index f5edd987f33..967ba57175d 100644 --- a/code/game/gamemodes/wizard/wizard.dm +++ b/code/game/gamemodes/wizard/wizard.dm @@ -164,7 +164,7 @@ // Wizards for(var/datum/mind/wizard in wizards) - if(!istype(wizard.current,/mob/living/carbon)) + if(!iscarbon(wizard.current)) continue if(wizard.current.stat==DEAD) continue @@ -175,7 +175,7 @@ // Apprentices if(!wizards_alive) for(var/datum/mind/apprentice in apprentices) - if(!istype(apprentice.current,/mob/living/carbon)) + if(!iscarbon(apprentice.current)) continue if(apprentice.current.stat==DEAD) continue diff --git a/code/game/machinery/camera/tracking.dm b/code/game/machinery/camera/tracking.dm index 260973d20b6..3fd7f2ab21a 100644 --- a/code/game/machinery/camera/tracking.dm +++ b/code/game/machinery/camera/tracking.dm @@ -126,7 +126,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/HolodeckControl.dm b/code/game/machinery/computer/HolodeckControl.dm index 575cf031c39..4c9142bc298 100644 --- a/code/game/machinery/computer/HolodeckControl.dm +++ b/code/game/machinery/computer/HolodeckControl.dm @@ -498,7 +498,7 @@ w_class = WEIGHT_CLASS_SMALL playsound(user, 'sound/weapons/saberoff.ogg', 20, 1) to_chat(user, "[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/machinery/computer/sm_monitor.dm b/code/game/machinery/computer/sm_monitor.dm index e336d97c445..52ea9e88aff 100644 --- a/code/game/machinery/computer/sm_monitor.dm +++ b/code/game/machinery/computer/sm_monitor.dm @@ -100,7 +100,7 @@ return for(var/obj/machinery/atmospherics/supermatter_crystal/S in SSair.atmos_machinery) // Delaminating, not within coverage, not on a tile. - if(!(is_station_level(S.z) || is_mining_level(S.z) || atoms_share_level(S, T) || !istype(S.loc, /turf/simulated/))) + if(!(is_station_level(S.z) || is_mining_level(S.z) || atoms_share_level(S, T) || !issimulatedturf(S.loc))) continue supermatters.Add(S) diff --git a/code/game/machinery/portable_tag_turret.dm b/code/game/machinery/portable_tag_turret.dm index 7a9e1e88dbf..c45a754c971 100644 --- a/code/game/machinery/portable_tag_turret.dm +++ b/code/game/machinery/portable_tag_turret.dm @@ -93,7 +93,7 @@ if((istype(L.r_hand, target_weapon)) || (istype(L.l_hand, target_weapon))) return TURRET_PRIORITY_TARGET - if(istype(L, /mob/living/carbon/human)) + if(ishuman(L)) var/mob/living/carbon/human/H = L if(istype(H.wear_suit, target_suit)) return TURRET_PRIORITY_TARGET diff --git a/code/game/machinery/rechargestation.dm b/code/game/machinery/rechargestation.dm index ffcef83b661..e58941a6c59 100644 --- a/code/game/machinery/rechargestation.dm +++ b/code/game/machinery/rechargestation.dm @@ -213,7 +213,7 @@ return can_accept_user = 1 - else if(istype(user, /mob/living/carbon/human)) + else if(ishuman(user)) var/mob/living/carbon/human/H = user if(H.stat == DEAD) diff --git a/code/game/machinery/shieldgen.dm b/code/game/machinery/shieldgen.dm index a69eebad978..4ba44b31d1a 100644 --- a/code/game/machinery/shieldgen.dm +++ b/code/game/machinery/shieldgen.dm @@ -156,7 +156,7 @@ anchored = TRUE for(var/turf/target_tile in range(2, src)) - if(istype(target_tile,/turf/space) && !(locate(/obj/machinery/shield) in target_tile)) + if(isspaceturf(target_tile) && !(locate(/obj/machinery/shield) in target_tile)) if(malfunction && prob(33) || !malfunction) var/obj/machinery/shield/new_shield = new(target_tile) RegisterSignal(new_shield, COMSIG_PARENT_QDELETING, .proc/remove_shield) // Ensures they properly GC diff --git a/code/game/mecha/equipment/tools/medical_tools.dm b/code/game/mecha/equipment/tools/medical_tools.dm index 49178376df9..3e6e88708f2 100644 --- a/code/game/mecha/equipment/tools/medical_tools.dm +++ b/code/game/mecha/equipment/tools/medical_tools.dm @@ -281,7 +281,7 @@ return if(istype(target,/obj/item/reagent_containers/syringe)) return load_syringe(target) - if(istype(target,/obj/item/storage))//Loads syringes from boxes + if(isstorage(target))//Loads syringes from boxes for(var/obj/item/reagent_containers/syringe/S in target.contents) load_syringe(S) return @@ -516,7 +516,7 @@ /obj/item/mecha_parts/mecha_equipment/medical/rescue_jaw/action(atom/target) if(!action_checks(target)) return - if(istype(target, /obj)) + if(isobj(target)) if(!istype(target, /obj/machinery/door))//early return if we're not trying to open a door return var/obj/machinery/door/D = target //the door we want to open diff --git a/code/game/mecha/equipment/tools/work_tools.dm b/code/game/mecha/equipment/tools/work_tools.dm index 7f1c1ea2bac..a3b822947da 100644 --- a/code/game/mecha/equipment/tools/work_tools.dm +++ b/code/game/mecha/equipment/tools/work_tools.dm @@ -91,7 +91,7 @@ /obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/kill/action(atom/target) if(!action_checks(target)) return if(!cargo_holder) return - if(istype(target,/obj)) + if(isobj(target)) var/obj/O = target if(!O.anchored) if(cargo_holder.cargo.len < cargo_holder.cargo_capacity) @@ -110,7 +110,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 == INTENT_HARM) diff --git a/code/game/mecha/equipment/weapons/weapons.dm b/code/game/mecha/equipment/weapons/weapons.dm index 6ab36e84598..6807c5afe4b 100644 --- a/code/game/mecha/equipment/weapons/weapons.dm +++ b/code/game/mecha/equipment/weapons/weapons.dm @@ -213,7 +213,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(H.check_ear_prot() >= HEARING_PROTECTION_TOTAL) continue @@ -224,7 +224,7 @@ M.KnockDown(6 SECONDS) M.Jitter(40 SECONDS) ///else the mousetraps are useless - if(istype(M, /mob/living/carbon/human)) + if(ishuman(M)) var/mob/living/carbon/human/H = M if(isobj(H.shoes)) var/thingy = H.shoes diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 920c1c34053..d229c35c169 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -565,7 +565,7 @@ GLOBAL_DATUM_INIT(welding_sparks, /mutable_appearance, mutable_appearance('icons to_chat(user, "You're going to need to remove that mask/helmet/glasses first!") return - if(istype(M, /mob/living/carbon/alien) || istype(M, /mob/living/simple_animal/slime))//Aliens don't have eyes./N slimes also don't have eyes! + if(isalien(M) || isslime(M))//Aliens don't have eyes./N slimes also don't have eyes! to_chat(user, "You cannot locate any eyes on this creature!") return @@ -669,7 +669,7 @@ GLOBAL_DATUM_INIT(welding_sparks, /mutable_appearance, mutable_appearance('icons /obj/item/proc/remove_item_from_storage(atom/newLoc) //please use this if you're going to snowflake an item out of a obj/item/storage if(!newLoc) return 0 - if(istype(loc,/obj/item/storage)) + if(isstorage(loc)) var/obj/item/storage/S = loc S.remove_from_storage(src,newLoc) return 1 diff --git a/code/game/objects/items/devices/chameleonproj.dm b/code/game/objects/items/devices/chameleonproj.dm index 5265c92439c..140f13e6695 100644 --- a/code/game/objects/items/devices/chameleonproj.dm +++ b/code/game/objects/items/devices/chameleonproj.dm @@ -38,7 +38,7 @@ if(target.invisibility != 0) return if(!active_dummy) - if(istype(target,/obj/item) && !istype(target, /obj/item/disk/nuclear)) + if(isitem(target) && !istype(target, /obj/item/disk/nuclear)) playsound(get_turf(src), 'sound/weapons/flash.ogg', 100, 1, -6) to_chat(user, "Scanned [target].") saved_item = target.type diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm index 067a16a4bce..ffdb4d240fd 100644 --- a/code/game/objects/items/devices/flashlight.dm +++ b/code/game/objects/items/devices/flashlight.dm @@ -49,7 +49,7 @@ if((HAS_TRAIT(user, TRAIT_CLUMSY) || user.getBrainLoss() >= 60) && prob(50)) //too dumb to use flashlight properly return ..() //just hit them in the head - if(!(istype(user, /mob/living/carbon/human) || SSticker) && SSticker.mode.name != "monkey") //don't have dexterity + if(!(ishuman(user) || SSticker) && SSticker.mode.name != "monkey") //don't have dexterity to_chat(user, "You don't have the dexterity to do this!") return diff --git a/code/game/objects/items/devices/traitordevices.dm b/code/game/objects/items/devices/traitordevices.dm index 46407f7e2cf..e07104e1401 100644 --- a/code/game/objects/items/devices/traitordevices.dm +++ b/code/game/objects/items/devices/traitordevices.dm @@ -59,7 +59,7 @@ /obj/item/teleporter/emp_act(severity) var/teleported_something = FALSE if(prob(50 / severity)) - if(istype(loc, /mob/living/carbon/human)) + if(ishuman(loc)) var/mob/living/carbon/human/user = loc to_chat(user, "[src] buzzes and activates!") attempt_teleport(user, TRUE) diff --git a/code/game/objects/items/robot/robot_parts.dm b/code/game/objects/items/robot/robot_parts.dm index cb839e8f237..053b9739fae 100644 --- a/code/game/objects/items/robot/robot_parts.dm +++ b/code/game/objects/items/robot/robot_parts.dm @@ -320,7 +320,7 @@ else to_chat(user, "The MMI must go in after everything else!") - if(istype(W,/obj/item/pen)) + if(is_pen(W)) to_chat(user, "You need to use a multitool to name [src]!") return diff --git a/code/game/objects/items/stacks/nanopaste.dm b/code/game/objects/items/stacks/nanopaste.dm index 11a5dc4c39c..234cbb4c73b 100644 --- a/code/game/objects/items/stacks/nanopaste.dm +++ b/code/game/objects/items/stacks/nanopaste.dm @@ -23,7 +23,7 @@ else to_chat(user, "All [R]'s systems are nominal.") - if(istype(M,/mob/living/carbon/human)) //Repairing robotic limbs and IPCs + if(ishuman(M)) //Repairing robotic limbs and IPCs var/mob/living/carbon/human/H = M var/obj/item/organ/external/S = H.get_organ(user.zone_selected) diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index c11cb8a378e..fd5e19ee9c3 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -169,7 +169,7 @@ item_state = "sword0" w_class = WEIGHT_CLASS_SMALL - 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 78ca25e45dd..28110116ab4 100644 --- a/code/game/objects/items/weapons/clown_items.dm +++ b/code/game/objects/items/weapons/clown_items.dm @@ -56,7 +56,7 @@ cooldown = world.time + 30 SECONDS var/turf/T = get_turf(src) for(var/mob/living/carbon/M in ohearers(7, T)) - if(istype(M, /mob/living/carbon/human)) + if(ishuman(M)) var/mob/living/carbon/human/H = M if(!H.can_hear()) continue diff --git a/code/game/objects/items/weapons/dna_injector.dm b/code/game/objects/items/weapons/dna_injector.dm index a0409084346..ae8c99fbaca 100644 --- a/code/game/objects/items/weapons/dna_injector.dm +++ b/code/game/objects/items/weapons/dna_injector.dm @@ -70,10 +70,10 @@ /obj/item/dnainjector/proc/inject(mob/living/M, mob/user) if(used) return - if(istype(M,/mob/living)) + if(isliving(M)) M.apply_effect(rand(20 / (damage_coeff ** 2), 50 / (damage_coeff ** 2)), IRRADIATE) var/mob/living/carbon/human/H - if(istype(M, /mob/living/carbon/human)) + if(ishuman(M)) H = M if(!buf) diff --git a/code/game/objects/items/weapons/garrote.dm b/code/game/objects/items/weapons/garrote.dm index 8787c888b38..f7cae4532eb 100644 --- a/code/game/objects/items/weapons/garrote.dm +++ b/code/game/objects/items/weapons/garrote.dm @@ -45,7 +45,7 @@ if(garrote_time > world.time) // Cooldown return - if(!istype(user, /mob/living/carbon/human)) // spap_hand is a proc of /mob/living, user is simply /mob + if(!ishuman(user)) // spap_hand is a proc of /mob/living, user is simply /mob return var/mob/living/carbon/human/U = user @@ -54,7 +54,7 @@ to_chat(user, "You must use both hands to garrote [M]!") return - if(!istype(M, /mob/living/carbon/human)) + if(!ishuman(M)) to_chat(user, "You don't think that garroting [M] would be very effective...") return @@ -109,7 +109,7 @@ return - if(!istype(loc, /mob/living/carbon/human)) + if(!ishuman(loc)) strangling = null update_icon(UPDATE_ICON_STATE) STOP_PROCESSING(SSobj, src) diff --git a/code/game/objects/items/weapons/grenades/clowngrenade.dm b/code/game/objects/items/weapons/grenades/clowngrenade.dm index dba0bd67cb9..d76ca1ad7f8 100644 --- a/code/game/objects/items/weapons/grenades/clowngrenade.dm +++ b/code/game/objects/items/weapons/grenades/clowngrenade.dm @@ -41,7 +41,7 @@ /obj/item/grown/bananapeel/traitorpeel/throw_impact(atom/hit_atom) var/burned = rand(1,3) - if(istype(hit_atom ,/mob/living)) + if(isliving(hit_atom)) var/mob/living/M = hit_atom M.take_organ_damage(0, burned) return ..() diff --git a/code/game/objects/items/weapons/melee/energy.dm b/code/game/objects/items/weapons/melee/energy.dm index 03154af7030..513a930968c 100644 --- a/code/game/objects/items/weapons/melee/energy.dm +++ b/code/game/objects/items/weapons/melee/energy.dm @@ -77,7 +77,7 @@ playsound(user, 'sound/weapons/saberoff.ogg', 35, 1) //changed it from 50% volume to 35% because deafness set_light(0) to_chat(user, "[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.dm b/code/game/objects/items/weapons/shields.dm index 7d30bcfc644..171fa84a3ef 100644 --- a/code/game/objects/items/weapons/shields.dm +++ b/code/game/objects/items/weapons/shields.dm @@ -104,7 +104,7 @@ w_class = WEIGHT_CLASS_TINY playsound(user, 'sound/weapons/saberoff.ogg', 35, 1) to_chat(user, "[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() @@ -148,7 +148,7 @@ w_class = WEIGHT_CLASS_NORMAL slot_flags = null to_chat(user, "[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/soap.dm b/code/game/objects/items/weapons/soap.dm index e394affd562..84249f3e11b 100644 --- a/code/game/objects/items/weapons/soap.dm +++ b/code/game/objects/items/weapons/soap.dm @@ -62,7 +62,7 @@ to_chat(user, "You 'clean' \the [target.name].") if(issimulatedturf(target)) new /obj/effect/decal/cleanable/blood/gibs/cleangibs(target) - else if(istype(target,/mob/living/carbon)) + else if(iscarbon(target)) for(var/obj/item/carried_item in target.contents) if(!istype(carried_item, /obj/item/implant))//If it's not an implant. carried_item.add_mob_blood(target)//Oh yes, there will be blood... diff --git a/code/game/objects/items/weapons/storage/internal.dm b/code/game/objects/items/weapons/storage/internal.dm index 278f1af1403..6051a579d89 100644 --- a/code/game/objects/items/weapons/storage/internal.dm +++ b/code/game/objects/items/weapons/storage/internal.dm @@ -32,7 +32,7 @@ /obj/item/storage/internal/proc/handle_mousedrop(mob/user as mob, obj/over_object as obj) if(ishuman(user)) //so monkeys can take off their backpacks -- Urist - if(istype(user.loc,/obj/mecha)) // stops inventory actions in a mech + if(ismecha(user.loc)) // stops inventory actions in a mech return 0 if(over_object == user && Adjacent(user)) // this must come before the screen objects only block diff --git a/code/game/objects/items/weapons/twohanded.dm b/code/game/objects/items/weapons/twohanded.dm index 013b4893559..66a9707a810 100644 --- a/code/game/objects/items/weapons/twohanded.dm +++ b/code/game/objects/items/weapons/twohanded.dm @@ -822,7 +822,7 @@ Z.ex_act(2) charged = 3 playsound(user, 'sound/weapons/marauder.ogg', 50, 1) - else if(istype(A, /obj/structure) || ismecha(A)) + else if(isstructure(A) || ismecha(A)) var/obj/Z = A Z.ex_act(2) charged = 3 diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index 809c5b44520..aa01fc3e47b 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -146,7 +146,7 @@ // check for TK users - if(istype(usr, /mob/living/carbon/human)) + if(ishuman(usr)) if(istype(usr.l_hand, /obj/item/tk_grab) || istype(usr.r_hand, /obj/item/tk_grab/)) if(!(usr in nearby)) if(usr.client && usr.machine == src) 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 e6cf7bdc1ef..acf4d1174b9 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm @@ -545,7 +545,7 @@ smash(user) /obj/item/chair/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("[user] breaks [src] over [M]'s back!.") user.unEquip(src) var/obj/item/stack/sheet/metal/m = new/obj/item/stack/sheet/metal diff --git a/code/modules/admin/db_ban/functions.dm b/code/modules/admin/db_ban/functions.dm index b6d113b67a2..3a33ff05246 100644 --- a/code/modules/admin/db_ban/functions.dm +++ b/code/modules/admin/db_ban/functions.dm @@ -102,7 +102,7 @@ var/a_computerid var/a_ip - if(src.owner && istype(src.owner, /client)) + if(src.owner && isclient(src.owner)) a_ckey = src.owner:ckey a_computerid = src.owner:computer_id a_ip = src.owner:address @@ -405,7 +405,7 @@ to_chat(usr, "Database update failed due to multiple bans having the same ID. Contact the database admin.") return - if(!src.owner || !istype(src.owner, /client)) + if(!src.owner || !isclient(src.owner)) return var/unban_ckey = src.owner:ckey diff --git a/code/modules/admin/player_panel.dm b/code/modules/admin/player_panel.dm index 55d711abcb7..6f17661f0ca 100644 --- a/code/modules/admin/player_panel.dm +++ b/code/modules/admin/player_panel.dm @@ -379,7 +379,7 @@ if(istype(disk_loc, /mob)) var/mob/M = disk_loc dat += "carried by [M.real_name] " - if(istype(disk_loc, /obj)) + if(isobj(disk_loc)) var/obj/O = disk_loc dat += "in \a [O.name] " disk_loc = disk_loc.loc diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 7eb73e0ea86..4ac41d0124b 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -1138,7 +1138,7 @@ 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/orange(prisoner), slot_w_uniform) prisoner.equip_to_slot_or_del(new /obj/item/clothing/shoes/orange(prisoner), slot_shoes) @@ -1347,7 +1347,7 @@ I.plane = initial(I.plane) 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(observer), slot_w_uniform) observer.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(observer), slot_shoes) diff --git a/code/modules/admin/verbs/SDQL2/SDQL_2.dm b/code/modules/admin/verbs/SDQL2/SDQL_2.dm index ad8b1ff90d0..2839c309a6e 100644 --- a/code/modules/admin/verbs/SDQL2/SDQL_2.dm +++ b/code/modules/admin/verbs/SDQL2/SDQL_2.dm @@ -134,7 +134,7 @@ if(!temp.vv_edit_var(v, SDQL_expression(d, set_list[sets]))) to_chat(usr, "[temp] rejected your varedit.") break - if(temp.vars.Find(v) && (istype(temp.vars[v], /datum) || istype(temp.vars[v], /client))) + if(temp.vars.Find(v) && (istype(temp.vars[v], /datum) || isclient(temp.vars[v]))) temp = temp.vars[v] else break diff --git a/code/modules/admin/verbs/adminpm.dm b/code/modules/admin/verbs/adminpm.dm index 348d5690ecd..b953bf7d9fe 100644 --- a/code/modules/admin/verbs/adminpm.dm +++ b/code/modules/admin/verbs/adminpm.dm @@ -65,7 +65,7 @@ var/client/C if(istext(whom)) C = get_client_by_ckey(whom) - else if(istype(whom,/client)) + else if(isclient(whom)) C = whom if(!C) diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm index e29e5370562..d2feb084b75 100644 --- a/code/modules/admin/verbs/debug.dm +++ b/code/modules/admin/verbs/debug.dm @@ -281,7 +281,7 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention) if(!SSticker) 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].") spawn(10) M:Robotize() @@ -452,7 +452,7 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention) if(!SSticker) alert("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/modifyvariables.dm b/code/modules/admin/verbs/modifyvariables.dm index 455726e408b..a03320875a8 100644 --- a/code/modules/admin/verbs/modifyvariables.dm +++ b/code/modules/admin/verbs/modifyvariables.dm @@ -31,13 +31,13 @@ GLOBAL_PROTECT(VVmaint_only) else if(ismob(var_value)) . = VV_MOB_REFERENCE - else if(isloc(var_value)) + else if(isatom(var_value)) . = VV_ATOM_REFERENCE else if(istype(var_value, /matrix)) . = VV_MATRIX - else if(istype(var_value,/client)) + else if(isclient(var_value)) . = VV_CLIENT else if(istype(var_value, /datum)) diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index 75678db3067..c9feeab4ea9 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -36,7 +36,7 @@ L.Paralyse(10 SECONDS) sleep(5) //so they black out before warping M.loc = pick(GLOB.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/orange(prisoner), slot_w_uniform) prisoner.equip_to_slot_or_del(new /obj/item/clothing/shoes/orange(prisoner), slot_shoes) diff --git a/code/modules/antagonists/traitor/datum_traitor.dm b/code/modules/antagonists/traitor/datum_traitor.dm index 3e7c6d014cd..84f82f82f76 100644 --- a/code/modules/antagonists/traitor/datum_traitor.dm +++ b/code/modules/antagonists/traitor/datum_traitor.dm @@ -208,7 +208,7 @@ to_chat(traitor_mob, "Unfortunately, the Syndicate wasn't able to give you an uplink.") return FALSE // They had no PDA or radio for whatever reason. - if(istype(R, /obj/item/radio)) + if(isradio(R)) // generate list of radio freqs var/obj/item/radio/target_radio = R var/freq = PUBLIC_LOW_FREQ diff --git a/code/modules/assembly/voice.dm b/code/modules/assembly/voice.dm index 1424d0090ad..287c5fdb4cb 100644 --- a/code/modules/assembly/voice.dm +++ b/code/modules/assembly/voice.dm @@ -24,7 +24,7 @@ hear_input(M, msg, 1) /obj/item/assembly/voice/proc/hear_input(mob/living/M as mob, msg, type) - if(!istype(M,/mob/living)) + if(!isliving(M)) return if(listening) diff --git a/code/modules/buildmode/submodes/basic.dm b/code/modules/buildmode/submodes/basic.dm index 86988a24e01..d488ed30dc7 100644 --- a/code/modules/buildmode/submodes/basic.dm +++ b/code/modules/buildmode/submodes/basic.dm @@ -21,25 +21,25 @@ if(istype(object,/turf) && left_click && !alt_click && !ctrl_click) var/turf/T = object - if(istype(object,/turf/space)) + if(isspaceturf(object)) T.ChangeTurf(/turf/simulated/floor/plasteel) - else if(istype(object,/turf/simulated/floor)) + else if(isfloorturf(object)) T.ChangeTurf(/turf/simulated/wall) - else if(istype(object,/turf/simulated/wall)) + else if(iswallturf(object)) T.ChangeTurf(/turf/simulated/wall/r_wall) log_admin("Build Mode: [key_name(user)] built [T] at ([T.x],[T.y],[T.z])") else if(right_click) log_admin("Build Mode: [key_name(user)] deleted [object] at ([object.x],[object.y],[object.z])") - if(istype(object,/turf/simulated/wall)) + if(iswallturf(object)) var/turf/T = object T.ChangeTurf(/turf/simulated/floor/plasteel) - else if(istype(object,/turf/simulated/floor)) + else if(isfloorturf(object)) var/turf/T = object T.ChangeTurf(T.baseturf) - else if(istype(object,/turf/simulated/wall/r_wall)) + else if(isreinforcedwallturf(object)) var/turf/T = object T.ChangeTurf(/turf/simulated/wall) - else if(istype(object,/obj)) + else if(isobj(object)) qdel(object) else if(istype(object,/turf) && alt_click && left_click) log_admin("Build Mode: [key_name(user)] built an airlock at ([object.x],[object.y],[object.z])") diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index f6bdefbe5ea..4c0174770d5 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -87,7 +87,7 @@ if(slot in list(slot_r_hand, slot_l_hand, slot_in_backpack, slot_l_store, slot_r_store)) return 1 - if(species_restricted && istype(M,/mob/living/carbon/human)) + if(species_restricted && ishuman(M)) var/wearable = null var/exclusive = null @@ -335,7 +335,7 @@ BLIND // can't see anything to_chat(user, "Your suit will now report your vital lifesigns.") if(SUIT_SENSOR_TRACKING) to_chat(user, "Your suit will now report your vital lifesigns as well as your coordinate position.") - if(istype(user,/mob/living/carbon/human)) + if(ishuman(user)) var/mob/living/carbon/human/H = user if(H.w_uniform == src) H.update_suit_sensors() @@ -354,7 +354,7 @@ BLIND // can't see anything if(SUIT_SENSOR_TRACKING) for(var/mob/V in viewers(user, 1)) V.show_message("[user] sets [src.loc]'s sensors to maximum.", 1) - if(istype(src,/mob/living/carbon/human)) + if(ishuman(src)) var/mob/living/carbon/human/H = src if(H.w_uniform == src) H.update_suit_sensors() diff --git a/code/modules/clothing/spacesuits/hardsuit.dm b/code/modules/clothing/spacesuits/hardsuit.dm index d42bd705c53..28f39c2f5f7 100644 --- a/code/modules/clothing/spacesuits/hardsuit.dm +++ b/code/modules/clothing/spacesuits/hardsuit.dm @@ -56,7 +56,7 @@ on = !on icon_state = "[basestate][on]-[item_color]" - if(istype(user,/mob/living/carbon/human)) + if(ishuman(user)) var/mob/living/carbon/human/H = user H.update_inv_head() diff --git a/code/modules/clothing/suits/armor.dm b/code/modules/clothing/suits/armor.dm index 0807e02bfbd..bf69ad8e99d 100644 --- a/code/modules/clothing/suits/armor.dm +++ b/code/modules/clothing/suits/armor.dm @@ -374,7 +374,7 @@ icon_state = "reactiveoff" item_state = "reactiveoff" addtimer(CALLBACK(src, .proc/reboot), disable_time SECONDS) - 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/under/accessories/holster.dm b/code/modules/clothing/under/accessories/holster.dm index c8a57742e4b..000525370ca 100644 --- a/code/modules/clothing/under/accessories/holster.dm +++ b/code/modules/clothing/under/accessories/holster.dm @@ -59,7 +59,7 @@ if(!holstered) return - if(istype(user.get_active_hand(),/obj) && istype(user.get_inactive_hand(),/obj)) + if(isobj(user.get_active_hand()) && isobj(user.get_inactive_hand())) to_chat(user, "You need an empty hand to draw [holstered]!") else if(user.a_intent == INTENT_HARM) diff --git a/code/modules/customitems/item_defines.dm b/code/modules/customitems/item_defines.dm index ff4c93ec2e5..4e8b1a515f8 100644 --- a/code/modules/customitems/item_defines.dm +++ b/code/modules/customitems/item_defines.dm @@ -42,7 +42,7 @@ to_chat(user, "[src] is out of ink.") return - if(!istype(M, /mob/living/carbon/human)) + if(!ishuman(M)) to_chat(user, "You don't think tattooing [M] is the best idea.") return diff --git a/code/modules/detective_work/detective_work.dm b/code/modules/detective_work/detective_work.dm index 4933ff29474..98e119402f1 100644 --- a/code/modules/detective_work/detective_work.dm +++ b/code/modules/detective_work/detective_work.dm @@ -3,7 +3,7 @@ /atom/var/list/suit_fibers /atom/proc/add_fibers(mob/living/carbon/human/M) - if(M.gloves && istype(M.gloves,/obj/item/clothing/)) + if(M.gloves && isclothing(M.gloves)) var/obj/item/clothing/gloves/G = M.gloves if(G.transfer_blood > 1) //bloodied gloves transfer blood to touched objects if(add_blood(G.blood_DNA, G.blood_color)) //only reduces the bloodiness of our gloves if the item wasn't already bloody @@ -13,7 +13,7 @@ M.bloody_hands-- if(!suit_fibers) suit_fibers = list() var/fibertext - var/item_multiplier = istype(src,/obj/item)?1.2:1 + var/item_multiplier = isitem(src)?1.2:1 if(M.wear_suit) fibertext = "Material from \a [M.wear_suit]." if(prob(10*item_multiplier) && !(fibertext in suit_fibers) && M.wear_suit.can_leave_fibers) diff --git a/code/modules/detective_work/evidence.dm b/code/modules/detective_work/evidence.dm index 73655a0fc91..e5954b0e1b2 100644 --- a/code/modules/detective_work/evidence.dm +++ b/code/modules/detective_work/evidence.dm @@ -38,7 +38,7 @@ return if(!isturf(I.loc)) //If it isn't on the floor. Do some checks to see if it's in our hands or a box. Otherwise give up. - if(istype(I.loc,/obj/item/storage)) //in a container. + if(isstorage(I.loc)) //in a container. var/obj/item/storage/U = I.loc U.remove_from_storage(I, src) else if(user.l_hand == I) //in a hand diff --git a/code/modules/economy/EFTPOS.dm b/code/modules/economy/EFTPOS.dm index 87df083d1cc..b18573bd31c 100644 --- a/code/modules/economy/EFTPOS.dm +++ b/code/modules/economy/EFTPOS.dm @@ -40,7 +40,7 @@ R.overlays += stampoverlay R.stamps += "
This paper has been stamped by the EFTPOS device." var/obj/item/smallDelivery/D = new(get_turf(loc)) - if(istype(loc, /mob/living/carbon/human)) + if(ishuman(loc)) var/mob/living/carbon/human/H = loc if(H.back) D.forceMove(H.back) diff --git a/code/modules/events/undead.dm b/code/modules/events/undead.dm index 57eccc85ceb..9dab86beb5d 100644 --- a/code/modules/events/undead.dm +++ b/code/modules/events/undead.dm @@ -15,7 +15,7 @@ if(A.type == /area) continue var/list/turflist = list() for(var/turf/T in A) - if(istype(T,/turf/space) || T.density) continue + if(isspaceturf(T) || T.density) continue if(locate(/mob/living) in T) continue var/okay = 1 for(var/obj/O in T) diff --git a/code/modules/food_and_drinks/food/foods/pizza.dm b/code/modules/food_and_drinks/food/foods/pizza.dm index 1f0b6157950..7ad5ce2603f 100644 --- a/code/modules/food_and_drinks/food/foods/pizza.dm +++ b/code/modules/food_and_drinks/food/foods/pizza.dm @@ -362,7 +362,7 @@ to_chat(user, "You try to push [I] through the lid but it doesn't work!") return - if(istype(I, /obj/item/pen/)) + if(is_pen(I)) if(open) return var/t = clean_input("Enter what you want to add to the tag:", "Write", null) diff --git a/code/modules/food_and_drinks/food/snacks.dm b/code/modules/food_and_drinks/food/snacks.dm index dcf4094f762..43cc43e6992 100644 --- a/code/modules/food_and_drinks/food/snacks.dm +++ b/code/modules/food_and_drinks/food/snacks.dm @@ -80,10 +80,10 @@ /obj/item/reagent_containers/food/snacks/attackby(obj/item/W, mob/user, params) - if(istype(W,/obj/item/pen)) + if(is_pen(W)) rename_interactive(user, W, use_prefix = FALSE, prompt = "What would you like to name this dish?") return - if(istype(W,/obj/item/storage)) + if(isstorage(W)) ..() // -> item/attackby(, params) else if(istype(W,/obj/item/kitchen/utensil)) @@ -118,7 +118,7 @@ var/obj/item/TrashItem if(ispath(trash,/obj/item)) TrashItem = new trash(src) - else if(istype(trash,/obj/item)) + else if(isitem(trash)) TrashItem = trash TrashItem.forceMove(loc) qdel(src) diff --git a/code/modules/food_and_drinks/kitchen_machinery/gibber.dm b/code/modules/food_and_drinks/kitchen_machinery/gibber.dm index 9a6f69f4ef5..7c664a25791 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/gibber.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/gibber.dm @@ -377,7 +377,7 @@ if(!istype(H)) return 0 if(H != occupant) return 0 //only using H as a shortcut to typecast for(var/obj/O in H) - if(istype(O,/obj/item/clothing)) //clothing gets skipped to avoid cleaning out shit + if(isclothing(O)) //clothing gets skipped to avoid cleaning out shit continue if(istype(O,/obj/item/implant)) var/obj/item/implant/I = O diff --git a/code/modules/food_and_drinks/kitchen_machinery/monkeyrecycler.dm b/code/modules/food_and_drinks/kitchen_machinery/monkeyrecycler.dm index 35a1d2e5c04..50aa9149a37 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/monkeyrecycler.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/monkeyrecycler.dm @@ -85,7 +85,7 @@ GLOBAL_LIST_EMPTY(monkey_recyclers) if(istype(O, /obj/item/grab)) var/obj/item/grab/G = O var/grabbed = G.affecting - if(istype(grabbed, /mob/living/carbon/human)) + if(ishuman(grabbed)) var/mob/living/carbon/human/target = grabbed if(issmall(target)) if(target.stat == 0) diff --git a/code/modules/holiday/christmas.dm b/code/modules/holiday/christmas.dm index b3e1421d751..f3f8cbb1292 100644 --- a/code/modules/holiday/christmas.dm +++ b/code/modules/holiday/christmas.dm @@ -34,7 +34,7 @@ var/cracked = 0 /obj/item/toy/xmas_cracker/attack(mob/target, mob/user) - if( !cracked && istype(target,/mob/living/carbon/human) && (target.stat == CONSCIOUS) && !target.get_active_hand() ) + if( !cracked && ishuman(target) && (target.stat == CONSCIOUS) && !target.get_active_hand() ) target.visible_message("[user] and [target] pop \an [src]! *pop*", "You pull \an [src] with [target]! *pop*", "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/modules/hydroponics/hydroponics.dm b/code/modules/hydroponics/hydroponics.dm index 9400ec83e6b..a9bb413707c 100644 --- a/code/modules/hydroponics/hydroponics.dm +++ b/code/modules/hydroponics/hydroponics.dm @@ -756,7 +756,7 @@ var/irrigate = 0 //How am I supposed to irrigate pill contents? var/transfer_amount - if(istype(reagent_source, /obj/item/reagent_containers/food/snacks) || istype(reagent_source, /obj/item/reagent_containers/food/pill)) + if(istype(reagent_source, /obj/item/reagent_containers/food/snacks) || ispill(reagent_source)) visi_msg="[user] composts [reagent_source], spreading it through [target]" transfer_amount = reagent_source.reagents.total_volume else @@ -794,7 +794,7 @@ S.my_atom = H reagent_source.reagents.trans_to(S,split) - if(istype(reagent_source, /obj/item/reagent_containers/food/snacks) || istype(reagent_source, /obj/item/reagent_containers/food/pill)) + if(istype(reagent_source, /obj/item/reagent_containers/food/snacks) || ispill(reagent_source)) qdel(reagent_source) H.applyChemicals(S, user) diff --git a/code/modules/mob/holder.dm b/code/modules/mob/holder.dm index b85d79fe466..11bc5354e53 100644 --- a/code/modules/mob/holder.dm +++ b/code/modules/mob/holder.dm @@ -52,7 +52,7 @@ M.unEquip(src) to_chat(M, "[src] wriggles out of your grip!") to_chat(L, "You wriggle out of [M]'s grip!") - else if(istype(loc,/obj/item)) + else if(isitem(loc)) to_chat(L, "You struggle free of [loc].") forceMove(get_turf(src)) diff --git a/code/modules/mob/living/carbon/brain/brain.dm b/code/modules/mob/living/carbon/brain/brain.dm index 5aabcf5da21..170e343a311 100644 --- a/code/modules/mob/living/carbon/brain/brain.dm +++ b/code/modules/mob/living/carbon/brain/brain.dm @@ -38,9 +38,9 @@ return 0 else return 1 - if(istype(other, /mob/living/carbon/human)) + if(ishuman(other)) return 1 - if(istype(other, /mob/living/simple_animal/slime)) + if(isslime(other)) return 1 return ..() diff --git a/code/modules/mob/living/carbon/brain/brain_item.dm b/code/modules/mob/living/carbon/brain/brain_item.dm index 839493cc831..c2d1235ba6b 100644 --- a/code/modules/mob/living/carbon/brain/brain_item.dm +++ b/code/modules/mob/living/carbon/brain/brain_item.dm @@ -64,7 +64,7 @@ if(owner.mind && !non_primary)//don't transfer if the owner does not have a mind. B.transfer_identity(user) - if(istype(owner,/mob/living/carbon/human)) + if(ishuman(owner)) var/mob/living/carbon/human/H = owner H.update_hair() @@ -75,7 +75,7 @@ name = "[initial(name)]" var/brain_already_exists = 0 - if(istype(target,/mob/living/carbon/human)) // No more IPC multibrain shenanigans + if(ishuman(target)) // No more IPC multibrain shenanigans if(target.get_int_organ(/obj/item/organ/internal/brain)) brain_already_exists = 1 diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 8e1fbd0011e..767ba85ecbb 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -61,7 +61,7 @@ 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("chest") if(istype(organ)) @@ -708,7 +708,7 @@ GLOBAL_LIST_INIT(ventcrawl_machinery, list(/obj/machinery/atmospherics/unary/ven back = null update_inv_back() else if(I == wear_mask) - if(istype(src, /mob/living/carbon/human)) //If we don't do this hair won't be properly rebuilt. + if(ishuman(src)) //If we don't do this hair won't be properly rebuilt. return wear_mask = null update_inv_wear_mask() @@ -1067,7 +1067,7 @@ GLOBAL_LIST_INIT(ventcrawl_machinery, list(/obj/machinery/atmospherics/unary/ven return FALSE if(!(slipAny)) - if(istype(src, /mob/living/carbon/human)) + if(ishuman(src)) var/mob/living/carbon/human/H = src if(isobj(H.shoes) && H.shoes.flags & NOSLIP) return FALSE diff --git a/code/modules/mob/living/carbon/carbon_defense.dm b/code/modules/mob/living/carbon/carbon_defense.dm index 6094c5161d3..e2236a7cc0b 100644 --- a/code/modules/mob/living/carbon/carbon_defense.dm +++ b/code/modules/mob/living/carbon/carbon_defense.dm @@ -1,7 +1,7 @@ /mob/living/carbon/hitby(atom/movable/AM, skipcatch, hitpush = TRUE, blocked = FALSE, datum/thrownthing/throwingdatum) if(!skipcatch) if(in_throw_mode && !HAS_TRAIT(src, TRAIT_HANDS_BLOCKED) && !restrained()) //Makes sure player is in throw mode - if(!istype(AM,/obj/item) || !isturf(AM.loc)) + if(!isitem(AM) || !isturf(AM.loc)) return FALSE if(get_active_hand()) return FALSE diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index e69fa253e1e..f26495df571 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -379,7 +379,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, hudtype) - if(istype(M, /mob/living/carbon/human)) + if(ishuman(M)) var/have_hudtypes = list() var/mob/living/carbon/human/H = M diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 9a05f9b8a18..79c13005905 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -161,7 +161,7 @@ emp_act var/list/body_parts = list(head, wear_mask, wear_suit, w_uniform, back, gloves, shoes, belt, s_store, glasses, l_ear, r_ear, wear_id) //Everything but pockets. Pockets are l_store and r_store. (if pockets were allowed, putting something armored, gloves or hats for example, would double up on the armor) for(var/bp in body_parts) if(!bp) continue - if(bp && istype(bp ,/obj/item/clothing)) + if(bp && isclothing(bp)) var/obj/item/clothing/C = bp if(C.body_parts_covered & def_zone.body_part) protection += C.armor.getRating(type) @@ -187,24 +187,24 @@ emp_act var/list/body_parts = list(head, wear_mask, wear_suit, w_uniform) for(var/bp in body_parts) if(!bp) continue - if(bp && istype(bp ,/obj/item/clothing)) + if(bp && isclothing(bp)) var/obj/item/clothing/C = bp if(C.body_parts_covered & HEAD) return 1 return 0 /mob/living/carbon/human/proc/check_reflect(def_zone) //Reflection checks for anything in your l_hand, r_hand, or wear_suit based on the reflection chance var of the object - if(wear_suit && istype(wear_suit, /obj/item/)) + if(wear_suit && isitem(wear_suit)) var/obj/item/I = wear_suit if(I.IsReflect(def_zone) == 1) return 1 - if(l_hand && istype(l_hand, /obj/item/)) + if(l_hand && isitem(l_hand)) var/obj/item/I = l_hand if(I.IsReflect(def_zone) == 1) return 1 if(I.IsReflect(def_zone) == 2) //Toy swords return 2 - if(r_hand && istype(r_hand, /obj/item/)) + if(r_hand && isitem(r_hand)) var/obj/item/I = r_hand if(I.IsReflect(def_zone) == 1) return 1 diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm index 9c255f6f0c4..b7e52cb137e 100644 --- a/code/modules/mob/living/carbon/life.dm +++ b/code/modules/mob/living/carbon/life.dm @@ -44,7 +44,7 @@ if(times_fired % 2 == 1) breathe() //Breathe every other tick, unless suffocating else - if(istype(loc, /obj/)) + if(isobj(loc)) var/obj/location_as_object = loc location_as_object.handle_internal_lifeform(src, 0) @@ -68,7 +68,7 @@ if(AmountLoseBreath()) if(prob(75)) emote("gasp") - if(istype(loc, /obj/)) + if(isobj(loc)) var/obj/loc_as_obj = loc loc_as_obj.handle_internal_lifeform(src, 0) else @@ -88,7 +88,7 @@ breath = loc.remove_air(breath_moles) else //Breathe from loc as obj again - if(istype(loc, /obj/)) + if(isobj(loc)) var/obj/loc_as_obj = loc loc_as_obj.handle_internal_lifeform(src, 0) diff --git a/code/modules/mob/living/silicon/robot/component.dm b/code/modules/mob/living/silicon/robot/component.dm index f43a81885f6..d78240e71da 100644 --- a/code/modules/mob/living/silicon/robot/component.dm +++ b/code/modules/mob/living/silicon/robot/component.dm @@ -274,7 +274,7 @@ var/scan_type if(istype(M, /mob/living/silicon/robot)) scan_type = "robot" - else if(istype(M, /mob/living/carbon/human)) + else if(ishuman(M)) scan_type = "prosthetics" else to_chat(user, "You can't analyze non-robotic things!") diff --git a/code/modules/mob/living/silicon/robot/drone/drone.dm b/code/modules/mob/living/silicon/robot/drone/drone.dm index eb978f33272..7d8b6c2279b 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone.dm @@ -340,7 +340,7 @@ if(is_type_in_list(AM, pullable_drone_items)) ..(AM, force = INFINITY) // Drone power! Makes them able to drag pipes and such - else if(istype(AM,/obj/item)) + else if(isitem(AM)) var/obj/item/O = AM if(O.w_class > WEIGHT_CLASS_SMALL) if(show_message) diff --git a/code/modules/mob/living/simple_animal/bot/cleanbot.dm b/code/modules/mob/living/simple_animal/bot/cleanbot.dm index 658911475ff..7dbf8c5b228 100644 --- a/code/modules/mob/living/simple_animal/bot/cleanbot.dm +++ b/code/modules/mob/living/simple_animal/bot/cleanbot.dm @@ -93,7 +93,7 @@ return if(emagged == 2) //Emag functions - if(istype(loc,/turf/simulated)) + if(issimulatedturf(loc)) if(prob(10)) //Wets floors randomly var/turf/simulated/T = loc T.MakeSlippery() diff --git a/code/modules/mob/living/simple_animal/bot/floorbot.dm b/code/modules/mob/living/simple_animal/bot/floorbot.dm index 198847b5d19..904f46c57d0 100644 --- a/code/modules/mob/living/simple_animal/bot/floorbot.dm +++ b/code/modules/mob/living/simple_animal/bot/floorbot.dm @@ -238,7 +238,7 @@ start_maketile(target) else if(istype(target, /turf/) && emagged < 2) repair(target) - else if(emagged == 2 && istype(target,/turf/simulated/floor)) + else if(emagged == 2 && isfloorturf(target)) var/turf/simulated/floor/F = target anchored = TRUE mode = BOT_REPAIRING @@ -302,7 +302,7 @@ return result /mob/living/simple_animal/bot/floorbot/proc/repair(turf/target_turf) - if(istype(target_turf, /turf/space/)) + if(isspaceturf(target_turf)) //Must be a hull breach or in bridge mode to continue. if(!is_hull_breach(target_turf) && !targetdirection) target = null @@ -318,7 +318,7 @@ anchored = TRUE - if(istype(target_turf, /turf/space/)) //If we are fixing an area not part of pure space, it is + if(isspaceturf(target_turf)) //If we are fixing an area not part of pure space, it is visible_message("[targetdirection ? "[src] begins installing a bridge plating." : "[src] begins to repair the hole."] ") mode = BOT_REPAIRING update_icon(UPDATE_ICON_STATE) diff --git a/code/modules/mob/living/simple_animal/bot/mulebot.dm b/code/modules/mob/living/simple_animal/bot/mulebot.dm index 9a9ea2e4017..443c42b3fb9 100644 --- a/code/modules/mob/living/simple_animal/bot/mulebot.dm +++ b/code/modules/mob/living/simple_animal/bot/mulebot.dm @@ -370,7 +370,7 @@ //I'm sure someone will come along and ask why this is here... well people were dragging screen items onto the mule, and that was not cool. //So this is a simple fix that only allows a selection of item types to be considered. Further narrowing-down is below. - if(!isitem(AM) && !ismachinery(AM) && !istype(AM, /obj/structure) && !ismob(AM)) + if(!isitem(AM) && !ismachinery(AM) && !isstructure(AM) && !ismob(AM)) return if(!isturf(AM.loc)) //To prevent the loading from stuff from someone's inventory or screen icons. return diff --git a/code/modules/mob/living/simple_animal/friendly/cockroach.dm b/code/modules/mob/living/simple_animal/friendly/cockroach.dm index 3244d9e0241..62fd5b92dd4 100644 --- a/code/modules/mob/living/simple_animal/friendly/cockroach.dm +++ b/code/modules/mob/living/simple_animal/friendly/cockroach.dm @@ -34,7 +34,7 @@ death() else visible_message("\The [name] avoids getting crushed.") - else if(istype(AM, /obj/structure)) + else if(isstructure(AM)) visible_message("As \the [AM] moved over \the [name], it was crushed.") death() diff --git a/code/modules/mob/living/simple_animal/hostile/bear.dm b/code/modules/mob/living/simple_animal/hostile/bear.dm index a63b2161bf0..646cd514615 100644 --- a/code/modules/mob/living/simple_animal/hostile/bear.dm +++ b/code/modules/mob/living/simple_animal/hostile/bear.dm @@ -49,7 +49,7 @@ /mob/living/simple_animal/hostile/bear/Move() ..() if(stat != DEAD) - if(loc && istype(loc,/turf/space)) + if(loc && isspaceturf(loc)) icon_state = "bear" else icon_state = "bearfloor" diff --git a/code/modules/mob/living/simple_animal/hostile/mimic.dm b/code/modules/mob/living/simple_animal/hostile/mimic.dm index 5b326e08a3f..ba3d25c41ea 100644 --- a/code/modules/mob/living/simple_animal/hostile/mimic.dm +++ b/code/modules/mob/living/simple_animal/hostile/mimic.dm @@ -147,7 +147,7 @@ GLOBAL_LIST_INIT(protected_objects, list(/obj/structure/table, /obj/structure/ca faction |= "\ref[owner]" /mob/living/simple_animal/hostile/mimic/copy/proc/CheckObject(obj/O) - if((isitem(O) || istype(O, /obj/structure)) && !is_type_in_list(O, GLOB.protected_objects)) + if((isitem(O) || isstructure(O)) && !is_type_in_list(O, GLOB.protected_objects)) return 1 return 0 @@ -162,7 +162,7 @@ GLOBAL_LIST_INIT(protected_objects, list(/obj/structure/table, /obj/structure/ca overlays = O.overlays googly_eyes = image('icons/mob/mob.dmi',"googly_eyes") overlays += googly_eyes - if(istype(O, /obj/structure) || ismachinery(O)) + if(isstructure(O) || ismachinery(O)) health = (anchored * 50) + 50 destroy_objects = 1 if(O.density && O.anchored) diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/actions.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/actions.dm index 95c3999b41b..60c5b549d3c 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/actions.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/actions.dm @@ -269,7 +269,7 @@ else if(ismachinery(O)) O.loc = C large_cocoon = 1 - else if(istype(O, /obj/structure) && !istype(O, /obj/structure/spider)) // can't wrap spiderlings/etc + else if(isstructure(O) && !istype(O, /obj/structure/spider)) // can't wrap spiderlings/etc O.loc = C large_cocoon = 1 for(var/mob/living/L in C.loc) diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_ai.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_ai.dm index 767a90c9599..0b4c2eb96da 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_ai.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_ai.dm @@ -225,7 +225,7 @@ for(var/obj/O in can_see) if(O.anchored) continue - if(isitem(O) || istype(O, /obj/structure) || ismachinery(O)) + if(isitem(O) || isstructure(O) || ismachinery(O)) if(!istype(O, /obj/item/paper)) cocoon_target = O stop_automated_movement = TRUE diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index c077c9c4873..73dd7c6939a 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -161,7 +161,7 @@ var/mob/M = A for(var/obj/O in M.contents) listening_obj |= O - else if(istype(A, /obj)) + else if(isobj(A)) var/obj/O = A listening_obj |= O for(var/obj/O in listening_obj) @@ -286,7 +286,7 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \ if(!istype(W)) return 0 for(var/slot in GLOB.slot_equipment_priority) - if(istype(W,/obj/item/storage/) && slot == slot_head) // Storage items should be put on the belt before the head + if(isstorage(W) && slot == slot_head) // Storage items should be put on the belt before the head continue if(equip_to_slot_if_possible(W, slot, FALSE, TRUE)) //del_on_fail = 0; disable_warning = 0 return 1 @@ -649,7 +649,7 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \ set category = null set src = usr - if(istype(loc,/obj/mecha)) return + if(ismecha(loc)) return if(hand) var/obj/item/W = l_hand diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index ef5437207dc..d121f988c6b 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -1,5 +1,5 @@ /proc/issmall(A) - if(A && istype(A, /mob/living/carbon/human)) + if(A && ishuman(A)) var/mob/living/carbon/human/H = A if(H.dna.species && H.dna.species.is_small) return 1 diff --git a/code/modules/ninja/martial_art.dm b/code/modules/ninja/martial_art.dm index dc59a8cdb0c..fdf20fd77c2 100644 --- a/code/modules/ninja/martial_art.dm +++ b/code/modules/ninja/martial_art.dm @@ -159,7 +159,7 @@ if(!istype(user.martial_art, /datum/martial_art/ninja_martial_art)) user.pointed(A) // If they don't have the required martial art just point at the target. - if(!istype(A, /mob/living/carbon/human)) // Special moves only work on humans. + if(!ishuman(A)) // Special moves only work on humans. user.pointed(A) return 0 if(user.a_intent == INTENT_HELP) // No special move for help intent. diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index b6a32279298..b62d0d088f1 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -375,7 +375,7 @@ else if(P.name != "paper" && P.name != "photo") B.name = P.name user.unEquip(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.unEquip(src) @@ -742,7 +742,7 @@ to_chat(target,"Life seems funnier, somehow.") organ.insert(target) else if(myeffect == "Cluwne") - if(istype(target, /mob/living/carbon/human)) + if(ishuman(target)) var/mob/living/carbon/human/H = target to_chat(H, "You feel surrounded by sadness. Sadness... and HONKS!") H.makeCluwne() diff --git a/code/modules/paperwork/paper_bundle.dm b/code/modules/paperwork/paper_bundle.dm index a1d6a401f1d..5e5d1dca556 100644 --- a/code/modules/paperwork/paper_bundle.dm +++ b/code/modules/paperwork/paper_bundle.dm @@ -41,7 +41,7 @@ to_chat(user, "You add [(P.name == "paper") ? "the paper" : P.name] to [(src.name == "paper bundle") ? "the paper bundle" : src.name].") user.unEquip(P) P.loc = src - 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/paperwork/photography.dm b/code/modules/paperwork/photography.dm index e48d3fba8b2..41c47aa9a22 100644 --- a/code/modules/paperwork/photography.dm +++ b/code/modules/paperwork/photography.dm @@ -127,7 +127,7 @@ /obj/item/storage/photo_album/MouseDrop(obj/over_object as obj) - if((istype(usr, /mob/living/carbon/human))) + if(ishuman(usr)) var/mob/M = usr if(!( istype(over_object, /obj/screen) )) return ..() diff --git a/code/modules/pda/utilities.dm b/code/modules/pda/utilities.dm index b467787e4c5..925a1a294b9 100644 --- a/code/modules/pda/utilities.dm +++ b/code/modules/pda/utilities.dm @@ -58,7 +58,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, "No fingerprints found on [H]") diff --git a/code/modules/power/singularity/containment_field.dm b/code/modules/power/singularity/containment_field.dm index 7eacbf7d6b0..49193d00399 100644 --- a/code/modules/power/singularity/containment_field.dm +++ b/code/modules/power/singularity/containment_field.dm @@ -59,7 +59,7 @@ if(isliving(mover)) shock_field(mover) - if(ismachinery(mover) || istype(mover, /obj/structure) || ismecha(mover)) + if(ismachinery(mover) || isstructure(mover) || ismecha(mover)) bump_field(mover) /obj/machinery/field/containment/proc/set_master(master1,master2) @@ -90,7 +90,7 @@ if(isliving(mover)) // Don't let mobs through shock_field(mover) return 0 - if(ismachinery(mover) || istype(mover, /obj/structure) || ismecha(mover)) + if(ismachinery(mover) || isstructure(mover) || ismecha(mover)) bump_field(mover) return 0 return ..() diff --git a/code/modules/power/singularity/narsie.dm b/code/modules/power/singularity/narsie.dm index 965449536f0..4580d6cc240 100644 --- a/code/modules/power/singularity/narsie.dm +++ b/code/modules/power/singularity/narsie.dm @@ -91,7 +91,7 @@ return /obj/singularity/narsie/proc/godsmack(atom/A) - if(istype(A,/obj/)) + if(isobj(A)) var/obj/O = A O.ex_act(1) if(O) qdel(O) diff --git a/code/modules/procedural_mapping/mapGeneratorModule.dm b/code/modules/procedural_mapping/mapGeneratorModule.dm index d78cf81024c..15a39333d85 100644 --- a/code/modules/procedural_mapping/mapGeneratorModule.dm +++ b/code/modules/procedural_mapping/mapGeneratorModule.dm @@ -113,7 +113,7 @@ if(A.density) . = 0 break - if(!allowAtomsOnSpace && (istype(T,/turf/space))) + if(!allowAtomsOnSpace && (isspaceturf(T))) . = 0 diff --git a/code/modules/projectiles/guns/energy.dm b/code/modules/projectiles/guns/energy.dm index a47bf5774f0..5787dbf35c4 100644 --- a/code/modules/projectiles/guns/energy.dm +++ b/code/modules/projectiles/guns/energy.dm @@ -96,7 +96,7 @@ if(ammo_type.len > 1) select_fire(user) update_icon() - if(istype(user,/mob/living/carbon/human)) //This has to be here or else if you toggle modes by clicking the gun in hand + if(ishuman(user)) //This has to be here or else if you toggle modes by clicking the gun in hand var/mob/living/carbon/human/H = user //Otherwise the mob icon doesn't update, blame shitty human update_icons() code H.update_inv_l_hand() H.update_inv_r_hand() diff --git a/code/modules/projectiles/guns/energy/special.dm b/code/modules/projectiles/guns/energy/special.dm index 6ec70259ea3..8578a7b98f0 100644 --- a/code/modules/projectiles/guns/energy/special.dm +++ b/code/modules/projectiles/guns/energy/special.dm @@ -674,7 +674,7 @@ item_state = "tempgun_0" icon_state = item_state - if(istype(loc,/mob/living/carbon)) + if(iscarbon(loc)) var/mob/living/carbon/M = loc M.update_inv_back() M.update_inv_l_hand() diff --git a/code/modules/projectiles/projectile/beams.dm b/code/modules/projectiles/projectile/beams.dm index 2f4a2171637..fd68ac2f895 100644 --- a/code/modules/projectiles/projectile/beams.dm +++ b/code/modules/projectiles/projectile/beams.dm @@ -63,7 +63,7 @@ light_color = LIGHT_COLOR_DARKBLUE /obj/item/projectile/beam/pulse/on_hit(atom/target, blocked = 0) - if(istype(target,/turf/)||istype(target,/obj/structure/)) + if(istype(target,/turf/) || isstructure(target)) target.ex_act(2) ..() diff --git a/code/modules/projectiles/projectile/magic.dm b/code/modules/projectiles/projectile/magic.dm index c5e613571e2..df2f67a128a 100644 --- a/code/modules/projectiles/projectile/magic.dm +++ b/code/modules/projectiles/projectile/magic.dm @@ -297,7 +297,7 @@ /obj/item/projectile/magic/animate/Bump(atom/change) ..() - if(isitem(change) || istype(change, /obj/structure) && !is_type_in_list(change, GLOB.protected_objects)) + if(isitem(change) || isstructure(change) && !is_type_in_list(change, GLOB.protected_objects)) if(istype(change, /obj/structure/closet/statue)) for(var/mob/living/carbon/human/H in change.contents) var/mob/living/simple_animal/hostile/statue/S = new /mob/living/simple_animal/hostile/statue(change.loc, firer) diff --git a/code/modules/reagents/chemistry/holder.dm b/code/modules/reagents/chemistry/holder.dm index 7c457a90dd0..02d514b6c9f 100644 --- a/code/modules/reagents/chemistry/holder.dm +++ b/code/modules/reagents/chemistry/holder.dm @@ -130,7 +130,7 @@ if(total_volume <= 0) return var/datum/reagents/R - if(istype(target, /obj)) + if(isobj(target)) var/obj/O = target if(!O.reagents) return @@ -532,7 +532,7 @@ react_type = "LIVING" else if(isturf(A)) react_type = "TURF" - else if(istype(A, /obj)) + else if(isobj(A)) react_type = "OBJ" else return diff --git a/code/modules/reagents/chemistry/reagents/water.dm b/code/modules/reagents/chemistry/reagents/water.dm index 1a9c8bc450e..1a3848a938a 100644 --- a/code/modules/reagents/chemistry/reagents/water.dm +++ b/code/modules/reagents/chemistry/reagents/water.dm @@ -169,13 +169,13 @@ return if(volume < 3) return - if(!data["donor"] || istype(data["donor"], /mob/living/carbon/human)) + if(!data["donor"] || ishuman(data["donor"])) var/obj/effect/decal/cleanable/blood/blood_prop = locate() in T //find some blood here if(!blood_prop) //first blood! blood_prop = new(T) blood_prop.blood_DNA[data["blood_DNA"]] = data["blood_type"] - else if(istype(data["donor"], /mob/living/carbon/alien)) + else if(isalien(data["donor"])) var/obj/effect/decal/cleanable/blood/xeno/blood_prop = locate() in T if(!blood_prop) blood_prop = new(T) diff --git a/code/modules/reagents/reagent_containers/dropper.dm b/code/modules/reagents/reagent_containers/dropper.dm index 0549732f9c6..a20a0792c58 100644 --- a/code/modules/reagents/reagent_containers/dropper.dm +++ b/code/modules/reagents/reagent_containers/dropper.dm @@ -72,7 +72,7 @@ return if(reagents.total_volume) - if(!target.is_open_container() && !(istype(target, /obj/item/reagent_containers/food) && !istype(target, /obj/item/reagent_containers/food/pill)) && !istype(target, /obj/item/clothing/mask/cigarette)) + if(!target.is_open_container() && !(istype(target, /obj/item/reagent_containers/food) && !ispill(target)) && !istype(target, /obj/item/clothing/mask/cigarette)) to_chat(user, "You cannot directly fill this object.") return diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm index 1e2d225b532..e8a00a2cdf2 100644 --- a/code/modules/recycling/disposal.dm +++ b/code/modules/recycling/disposal.dm @@ -482,7 +482,7 @@ qdel(H) /obj/machinery/disposal/CanPass(atom/movable/mover, turf/target, height=0) - if(istype(mover,/obj/item) && mover.throwing) + if(isitem(mover) && mover.throwing) var/obj/item/I = mover if(istype(I, /obj/item/projectile)) return @@ -556,7 +556,7 @@ for(var/atom/movable/AM in D) AM.forceMove(src) SEND_SIGNAL(AM, COMSIG_MOVABLE_DISPOSING, src, D) - if(istype(AM, /mob/living/carbon/human)) + if(ishuman(AM)) var/mob/living/carbon/human/H = AM if(HAS_TRAIT(H, TRAIT_FAT)) // is a human and fat? has_fat_guy = 1 // set flag on holder @@ -801,7 +801,7 @@ H.active = FALSE H.forceMove(src) return - if(T.intact && istype(T,/turf/simulated/floor)) //intact floor, pop the tile + if(T.intact && isfloorturf(T)) //intact floor, pop the tile var/turf/simulated/floor/F = T var/turf_typecache = F.floor_tile if(F.remove_tile(null, TRUE, FALSE)) diff --git a/code/modules/recycling/sortingmachinery.dm b/code/modules/recycling/sortingmachinery.dm index 09fae8d964c..4353372ed84 100755 --- a/code/modules/recycling/sortingmachinery.dm +++ b/code/modules/recycling/sortingmachinery.dm @@ -310,7 +310,7 @@ if(WEST) if(AM.loc.x != loc.x - 1) return - if(istype(AM, /obj)) + if(isobj(AM)) var/obj/O = AM O.loc = src else if(istype(AM, /mob)) diff --git a/code/modules/store/items.dm b/code/modules/store/items.dm index e338ebd99eb..5584ea1a9ce 100644 --- a/code/modules/store/items.dm +++ b/code/modules/store/items.dm @@ -8,7 +8,7 @@ var/cost = 0 /datum/storeitem/proc/deliver(mob/user) - if(!istype(typepath,/obj/item/storage)) + if(!isstorage(typepath)) var/obj/item/storage/box/box=new(user.loc) new typepath(box) box.name="[name] package" diff --git a/code/modules/surgery/dental_implant.dm b/code/modules/surgery/dental_implant.dm index 1c571d7fdf2..f8f9ec322b8 100644 --- a/code/modules/surgery/dental_implant.dm +++ b/code/modules/surgery/dental_implant.dm @@ -4,7 +4,7 @@ possible_locs = list(BODY_ZONE_PRECISE_MOUTH) /datum/surgery/dental_implant/can_start(mob/user, mob/living/carbon/target) - if(istype(target,/mob/living/carbon/human)) + if(ishuman(target)) var/mob/living/carbon/human/H = target if(!H.check_has_mouth()) return FALSE diff --git a/code/modules/surgery/organs/organ_internal.dm b/code/modules/surgery/organs/organ_internal.dm index 8e701d3f6f4..3f3cf96a745 100644 --- a/code/modules/surgery/organs/organ_internal.dm +++ b/code/modules/surgery/organs/organ_internal.dm @@ -29,7 +29,7 @@ M.internal_organs |= src M.internal_organs_slot[slot] = src var/obj/item/organ/external/parent - if(istype(M, /mob/living/carbon/human)) + if(ishuman(M)) var/mob/living/carbon/human/H = M parent = H.get_organ(check_zone(parent_organ)) if(!istype(parent)) @@ -59,7 +59,7 @@ if(M.stat != DEAD)//safety check! M.death() - if(istype(M, /mob/living/carbon/human)) + if(ishuman(M)) var/mob/living/carbon/human/H = M var/obj/item/organ/external/parent = H.get_organ(check_zone(parent_organ)) if(!istype(parent)) @@ -299,7 +299,7 @@ if(!owner) return - if(istype(owner, /mob/living/carbon/human)) + if(ishuman(owner)) var/mob/living/carbon/human/H = owner var/obj/item/organ/external/head/head_organ = H.get_organ("head") if(!(head_organ.h_style == "Very Long Hair" || head_organ.h_style == "Mohawk")) diff --git a/code/modules/surgery/organs_internal.dm b/code/modules/surgery/organs_internal.dm index b92cc9c6a5a..26c346704eb 100644 --- a/code/modules/surgery/organs_internal.dm +++ b/code/modules/surgery/organs_internal.dm @@ -81,7 +81,7 @@ . = ..() if(!.) return FALSE - if(istype(target, /mob/living/carbon/human)) + if(ishuman(target)) var/mob/living/carbon/human/H = target var/obj/item/organ/external/affected = H.get_organ(user.zone_selected) if(affected && affected.encased) //no bones no problem. diff --git a/code/modules/surgery/plastic_surgery.dm b/code/modules/surgery/plastic_surgery.dm index e195a2fb071..7200fbf1ec3 100644 --- a/code/modules/surgery/plastic_surgery.dm +++ b/code/modules/surgery/plastic_surgery.dm @@ -31,7 +31,7 @@ var/obj/item/card/id/ID //IDs in hand - if(istype(user, /mob/living/carbon/human)) //Only 'humans' can hold ID cards + if(ishuman(user)) //Only 'humans' can hold ID cards var/mob/living/carbon/human/H = user ID = H.get_id_from_hands() if(ID) diff --git a/code/modules/surgery/surgery.dm b/code/modules/surgery/surgery.dm index cf2b6bcfac9..5425220e033 100644 --- a/code/modules/surgery/surgery.dm +++ b/code/modules/surgery/surgery.dm @@ -407,7 +407,7 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) if(can_infect && affected) spread_germs_to_organ(affected, user, tool) - if(ishuman(user) && !istype(target, /mob/living/carbon/alien) && prob(60)) + if(ishuman(user) && !isalien(target) && prob(60)) var/mob/living/carbon/human/H = user switch(blood_level) if(SURGERY_BLOODSPREAD_HANDS) diff --git a/goon/code/datums/browserOutput.dm b/goon/code/datums/browserOutput.dm index a4522042597..9e837b4449a 100644 --- a/goon/code/datums/browserOutput.dm +++ b/goon/code/datums/browserOutput.dm @@ -315,7 +315,7 @@ var/to_chat_src message = replacetext(message, "\proper", "") var/client/C - if(istype(target, /client)) + if(isclient(target)) C = target if(ismob(target)) C = target:client