diff --git a/code/modules/atmospherics/machinery/pipes/simple/pipe_simple.dm b/code/modules/atmospherics/machinery/pipes/simple/pipe_simple.dm index 340dd2ff880..695c8fa60fc 100644 --- a/code/modules/atmospherics/machinery/pipes/simple/pipe_simple.dm +++ b/code/modules/atmospherics/machinery/pipes/simple/pipe_simple.dm @@ -157,5 +157,5 @@ return /obj/machinery/atmospherics/pipe/simple/hide(i) - if(level == 1 && istype(loc, /turf/simulated)) + if(level == 1 && issimulatedturf(loc)) invisibility = i ? INVISIBILITY_MAXIMUM : 0 diff --git a/code/modules/buildmode/submodes/atmos.dm b/code/modules/buildmode/submodes/atmos.dm index 7ca4e4c63c2..caa833a7b35 100644 --- a/code/modules/buildmode/submodes/atmos.dm +++ b/code/modules/buildmode/submodes/atmos.dm @@ -44,7 +44,7 @@ var/ctrl_click = pa.Find("ctrl") if(left_click) //rectangular for(var/turf/T in block(cornerA,cornerB)) - if(istype(T, /turf/simulated)) + if(issimulatedturf(T)) // fill the turf with the appropriate gasses // this feels slightly icky var/turf/simulated/S = T diff --git a/code/modules/buildmode/submodes/link.dm b/code/modules/buildmode/submodes/link.dm index dc0e463ece6..5db08c7c8b6 100644 --- a/code/modules/buildmode/submodes/link.dm +++ b/code/modules/buildmode/submodes/link.dm @@ -37,9 +37,9 @@ var/list/pa = params2list(params) var/left_click = pa.Find("left") var/right_click = pa.Find("right") - if(left_click && istype(object, /obj/machinery)) + if(left_click && ismachinery(object)) link_obj = object - if(right_click && istype(object, /obj/machinery)) + if(right_click && ismachinery(object)) if(istype(link_obj, /obj/machinery/door_control) && istype(object, /obj/machinery/door/airlock)) var/obj/machinery/door_control/M = link_obj var/obj/machinery/door/airlock/P = object diff --git a/code/modules/clothing/chameleon.dm b/code/modules/clothing/chameleon.dm index 45c03a4bf3b..8b05b75a9db 100644 --- a/code/modules/clothing/chameleon.dm +++ b/code/modules/clothing/chameleon.dm @@ -161,7 +161,7 @@ I.sprite_sheets = P.sprite_sheets qdel(P) - if(istype(I, /obj/item/clothing) && istype(picked_item, /obj/item/clothing)) + if(isclothing(I) && isclothing(picked_item)) var/obj/item/clothing/CL = I var/obj/item/clothing/PCL = picked_item CL.flags_cover = initial(PCL.flags_cover) diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index 1268f639e0f..f6bdefbe5ea 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -827,7 +827,7 @@ BLIND // can't see anything set name = "Roll Down Jumpsuit" set category = "Object" set src in usr - if(!istype(usr, /mob/living)) return + if(!isliving(usr)) return if(usr.stat) return var/mob/living/carbon/human/H = usr diff --git a/code/modules/clothing/spacesuits/chronosuit.dm b/code/modules/clothing/spacesuits/chronosuit.dm index 7dc36d7ec27..8cbdc201886 100644 --- a/code/modules/clothing/spacesuits/chronosuit.dm +++ b/code/modules/clothing/spacesuits/chronosuit.dm @@ -200,7 +200,7 @@ user.client.eye = src var/step = get_step(src, direction) if(step) - if(istype(step, /turf/space)) + if(isspaceturf(step)) if(!Move(step)) loc = step else diff --git a/code/modules/clothing/suits/storage.dm b/code/modules/clothing/suits/storage.dm index cca318674d4..a203f26f3f4 100644 --- a/code/modules/clothing/suits/storage.dm +++ b/code/modules/clothing/suits/storage.dm @@ -47,7 +47,7 @@ L += S.return_inv() for(var/obj/item/gift/G in src) L += G.gift - if(istype(G.gift, /obj/item/storage)) + if(isstorage(G.gift)) L += G.gift:return_inv() return L diff --git a/code/modules/clothing/under/accessories/holster.dm b/code/modules/clothing/under/accessories/holster.dm index 0dcf9288382..c8a57742e4b 100644 --- a/code/modules/clothing/under/accessories/holster.dm +++ b/code/modules/clothing/under/accessories/holster.dm @@ -108,7 +108,7 @@ set name = "Holster" set category = "Object" set src in usr - if(!istype(usr, /mob/living)) return + if(!isliving(usr)) return if(usr.stat) return var/obj/item/clothing/accessory/holster/H = null diff --git a/code/modules/clothing/under/accessories/storage.dm b/code/modules/clothing/under/accessories/storage.dm index 7d11d12d73f..bf833ecf7cf 100644 --- a/code/modules/clothing/under/accessories/storage.dm +++ b/code/modules/clothing/under/accessories/storage.dm @@ -58,7 +58,7 @@ L += S.return_inv() for(var/obj/item/gift/G in src) L += G.gift - if(istype(G.gift, /obj/item/storage)) + if(isstorage(G.gift)) L += G.gift:return_inv() return L diff --git a/code/modules/crafting/craft.dm b/code/modules/crafting/craft.dm index 7a1e12ace1f..4c4f8a4d9d7 100644 --- a/code/modules/crafting/craft.dm +++ b/code/modules/crafting/craft.dm @@ -112,7 +112,7 @@ var/list/possible_tools = list() var/list/tools_used = list() for(var/obj/item/I in user.contents) //searchs the inventory of the mob - if(istype(I, /obj/item/storage)) + if(isstorage(I)) for(var/obj/item/SI in I.contents) if(SI.tool_behaviour) //filters for tool behaviours possible_tools += SI @@ -137,7 +137,7 @@ return TRUE var/list/other_possible_tools = list() for(var/obj/item/I in user.contents) // searchs the inventory of the mob - if(istype(I, /obj/item/storage)) + if(isstorage(I)) for(var/obj/item/SI in I.contents) other_possible_tools += SI.type // filters type paths other_possible_tools += I.type diff --git a/code/modules/events/spacevine.dm b/code/modules/events/spacevine.dm index b69b9d92622..debdcf2c2ba 100644 --- a/code/modules/events/spacevine.dm +++ b/code/modules/events/spacevine.dm @@ -268,7 +268,7 @@ quality = NEGATIVE /datum/spacevine_mutation/aggressive_spread/on_spread(obj/structure/spacevine/holder, turf/target) - if(istype(target, /turf/simulated/wall/r_wall)) + if(isreinforcedwallturf(target)) // Too tough to pierce - should lead to interesting spread patterns return // Bust through windows or other stuff blocking the way @@ -668,7 +668,7 @@ spread_success |= SM.on_spread(src, stepturf) // If this returns 1, spreading succeeded if(!locate(/obj/structure/spacevine, stepturf)) // snowflake for space turf, but space turf is super common and a big deal - if(!istype(stepturf, /turf/space) && stepturf.Enter(src)) + if(!isspaceturf(stepturf) && stepturf.Enter(src)) if(master) master.spawn_spacevine_piece(stepturf, src) spread_success = TRUE diff --git a/code/modules/events/wallrot.dm b/code/modules/events/wallrot.dm index 0181b74e482..7f139aa3993 100644 --- a/code/modules/events/wallrot.dm +++ b/code/modules/events/wallrot.dm @@ -7,7 +7,7 @@ // 100 attempts for(var/i in 0 to 100) var/turf/candidate = locate(rand(1, world.maxx), rand(1, world.maxy), level_name_to_num(MAIN_STATION)) - if(istype(candidate, /turf/simulated/wall)) + if(iswallturf(candidate)) center = candidate break diff --git a/code/modules/food_and_drinks/drinks/drinks.dm b/code/modules/food_and_drinks/drinks/drinks.dm index ae1a1eed9c4..ab66a92d9b4 100644 --- a/code/modules/food_and_drinks/drinks/drinks.dm +++ b/code/modules/food_and_drinks/drinks/drinks.dm @@ -35,7 +35,7 @@ to_chat(user, " You need to open [src] first!") return FALSE - if(istype(M, /mob/living/carbon)) + if(iscarbon(M)) var/mob/living/carbon/C = M if(C.eat(src, user)) return TRUE diff --git a/code/modules/food_and_drinks/drinks/drinks/bottle.dm b/code/modules/food_and_drinks/drinks/drinks/bottle.dm index b334d9fb551..a983d85c14b 100644 --- a/code/modules/food_and_drinks/drinks/drinks/bottle.dm +++ b/code/modules/food_and_drinks/drinks/drinks/bottle.dm @@ -386,7 +386,7 @@ var/counter var/target = loc for(counter = 0, counter < 2, counter++) - if(istype(target, /obj/item/storage)) + if(isstorage(target)) var/obj/item/storage/S = target target = S.loc if(istype(target, /atom)) diff --git a/code/modules/food_and_drinks/food/snacks.dm b/code/modules/food_and_drinks/food/snacks.dm index e649cff308b..dcf4094f762 100644 --- a/code/modules/food_and_drinks/food/snacks.dm +++ b/code/modules/food_and_drinks/food/snacks.dm @@ -132,7 +132,7 @@ . = new trash(location) trash = null return - else if(istype(trash, /obj/item)) + else if(isitem(trash)) var/obj/item/trash_item = trash trash_item.forceMove(location) . = trash diff --git a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm index a0cefa1418f..b88574f1a26 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm @@ -334,7 +334,7 @@ to_chat(user, "\The [src] is full.") return FALSE else - if(istype(I.loc, /obj/item/storage)) + if(isstorage(I.loc)) var/obj/item/storage/S = I.loc S.remove_from_storage(I, src) else if(ismob(I.loc)) diff --git a/code/modules/games/cards.dm b/code/modules/games/cards.dm index 96c71bae97d..9f6ebd8c499 100644 --- a/code/modules/games/cards.dm +++ b/code/modules/games/cards.dm @@ -331,7 +331,7 @@ resistance_flags = D.card_resistance_flags /obj/item/cardhand/attackby(obj/O, mob/user) - if(length(cards) == 1 && istype(O, /obj/item/pen)) + if(length(cards) == 1 && is_pen(O)) var/datum/playingcard/P = cards[1] if(P.name != "Blank Card") to_chat(user,"You cannot write on that card.") diff --git a/code/modules/hydroponics/gene_modder.dm b/code/modules/hydroponics/gene_modder.dm index 6780c913b17..a2a55529426 100644 --- a/code/modules/hydroponics/gene_modder.dm +++ b/code/modules/hydroponics/gene_modder.dm @@ -475,7 +475,7 @@ /obj/item/disk/plantgene/attackby(obj/item/W, mob/user, params) ..() - if(istype(W, /obj/item/pen)) + if(is_pen(W)) rename_interactive(user, W) /obj/item/disk/plantgene/update_name() diff --git a/code/modules/hydroponics/grown/kudzu.dm b/code/modules/hydroponics/grown/kudzu.dm index 41ce7ae957e..fdaa9750a20 100644 --- a/code/modules/hydroponics/grown/kudzu.dm +++ b/code/modules/hydroponics/grown/kudzu.dm @@ -27,7 +27,7 @@ return BRUTELOSS /obj/item/seeds/kudzu/proc/plant(mob/user) - if(istype(user.loc, /turf/space)) + if(isspaceturf(user.loc)) return var/turf/T = get_turf(src) message_admins("Kudzu planted by [key_name_admin(user)]([ADMIN_QUE(user,"?")]) ([ADMIN_FLW(user,"FLW")]) at ([T.x],[T.y],[T.z] - (JMP))",0,1) diff --git a/code/modules/hydroponics/grown/mushrooms.dm b/code/modules/hydroponics/grown/mushrooms.dm index 422eda94ce7..9f516da18d5 100644 --- a/code/modules/hydroponics/grown/mushrooms.dm +++ b/code/modules/hydroponics/grown/mushrooms.dm @@ -249,7 +249,7 @@ wine_power = 0.5 /obj/item/reagent_containers/food/snacks/grown/mushroom/glowshroom/attack_self(mob/user) - if(istype(user.loc, /turf/space)) + if(isspaceturf(user.loc)) return FALSE if(!isturf(user.loc)) to_chat(user, "You need more space to plant [src].") diff --git a/code/modules/hydroponics/grown/tomato.dm b/code/modules/hydroponics/grown/tomato.dm index 6cf56d619d6..dd052922257 100644 --- a/code/modules/hydroponics/grown/tomato.dm +++ b/code/modules/hydroponics/grown/tomato.dm @@ -134,7 +134,7 @@ ..() /obj/item/reagent_containers/food/snacks/grown/tomato/killer/attack_self(mob/user) - if(awakening || istype(user.loc, /turf/space)) + if(awakening || isspaceturf(user.loc)) return to_chat(user, "You begin to awaken the Killer Tomato...") awakening = 1 diff --git a/code/modules/hydroponics/hydroponics.dm b/code/modules/hydroponics/hydroponics.dm index dc01129dc8f..9400ec83e6b 100644 --- a/code/modules/hydroponics/hydroponics.dm +++ b/code/modules/hydroponics/hydroponics.dm @@ -877,7 +877,7 @@ plant_hud_set_status() adjustWeeds(-10) //Has a side effect of cleaning up those nasty weeds update_state() - else if(istype(O, /obj/item/pen) && myseed) + else if(is_pen(O) && myseed) myseed.variant_prompt(user, src) else return ..() diff --git a/code/modules/hydroponics/seeds.dm b/code/modules/hydroponics/seeds.dm index bb0c335d183..0ea2d489062 100644 --- a/code/modules/hydroponics/seeds.dm +++ b/code/modules/hydroponics/seeds.dm @@ -327,7 +327,7 @@ to_chat(user, "[text]") return - if(istype(O, /obj/item/pen)) + if(is_pen(O)) variant_prompt(user) return ..() // Fallthrough to item/attackby() so that bags can pick seeds up diff --git a/code/modules/library/book.dm b/code/modules/library/book.dm index 9f54d75d928..89ba81b9586 100644 --- a/code/modules/library/book.dm +++ b/code/modules/library/book.dm @@ -91,7 +91,7 @@ read_book(user) /obj/item/book/attackby(obj/item/I, mob/user, params) - if(istype(I, /obj/item/pen)) + if(is_pen(I)) edit_book(user) else if(istype(I, /obj/item/barcodescanner)) var/obj/item/barcodescanner/scanner = I diff --git a/code/modules/library/library_equipment.dm b/code/modules/library/library_equipment.dm index ea411dbd3ac..f69cb1b6b29 100644 --- a/code/modules/library/library_equipment.dm +++ b/code/modules/library/library_equipment.dm @@ -34,7 +34,7 @@ to_chat(user, "You empty [O] into [src].") update_icon(UPDATE_ICON_STATE) return TRUE - if(istype(O, /obj/item/pen)) + if(is_pen(O)) rename_interactive(user, O) return TRUE diff --git a/code/modules/mining/equipment/lazarus_injector.dm b/code/modules/mining/equipment/lazarus_injector.dm index a4cab8cd780..87901b32f02 100644 --- a/code/modules/mining/equipment/lazarus_injector.dm +++ b/code/modules/mining/equipment/lazarus_injector.dm @@ -17,7 +17,7 @@ /obj/item/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/lavaland/loot/colossus_loot.dm b/code/modules/mining/lavaland/loot/colossus_loot.dm index f290ba498ac..dec0d14a61c 100644 --- a/code/modules/mining/lavaland/loot/colossus_loot.dm +++ b/code/modules/mining/lavaland/loot/colossus_loot.dm @@ -311,7 +311,7 @@ var/turf/T = get_step(src, dir) new /obj/effect/temp_visual/emp/pulse(T) for(var/i in T) - if(istype(i, /obj/item) && !is_type_in_typecache(i, banned_items_typecache)) + if(isitem(i) && !is_type_in_typecache(i, banned_items_typecache)) var/obj/item/W = i if(!W.admin_spawned && !(W.flags_2 & HOLOGRAM_2) && !(W.flags & ABSTRACT)) L += W diff --git a/code/modules/mining/lavaland/loot/tendril_loot.dm b/code/modules/mining/lavaland/loot/tendril_loot.dm index e529bd477fa..36075515ea0 100644 --- a/code/modules/mining/lavaland/loot/tendril_loot.dm +++ b/code/modules/mining/lavaland/loot/tendril_loot.dm @@ -62,7 +62,7 @@ if(!over_object) return - if(istype(M.loc, /obj/mecha)) + if(ismecha(M.loc)) return if(!M.restrained() && !M.stat) diff --git a/code/modules/mining/satchel_ore_boxdm.dm b/code/modules/mining/satchel_ore_boxdm.dm index 968b852ff62..19614e39b33 100644 --- a/code/modules/mining/satchel_ore_boxdm.dm +++ b/code/modules/mining/satchel_ore_boxdm.dm @@ -14,7 +14,7 @@ if(!user.drop_item()) return W.forceMove(src) - else if(istype(W, /obj/item/storage)) + else if(isstorage(W)) var/obj/item/storage/S = W S.hide_from(usr) for(var/obj/item/stack/ore/O in S.contents) diff --git a/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm b/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm index 2cf9c44acea..e9833f3c429 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm @@ -13,7 +13,7 @@ Doesn't work on other aliens/AI.*/ else if(X && getPlasma() < X) to_chat(src, "Not enough plasma stored.") return 0 - else if(Y && (!isturf(src.loc) || istype(src.loc, /turf/space))) + else if(Y && (!isturf(src.loc) || isspaceturf(src.loc))) to_chat(src, "You can't place that here!") return 0 else return 1 diff --git a/code/modules/mob/living/carbon/brain/MMI.dm b/code/modules/mob/living/carbon/brain/MMI.dm index 979595d0eda..15a050d28b9 100644 --- a/code/modules/mob/living/carbon/brain/MMI.dm +++ b/code/modules/mob/living/carbon/brain/MMI.dm @@ -249,11 +249,11 @@ // Also neatly handles basically every case where a brain // is inserted or removed from an MMI /obj/item/mmi/Entered(atom/movable/A) - if(radio && istype(A, /mob/living/carbon/brain)) + if(radio && isbrain(A)) radio_action.Grant(A) /obj/item/mmi/Exited(atom/movable/A) - if(radio && istype(A, /mob/living/carbon/brain)) + if(radio && isbrain(A)) radio_action.Remove(A) diff --git a/code/modules/mob/living/carbon/brain/brain.dm b/code/modules/mob/living/carbon/brain/brain.dm index 3764870eb0c..5aabcf5da21 100644 --- a/code/modules/mob/living/carbon/brain/brain.dm +++ b/code/modules/mob/living/carbon/brain/brain.dm @@ -84,7 +84,7 @@ I'm using this for Stat to give it a more nifty interface to work with if(client.statpanel == "Status") //Knowing how well-off your mech is doing is really important as an MMI - if(istype(src.loc, /obj/mecha)) + if(ismecha(src.loc)) var/obj/mecha/M = src.loc stat("Exosuit Charge:", "[istype(M.cell) ? "[M.cell.charge] / [M.cell.maxcharge]" : "No cell detected"]") stat("Exosuit Integrity", "[!M.obj_integrity ? "0" : "[(M.obj_integrity / M.max_integrity) * 100]"]%") diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index e6dfdccdf36..8e1fbd0011e 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -1228,7 +1228,7 @@ so that different stomachs can handle things in different ways VB*/ //handle stuff to update when a mob equips/unequips a headgear. /mob/living/carbon/proc/head_update(obj/item/I, forced) - if(istype(I, /obj/item/clothing)) + if(isclothing(I)) var/obj/item/clothing/C = I if(C.tint || initial(C.tint)) update_tint() diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index b6cb67f93af..9a05f9b8a18 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -483,7 +483,7 @@ emp_act if(prob(I.force * 2)) //blood spatter! bloody = 1 var/turf/location = loc - if(istype(location, /turf/simulated)) + if(issimulatedturf(location)) add_splatter_floor(location) if(ishuman(user)) var/mob/living/carbon/human/H = user @@ -542,7 +542,7 @@ emp_act return spec_return var/obj/item/I var/throwpower = 30 - if(istype(AM, /obj/item)) + if(isitem(AM)) I = AM throwpower = I.throwforce if(locateUID(I.thrownby) == src) //No throwing stuff at yourself to trigger reactions @@ -724,7 +724,7 @@ emp_act /mob/living/carbon/human/experience_pressure_difference(pressure_difference, direction) playsound(src, 'sound/effects/space_wind.ogg', 50, TRUE) - if(shoes && istype(shoes, /obj/item/clothing)) + if(shoes && isclothing(shoes)) var/obj/item/clothing/S = shoes if (S.flags & NOSLIP) return FALSE diff --git a/code/modules/mob/living/carbon/human/species/_species.dm b/code/modules/mob/living/carbon/human/species/_species.dm index 218397026a7..cc24d3ca170 100644 --- a/code/modules/mob/living/carbon/human/species/_species.dm +++ b/code/modules/mob/living/carbon/human/species/_species.dm @@ -787,7 +787,7 @@ if(!disable_warning) to_chat(H, "[I] is too big to attach.") return FALSE - if(istype(I, /obj/item/pda) || istype(I, /obj/item/pen) || is_type_in_list(I, H.wear_suit.allowed)) + if(istype(I, /obj/item/pda) || is_pen(I) || is_type_in_list(I, H.wear_suit.allowed)) return TRUE return FALSE if(slot_handcuffed) diff --git a/code/modules/mob/living/carbon/human/species/golem.dm b/code/modules/mob/living/carbon/human/species/golem.dm index fcb76bd7bb9..5d5e4fc3021 100644 --- a/code/modules/mob/living/carbon/human/species/golem.dm +++ b/code/modules/mob/living/carbon/human/species/golem.dm @@ -461,7 +461,7 @@ /datum/species/golem/bluespace/spec_hitby(atom/movable/AM, mob/living/carbon/human/H) ..() var/obj/item/I - if(istype(AM, /obj/item)) + if(isitem(AM)) I = AM if(locateUID(I.thrownby) == H) //No throwing stuff at yourself to trigger the teleport return 0 @@ -523,7 +523,7 @@ H.visible_message("[H] teleports!", "You teleport!") var/list/turfs = new/list() for(var/turf/T in orange(tele_range, H)) - if(istype(T, /turf/space)) + if(isspaceturf(T)) continue if(T.density) continue @@ -606,7 +606,7 @@ /datum/species/golem/bananium/spec_hitby(atom/movable/AM, mob/living/carbon/human/H) ..() var/obj/item/I - if(istype(AM, /obj/item)) + if(isitem(AM)) I = AM if(locateUID(I.thrownby) == H) //No throwing stuff at yourself to make bananas return 0 diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 3225c52dfe2..0308815ef1f 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -148,9 +148,9 @@ if(!(M.status_flags & CANPUSH)) return TRUE //anti-riot equipment is also anti-push - if(M.r_hand && (prob(M.r_hand.block_chance * 2)) && !istype(M.r_hand, /obj/item/clothing)) + if(M.r_hand && (prob(M.r_hand.block_chance * 2)) && !isclothing(M.r_hand)) return TRUE - if(M.l_hand && (prob(M.l_hand.block_chance * 2)) && !istype(M.l_hand, /obj/item/clothing)) + if(M.l_hand && (prob(M.l_hand.block_chance * 2)) && !isclothing(M.l_hand)) return TRUE //Called when we bump into an obj @@ -355,12 +355,12 @@ for(var/obj/item/gift/G in Storage.return_inv()) //Check for gift-wrapped items L += G.gift - if(istype(G.gift, /obj/item/storage)) + if(isstorage(G.gift)) L += get_contents(G.gift) for(var/obj/item/smallDelivery/D in Storage.return_inv()) //Check for package wrapped items L += D.wrapped - if(istype(D.wrapped, /obj/item/storage)) //this should never happen + if(isstorage(D.wrapped)) //this should never happen L += get_contents(D.wrapped) return L @@ -377,12 +377,12 @@ L += I.get_contents() for(var/obj/item/gift/G in contents) //Check for gift-wrapped items L += G.gift - if(istype(G.gift, /obj/item/storage)) + if(isstorage(G.gift)) L += get_contents(G.gift) for(var/obj/item/smallDelivery/D in contents) //Check for package wrapped items L += D.wrapped - if(istype(D.wrapped, /obj/item/storage)) //this should never happen + if(isstorage(D.wrapped)) //this should never happen L += get_contents(D.wrapped) for(var/obj/item/folder/F in contents) L += F.contents //Folders can't store any storage items. @@ -923,14 +923,14 @@ /mob/living/proc/get_temperature(datum/gas_mixture/environment) var/loc_temp = T0C - if(istype(loc, /obj/mecha)) + if(ismecha(loc)) var/obj/mecha/M = loc loc_temp = M.return_temperature() else if(istype(loc, /obj/structure/transit_tube_pod)) loc_temp = environment.temperature - else if(istype(get_turf(src), /turf/space)) + else if(isspaceturf(get_turf(src))) var/turf/heat_turf = get_turf(src) loc_temp = heat_turf.temperature diff --git a/code/modules/mob/living/silicon/ai/life.dm b/code/modules/mob/living/silicon/ai/life.dm index 645a73e1996..f37d7bbca71 100644 --- a/code/modules/mob/living/silicon/ai/life.dm +++ b/code/modules/mob/living/silicon/ai/life.dm @@ -71,7 +71,7 @@ to_chat(src, "Emergency control system online. Verifying connection to power network.") sleep(50) T = get_turf(src) - if(istype(T, /turf/space)) + if(isspaceturf(T)) to_chat(src, "Unable to verify! No power connection detected!") aiRestorePowerRoutine = 2 return @@ -141,7 +141,7 @@ /mob/living/silicon/ai/proc/lacks_power() var/turf/T = get_turf(src) var/area/A = get_area(src) - return ((!A.power_equip) && A.requires_power == 1 || istype(T, /turf/space)) && !istype(src.loc,/obj/item) + return ((!A.power_equip) && A.requires_power == 1 || isspaceturf(T)) && !isitem(src.loc) /mob/living/silicon/ai/rejuvenate() ..() diff --git a/code/modules/mob/living/silicon/pai/say.dm b/code/modules/mob/living/silicon/pai/say.dm index bf241311260..d98f18741a1 100644 --- a/code/modules/mob/living/silicon/pai/say.dm +++ b/code/modules/mob/living/silicon/pai/say.dm @@ -9,7 +9,7 @@ var/atom/movable/whisper_loc = card if(istype(card.loc, /obj/item/pda)) // Step up 1 level if in a PDA whisper_loc = card.loc - if(istype(whisper_loc.loc, /mob/living)) + if(isliving(whisper_loc.loc)) return whisper_loc.loc // allow a pai being held or in pocket to whisper else return whisper_loc // allow a pai in its card to whisper diff --git a/code/modules/mob/living/silicon/pai/software/_base.dm b/code/modules/mob/living/silicon/pai/software/_base.dm index 67e47a5eca3..d7d773b138b 100644 --- a/code/modules/mob/living/silicon/pai/software/_base.dm +++ b/code/modules/mob/living/silicon/pai/software/_base.dm @@ -89,7 +89,7 @@ var/count = 0 // Find the carrier - while(!istype(M, /mob/living)) + while(!isliving(M)) if(!M || !M.loc || count > 6) //For a runtime where M ends up in nullspace (similar to bluespace but less colourful) if(inform) diff --git a/code/modules/mob/living/silicon/robot/drone/drone_items.dm b/code/modules/mob/living/silicon/robot/drone/drone_items.dm index 7c5aa2df737..e9175fc991e 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone_items.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone_items.dm @@ -112,7 +112,7 @@ else if(gripped_item && !contents.len) gripped_item = null - else if(istype(target, /obj/item)) //Check that we're not pocketing a mob. + else if(isitem(target)) //Check that we're not pocketing a mob. var/obj/item/I = target if(is_type_in_typecache(I, can_hold)) // Make sure the item is something the gripper can hold to_chat(user, "You collect [I].") diff --git a/code/modules/mob/living/silicon/say.dm b/code/modules/mob/living/silicon/say.dm index 78615f43d77..7be3aa579bf 100644 --- a/code/modules/mob/living/silicon/say.dm +++ b/code/modules/mob/living/silicon/say.dm @@ -59,13 +59,13 @@ /mob/living/silicon/say_understands(other, datum/language/speaking = null) //These only pertain to common. Languages are handled by mob/say_understands() if(!speaking) - if(istype(other, /mob/living/carbon)) + if(iscarbon(other)) return 1 if(istype(other, /mob/living/silicon)) return 1 if(istype(other, /mob/living/simple_animal/bot)) return 1 - if(istype(other, /mob/living/carbon/brain)) + if(isbrain(other)) return 1 return ..() diff --git a/code/modules/mob/living/simple_animal/bot/construction.dm b/code/modules/mob/living/simple_animal/bot/construction.dm index 64ff74011c7..4bf3335c2c3 100644 --- a/code/modules/mob/living/simple_animal/bot/construction.dm +++ b/code/modules/mob/living/simple_animal/bot/construction.dm @@ -28,7 +28,7 @@ user.unEquip(src, 1) qdel(src) - else if(istype(W, /obj/item/pen)) + else if(is_pen(W)) var/t = rename_interactive(user, W, prompt = "Enter new robot name") if(!isnull(t)) created_name = t @@ -50,7 +50,7 @@ /obj/item/ed209_assembly/attackby(obj/item/W, mob/user, params) ..() - if(istype(W, /obj/item/pen)) + if(is_pen(W)) var/t = rename_interactive(user, W, prompt = "Enter new robot name") if(!isnull(t)) created_name = t @@ -298,7 +298,7 @@ user.unEquip(src, 1) qdel(src) - else if(istype(W, /obj/item/pen)) + else if(is_pen(W)) var/t = rename_interactive(user, W, prompt = "Enter new robot name") if(!isnull(t)) created_name = t @@ -317,7 +317,7 @@ to_chat(user, "You add the robot arm to the odd looking toolbox assembly. Boop beep!") user.unEquip(src, 1) qdel(src) - else if(istype(W, /obj/item/pen)) + else if(is_pen(W)) var/t = rename_interactive(user, W, prompt = "Enter new robot name") if(!isnull(t)) created_name = t @@ -384,7 +384,7 @@ /obj/item/firstaid_arm_assembly/attackby(obj/item/I, mob/user, params) ..() - if(istype(I, /obj/item/pen)) + if(is_pen(I)) var/t = rename_interactive(user, I, prompt = "Enter new robot name") if(!isnull(t)) created_name = t @@ -492,7 +492,7 @@ qdel(I) qdel(src) - else if(istype(I, /obj/item/pen)) + else if(is_pen(I)) var/t = rename_interactive(user, I, prompt = "Enter new robot name") if(!isnull(t)) created_name = t diff --git a/code/modules/mob/living/simple_animal/bot/ed209bot.dm b/code/modules/mob/living/simple_animal/bot/ed209bot.dm index 5f0b14b3e3b..a5ec0ebde94 100644 --- a/code/modules/mob/living/simple_animal/bot/ed209bot.dm +++ b/code/modules/mob/living/simple_animal/bot/ed209bot.dm @@ -560,7 +560,7 @@ ..() /mob/living/simple_animal/bot/ed209/hitby(atom/movable/AM, skipcatch = FALSE, hitpush = TRUE, blocked = FALSE, datum/thrownthing/throwingdatum) - if(istype(AM, /obj/item)) + if(isitem(AM)) var/obj/item/I = AM var/mob/thrower = locateUID(I.thrownby) if(I.throwforce < src.health && ishuman(thrower)) diff --git a/code/modules/mob/living/simple_animal/bot/floorbot.dm b/code/modules/mob/living/simple_animal/bot/floorbot.dm index 5efa0941498..198847b5d19 100644 --- a/code/modules/mob/living/simple_animal/bot/floorbot.dm +++ b/code/modules/mob/living/simple_animal/bot/floorbot.dm @@ -180,7 +180,7 @@ if(targetdirection != null) //The bot is in bridge mode. //Try to find a space tile immediately in our selected direction. var/turf/T = get_step(src, targetdirection) - if(istype(T, /turf/space)) + if(isspaceturf(T)) target = T else //Find a space tile farther way! @@ -308,7 +308,7 @@ target = null return - else if(!istype(target_turf, /turf/simulated/floor)) + else if(!isfloorturf(target_turf)) return if(amount <= 0) diff --git a/code/modules/mob/living/simple_animal/bot/honkbot.dm b/code/modules/mob/living/simple_animal/bot/honkbot.dm index edc01051739..f26f91ec5f7 100644 --- a/code/modules/mob/living/simple_animal/bot/honkbot.dm +++ b/code/modules/mob/living/simple_animal/bot/honkbot.dm @@ -136,7 +136,7 @@ bike_horn(A) /mob/living/simple_animal/bot/honkbot/hitby(atom/movable/AM, skipcatch = FALSE, hitpush = TRUE, blocked = FALSE, datum/thrownthing/throwingdatum) - if(istype(AM, /obj/item)) + if(isitem(AM)) playsound(src, honksound, 50, TRUE, -1) var/obj/item/I = AM var/mob/thrower = locateUID(I.thrownby) diff --git a/code/modules/mob/living/simple_animal/bot/mulebot.dm b/code/modules/mob/living/simple_animal/bot/mulebot.dm index 9eae54936aa..9a9ea2e4017 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(!istype(AM, /obj/item) && !istype(AM, /obj/machinery) && !istype(AM, /obj/structure) && !ismob(AM)) + if(!isitem(AM) && !ismachinery(AM) && !istype(AM, /obj/structure) && !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/bot/secbot.dm b/code/modules/mob/living/simple_animal/bot/secbot.dm index e53432074a6..0a54153248d 100644 --- a/code/modules/mob/living/simple_animal/bot/secbot.dm +++ b/code/modules/mob/living/simple_animal/bot/secbot.dm @@ -235,7 +235,7 @@ /mob/living/simple_animal/bot/secbot/hitby(atom/movable/AM, skipcatch = FALSE, hitpush = TRUE, blocked = FALSE, datum/thrownthing/throwingdatum) - if(istype(AM, /obj/item)) + if(isitem(AM)) var/obj/item/I = AM var/mob/thrower = locateUID(I.thrownby) if(I.throwforce < src.health && ishuman(thrower)) diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/drake.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/drake.dm index f776ad641b7..cf3820ccb14 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/drake.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/drake.dm @@ -450,7 +450,7 @@ Difficulty: Medium M.take_damage(45, BRUTE, MELEE, 1) // changes turf to lava temporarily - if(!T.density && !istype(T, /turf/simulated/floor/plating/lava)) + if(!T.density && !islava(T)) var/lava_turf = /turf/simulated/floor/plating/lava/smooth var/reset_turf = T.type T.ChangeTurf(lava_turf) diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm index 25a6da0265f..ae855ed837d 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm @@ -150,7 +150,7 @@ var/chosen_attack_num = 0 /datum/action/innate/megafauna_attack/Grant(mob/living/L) - if(istype(L, /mob/living/simple_animal/hostile/megafauna)) + if(ismegafauna(L)) M = L return ..() return FALSE diff --git a/code/modules/mob/living/simple_animal/hostile/mimic.dm b/code/modules/mob/living/simple_animal/hostile/mimic.dm index 1fddb766a56..5b326e08a3f 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((istype(O, /obj/item) || istype(O, /obj/structure)) && !is_type_in_list(O, GLOB.protected_objects)) + if((isitem(O) || istype(O, /obj/structure)) && !is_type_in_list(O, GLOB.protected_objects)) return 1 return 0 @@ -162,16 +162,16 @@ 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) || istype(O, /obj/machinery)) + if(istype(O, /obj/structure) || ismachinery(O)) health = (anchored * 50) + 50 destroy_objects = 1 if(O.density && O.anchored) knockdown_people = 1 melee_damage_lower *= 2 melee_damage_upper *= 2 - if(istype(O, /obj/machinery)) + if(ismachinery(O)) is_electronic = 1 - else if(istype(O, /obj/item)) + else if(isitem(O)) var/obj/item/I = O health = 15 * I.w_class melee_damage_lower = 2 + I.force diff --git a/code/modules/mob/living/simple_animal/hostile/mining/elites/elite.dm b/code/modules/mob/living/simple_animal/hostile/mining/elites/elite.dm index 78df83cb5e6..3143196499f 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining/elites/elite.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining/elites/elite.dm @@ -61,7 +61,7 @@ if(ismineralturf(target)) var/turf/simulated/mineral/M = target M.gets_drilled() - if(istype(target, /obj/mecha)) + if(ismecha(target)) var/obj/mecha/M = target M.take_damage(50, BRUTE, MELEE, 1) if(. && isliving(target)) //Taken from megafauna. This exists purely to stop someone from cheesing a weaker melee fauna by letting it get punched. diff --git a/code/modules/mob/living/simple_animal/hostile/mining/mining.dm b/code/modules/mob/living/simple_animal/hostile/mining/mining.dm index 2e6ad1055ef..1f0d48fee49 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining/mining.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining/mining.dm @@ -44,7 +44,7 @@ ..() /mob/living/simple_animal/hostile/asteroid/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum) //No floor tiling them to death, wiseguy - if(istype(AM, /obj/item)) + if(isitem(AM)) var/obj/item/T = AM if(!stat) Aggro() diff --git a/code/modules/mob/living/simple_animal/hostile/mushroom.dm b/code/modules/mob/living/simple_animal/hostile/mushroom.dm index ab284fd5156..efa54657bc4 100644 --- a/code/modules/mob/living/simple_animal/hostile/mushroom.dm +++ b/code/modules/mob/living/simple_animal/hostile/mushroom.dm @@ -170,7 +170,7 @@ /mob/living/simple_animal/hostile/mushroom/hitby(atom/movable/AM, skipcatch = FALSE, hitpush = TRUE, blocked = FALSE, datum/thrownthing/throwingdatum) ..() - if(istype(AM, /obj/item)) + if(isitem(AM)) var/obj/item/T = AM if(T.throwforce) Bruise() diff --git a/code/modules/mob/living/simple_animal/hostile/spaceworms.dm b/code/modules/mob/living/simple_animal/hostile/spaceworms.dm index 0fe79aa1da4..9c62911d778 100644 --- a/code/modules/mob/living/simple_animal/hostile/spaceworms.dm +++ b/code/modules/mob/living/simple_animal/hostile/spaceworms.dm @@ -150,10 +150,10 @@ return //Trying to eat part of self. if(istype(noms, /turf)) - if(istype(noms, /turf/simulated/wall)) + if(iswallturf(noms)) W = noms nomDelay *= 2 - if(istype(W, /turf/simulated/wall/r_wall)) + if(isreinforcedwallturf(W)) nomDelay *= 2 else return diff --git a/code/modules/mob/living/simple_animal/hostile/syndicate.dm b/code/modules/mob/living/simple_animal/hostile/syndicate.dm index 139ce389ee6..33eb3a0b90c 100644 --- a/code/modules/mob/living/simple_animal/hostile/syndicate.dm +++ b/code/modules/mob/living/simple_animal/hostile/syndicate.dm @@ -138,7 +138,7 @@ depotarea.saw_double_agent(M) depotarea.declare_started() seen_enemy_name = target.name - if(istype(target, /obj/mecha)) + if(ismecha(target)) depotarea.saw_mech(target) if(depotarea.list_includes(target, depotarea.dead_list)) seen_revived_enemy = TRUE 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 a2c3a04610d..95c3999b41b 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 @@ -145,7 +145,7 @@ if(do_after(src, delay_web, target = loc)) if(loc != mylocation) return - else if(istype(loc, /turf/space)) + else if(isspaceturf(loc)) to_chat(src, "Webs cannot be spun in space.") else var/obj/structure/spider/terrorweb/T = locate() in get_turf(src) @@ -264,9 +264,9 @@ cocoon_target.extinguish_light() for(var/obj/O in C.loc) if(!O.anchored) - if(istype(O, /obj/item)) + if(isitem(O)) O.loc = C - else if(istype(O, /obj/machinery)) + 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 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 6cdfc9791ea..767a90c9599 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 @@ -181,7 +181,7 @@ var/mob/living/M = A if(!("terrorspiders" in M.faction)) enemies |= M - else if(istype(A, /obj/mecha)) + else if(ismecha(A)) var/obj/mecha/M = A if(M.occupant) enemies |= M @@ -225,7 +225,7 @@ for(var/obj/O in can_see) if(O.anchored) continue - if(istype(O, /obj/item) || istype(O, /obj/structure) || istype(O, /obj/machinery)) + if(isitem(O) || istype(O, /obj/structure) || ismachinery(O)) if(!istype(O, /obj/item/paper)) cocoon_target = O stop_automated_movement = TRUE diff --git a/code/modules/mob/living/simple_animal/parrot.dm b/code/modules/mob/living/simple_animal/parrot.dm index af57e5c88cc..536a16594f7 100644 --- a/code/modules/mob/living/simple_animal/parrot.dm +++ b/code/modules/mob/living/simple_animal/parrot.dm @@ -368,7 +368,7 @@ if(!held_item && !parrot_perch) //If we've got nothing to do.. look for something to do. var/atom/movable/AM = search_for_perch_and_item() //This handles checking through lists so we know it's either a perch or stealable item if(AM) - if(istype(AM, /obj/item) || isliving(AM)) //If stealable item + if(isitem(AM) || isliving(AM)) //If stealable item parrot_interest = AM parrot_state = PARROT_SWOOP|PARROT_STEAL face_atom(AM) diff --git a/code/modules/mob/living/simple_animal/posessed_object.dm b/code/modules/mob/living/simple_animal/posessed_object.dm index 8000a029d67..91ab7d65e20 100644 --- a/code/modules/mob/living/simple_animal/posessed_object.dm +++ b/code/modules/mob/living/simple_animal/posessed_object.dm @@ -81,7 +81,7 @@ /mob/living/simple_animal/possessed_object/New(atom/loc as obj) ..() - if(!istype(loc, /obj/item)) // Some silly motherfucker spawned us directly via the game panel. + if(!isitem(loc)) // Some silly motherfucker spawned us directly via the game panel. message_admins("Posessed object improperly spawned, deleting.") // So silly admins with debug off will see the message too and not spam these things. stack_trace("[src] spawned manually, no object to assign attributes to.") qdel(src) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index b79ee84f3e9..c077c9c4873 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -247,7 +247,7 @@ equip_to_slot_or_del(W, slot, initial) else //Mob can't equip it. Put it their backpack or toss it on the floor - if(istype(back, /obj/item/storage)) + if(isstorage(back)) var/obj/item/storage/S = back //Now, B represents a container we can insert W into. S.handle_item_insertion(W,1) @@ -463,7 +463,7 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \ if(!disable_warning) to_chat(usr, "The [name] is too big to attach.") return 0 - if( istype(src, /obj/item/pda) || istype(src, /obj/item/pen) || is_type_in_list(src, H.wear_suit.allowed) ) + if( istype(src, /obj/item/pda) || is_pen(src) || is_type_in_list(src, H.wear_suit.allowed) ) if(H.s_store) if(!(H.s_store.flags & NODROP)) return 2 @@ -856,7 +856,7 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \ set category = "OOC" reset_perspective(null) unset_machine() - if(istype(src, /mob/living)) + if(isliving(src)) if(src:cameraFollow) src:cameraFollow = null @@ -973,7 +973,7 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \ if(mob_spell_list && mob_spell_list.len) for(var/obj/effect/proc_holder/spell/S in mob_spell_list) add_spell_to_statpanel(S) - if(mind && istype(src, /mob/living) && mind.spell_list && mind.spell_list.len) + if(mind && isliving(src) && mind.spell_list && mind.spell_list.len) for(var/obj/effect/proc_holder/spell/S in mind.spell_list) add_spell_to_statpanel(S) @@ -1187,7 +1187,7 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \ if(stat==DEAD) return var/turf/location = loc - if(istype(location, /turf/simulated)) + if(issimulatedturf(location)) if(green) if(!no_text) visible_message("[src] vomits up some green goo!","You vomit up some green goo!") diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index 584b619b0b5..ef5437207dc 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -145,7 +145,7 @@ /proc/iscuffed(A) - if(istype(A, /mob/living/carbon)) + if(iscarbon(A)) var/mob/living/carbon/C = A if(C.handcuffed) return 1 diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm index 01d064e9268..eb00d779687 100644 --- a/code/modules/mob/mob_movement.dm +++ b/code/modules/mob/mob_movement.dm @@ -321,7 +321,7 @@ continue else if(isturf(A)) var/turf/turf = A - if(istype(turf, /turf/space)) + if(isspaceturf(turf)) continue if(!turf.density && !mob_negates_gravity()) continue diff --git a/code/modules/mob/mob_transformation_simple.dm b/code/modules/mob/mob_transformation_simple.dm index b3a85fc25aa..6ce59fafc11 100644 --- a/code/modules/mob/mob_transformation_simple.dm +++ b/code/modules/mob/mob_transformation_simple.dm @@ -43,7 +43,7 @@ if(src.dna) M.dna = src.dna.Clone() - if((mind && istype(M, /mob/living)) && !forcekey) + if((mind && isliving(M)) && !forcekey) mind.transfer_to(M) else M.key = key diff --git a/code/modules/newscaster/obj/newspaper.dm b/code/modules/newscaster/obj/newspaper.dm index 26304662129..ed3f6b7751b 100644 --- a/code/modules/newscaster/obj/newspaper.dm +++ b/code/modules/newscaster/obj/newspaper.dm @@ -156,7 +156,7 @@ attack_self(M) /obj/item/newspaper/attackby(obj/item/W, mob/user, params) - if(istype(W, /obj/item/pen)) + if(is_pen(W)) if(rolled) to_chat(user, "Unroll it first!") return diff --git a/code/modules/paperwork/folders.dm b/code/modules/paperwork/folders.dm index 8c2f2965b6c..68b1b7eab59 100644 --- a/code/modules/paperwork/folders.dm +++ b/code/modules/paperwork/folders.dm @@ -40,7 +40,7 @@ W.loc = src to_chat(user, "You put [W] into [src].") update_icon(UPDATE_OVERLAYS) - else if(istype(W, /obj/item/pen)) + else if(is_pen(W)) rename_interactive(user, W) else return ..() diff --git a/code/modules/paperwork/frames.dm b/code/modules/paperwork/frames.dm index 7f72ddb60c2..6e15d66d8eb 100644 --- a/code/modules/paperwork/frames.dm +++ b/code/modules/paperwork/frames.dm @@ -96,7 +96,7 @@ return TRUE /obj/item/picture_frame/afterattack(atom/target, mob/user, proximity_flag) - if(proximity_flag && istype(target, /turf/simulated/wall)) + if(proximity_flag && iswallturf(target)) place(target, user) else ..() @@ -146,7 +146,7 @@ /obj/item/picture_frame/attack_self(mob/user) if(displayed) - if(istype(displayed, /obj/item)) + if(isitem(displayed)) var/obj/item/I = displayed I.attack_self(user) else diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index a35e6143c76..0dd0f6dd087 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -317,7 +317,7 @@ var/t = input("Enter what you want to write:", "Write", null, null) as message var/obj/item/i = usr.get_active_hand() // Check to see if he still got that darn pen, also check if he's using a crayon or pen. add_hiddenprint(usr) // No more forging nasty documents as someone else, you jerks - if(!istype(i, /obj/item/pen)) + if(!is_pen(i)) if(!istype(i, /obj/item/toy/crayon)) return @@ -411,7 +411,7 @@ B.amount++ B.update_icon() - else if(istype(P, /obj/item/pen) || istype(P, /obj/item/toy/crayon)) + else if(is_pen(P) || istype(P, /obj/item/toy/crayon)) if(user.is_literate()) var/obj/item/pen/multi/robopen/RP = P if(istype(P, /obj/item/pen/multi/robopen) && RP.mode == 2) @@ -677,7 +677,7 @@ /obj/item/paper/evilfax/show_content(mob/user, forceshow = 0, forcestars = 0, infolinks = 0, view = 1) if(user == mytarget) - if(istype(user, /mob/living/carbon)) + if(iscarbon(user)) var/mob/living/carbon/C = user evilpaper_specialaction(C) ..() @@ -720,7 +720,7 @@ /obj/item/paper/evilfax/proc/evilpaper_specialaction(mob/living/carbon/target) spawn(30) - if(istype(target, /mob/living/carbon)) + if(iscarbon(target)) var/obj/machinery/photocopier/faxmachine/fax = locateUID(faxmachineid) if(myeffect == "Borgification") to_chat(target,"You seem to comprehend the AI a little better. Why are your muscles so stiff?") diff --git a/code/modules/paperwork/paper_bundle.dm b/code/modules/paperwork/paper_bundle.dm index 486035213b8..760d04b7d3f 100644 --- a/code/modules/paperwork/paper_bundle.dm +++ b/code/modules/paperwork/paper_bundle.dm @@ -67,7 +67,7 @@ to_chat(user, "You add \the [W.name] to [(src.name == "paper bundle") ? "the paper bundle" : src.name].") qdel(W) else - if(istype(W, /obj/item/pen) || istype(W, /obj/item/toy/crayon)) + if(is_pen(W) || istype(W, /obj/item/toy/crayon)) usr << browse("", "window=PaperBundle[UID()]") //Closes the dialog P = src[page] P.attackby(W, user, params) diff --git a/code/modules/paperwork/paperplane.dm b/code/modules/paperwork/paperplane.dm index 262341e5d86..0c709051eea 100644 --- a/code/modules/paperwork/paperplane.dm +++ b/code/modules/paperwork/paperplane.dm @@ -62,7 +62,7 @@ /obj/item/paperplane/attackby(obj/item/P, mob/living/carbon/human/user, params) ..() - if(istype(P, /obj/item/pen) || istype(P, /obj/item/toy/crayon)) + if(is_pen(P) || istype(P, /obj/item/toy/crayon)) to_chat(user, "You should unfold [src] before changing it.") return diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm index 5e0392bab02..e48d3fba8b2 100644 --- a/code/modules/paperwork/photography.dm +++ b/code/modules/paperwork/photography.dm @@ -40,7 +40,7 @@ user.examinate(src) /obj/item/photo/attackby(obj/item/P as obj, mob/user as mob, params) - if(istype(P, /obj/item/pen) || istype(P, /obj/item/toy/crayon)) + if(is_pen(P) || istype(P, /obj/item/toy/crayon)) var/txt = sanitize(input(user, "What would you like to write on the back?", "Photo Writing", null) as text) txt = copytext(txt, 1, 128) if(loc == user && user.stat == 0) @@ -288,7 +288,7 @@ GLOBAL_LIST_INIT(SpookyGhosts, list("ghost","shade","shade2","ghost-narsie","hor // If what we got back is actually a picture, draw it. if(istype(img, /icon)) // Check if we're looking at a mob that's lying down - if(istype(A, /mob/living)) + if(isliving(A)) var/mob/living/L = A if(IS_HORIZONTAL(L)) // If they are, apply that effect to their picture. @@ -327,7 +327,7 @@ GLOBAL_LIST_INIT(SpookyGhosts, list("ghost","shade","shade2","ghost-narsie","hor var/holding = null - if(istype(M, /mob/living/carbon)) + if(iscarbon(M)) var/mob/living/carbon/A = M if(A.l_hand || A.r_hand) if(A.l_hand) holding = "They are holding \a [A.l_hand]" diff --git a/code/modules/pda/PDA.dm b/code/modules/pda/PDA.dm index a6a30af5cfc..9a2f51bde86 100755 --- a/code/modules/pda/PDA.dm +++ b/code/modules/pda/PDA.dm @@ -294,7 +294,7 @@ GLOBAL_LIST_EMPTY(PDAs) to_chat(user, "You slot \the [C] into [src].") SStgui.update_uis(src) playsound(src, 'sound/machines/pda_button1.ogg', 50, TRUE) - else if(istype(C, /obj/item/pen)) + else if(is_pen(C)) var/obj/item/pen/O = locate() in src if(O) to_chat(user, "There is already a pen in \the [src].") @@ -308,7 +308,7 @@ GLOBAL_LIST_EMPTY(PDAs) cartridge.attackby(C, user, params) /obj/item/pda/attack(mob/living/C as mob, mob/living/user as mob) - if(istype(C, /mob/living/carbon) && scanmode) + if(iscarbon(C) && scanmode) scanmode.scan_mob(C, user) /obj/item/pda/afterattack(atom/A as mob|obj|turf|area, mob/user as mob, proximity) diff --git a/code/modules/power/singularity/containment_field.dm b/code/modules/power/singularity/containment_field.dm index e84f63e206a..7eacbf7d6b0 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(istype(mover, /obj/machinery) || istype(mover, /obj/structure) || istype(mover, /obj/mecha)) + if(ismachinery(mover) || istype(mover, /obj/structure) || 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(istype(mover, /obj/machinery) || istype(mover, /obj/structure) || istype(mover, /obj/mecha)) + if(ismachinery(mover) || istype(mover, /obj/structure) || ismecha(mover)) bump_field(mover) return 0 return ..() diff --git a/code/modules/power/singularity/singularity.dm b/code/modules/power/singularity/singularity.dm index b546c3a767e..098d155ae7d 100644 --- a/code/modules/power/singularity/singularity.dm +++ b/code/modules/power/singularity/singularity.dm @@ -403,7 +403,7 @@ /obj/singularity/proc/mezzer() for(var/mob/living/carbon/M in oviewers(8, src)) - if(istype(M, /mob/living/carbon/brain)) //Ignore brains + if(isbrain(M)) //Ignore brains continue if(M.stat == CONSCIOUS) diff --git a/code/modules/power/smes.dm b/code/modules/power/smes.dm index 8aa7a7a2444..5d0197497ba 100644 --- a/code/modules/power/smes.dm +++ b/code/modules/power/smes.dm @@ -158,7 +158,7 @@ if(NORTHWEST, SOUTHWEST) tempDir = WEST var/turf/tempLoc = get_step(src, reverse_direction(tempDir)) - if(istype(tempLoc, /turf/space)) + if(isspaceturf(tempLoc)) to_chat(user, "You can't build a terminal on space.") return else if(istype(tempLoc)) diff --git a/code/modules/power/treadmill.dm b/code/modules/power/treadmill.dm index 6c1ade9e7e6..e4f7738798c 100644 --- a/code/modules/power/treadmill.dm +++ b/code/modules/power/treadmill.dm @@ -55,7 +55,7 @@ var/atom/movable/AM = A if(AM.anchored) continue - if(istype(A, /mob/living)) + if(isliving(A)) var/mob/living/M = A var/last_move // get/update old step count diff --git a/code/modules/projectiles/ammunition/ammo_casings.dm b/code/modules/projectiles/ammunition/ammo_casings.dm index 7cad3e11882..0da945759a5 100644 --- a/code/modules/projectiles/ammunition/ammo_casings.dm +++ b/code/modules/projectiles/ammunition/ammo_casings.dm @@ -377,7 +377,7 @@ /obj/item/ammo_casing/caseless/foam_dart/attackby(obj/item/A, mob/user, params) ..() var/obj/item/projectile/bullet/reusable/foam_dart/FD = BB - if((istype(A, /obj/item/pen)) && modified && !FD.pen) + if((is_pen(A)) && modified && !FD.pen) if(!user.unEquip(A)) return add_pen(A) diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 529c3dec38b..3f5df2bccec 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -319,7 +319,7 @@ A.Grant(user) if(unique_rename) - if(istype(I, /obj/item/pen)) + if(is_pen(I)) var/t = rename_interactive(user, I, use_prefix = FALSE) if(!isnull(t)) to_chat(user, "You name the gun [name]. Say hello to your new friend.") diff --git a/code/modules/projectiles/guns/energy/special.dm b/code/modules/projectiles/guns/energy/special.dm index d4487f1f2b4..4b46a8e2b77 100644 --- a/code/modules/projectiles/guns/energy/special.dm +++ b/code/modules/projectiles/guns/energy/special.dm @@ -658,7 +658,7 @@ temperature = target_temperature update_icon() - if(istype(loc, /mob/living/carbon)) + if(iscarbon(loc)) var/mob/living/carbon/M = loc if(src == M.machine) update_dat() diff --git a/code/modules/projectiles/guns/projectile/automatic.dm b/code/modules/projectiles/guns/projectile/automatic.dm index ff806b5f2c3..c132f503136 100644 --- a/code/modules/projectiles/guns/projectile/automatic.dm +++ b/code/modules/projectiles/guns/projectile/automatic.dm @@ -289,7 +289,7 @@ /obj/item/gun/projectile/automatic/shotgun/bulldog/attackby(obj/item/A as obj, mob/user as mob, params) if(istype(A, /obj/item/ammo_box/magazine/m12g/XtrLrg)) - if(istype(loc, /obj/item/storage)) // To prevent inventory exploits + if(isstorage(loc)) // To prevent inventory exploits var/obj/item/storage/Strg = loc if(Strg.max_w_class < WEIGHT_CLASS_BULKY) to_chat(user, "You can't reload [src], with a XL mag, while it's in a normal bag.") diff --git a/code/modules/projectiles/guns/projectile/shotgun.dm b/code/modules/projectiles/guns/projectile/shotgun.dm index 8d019052d4c..52be489dc8e 100644 --- a/code/modules/projectiles/guns/projectile/shotgun.dm +++ b/code/modules/projectiles/guns/projectile/shotgun.dm @@ -108,7 +108,7 @@ if(sawn_state == SAWN_OFF) to_chat(user, "[src] has already been shortened!") return - if(istype(loc, /obj/item/storage)) //To prevent inventory exploits + if(isstorage(loc)) //To prevent inventory exploits to_chat(user, "How do you plan to modify [src] while it's in a bag.") return if(chambered) //if the gun is chambering live ammo, shoot self, if chambering empty ammo, 'click' @@ -149,7 +149,7 @@ if(sawn_state == SAWN_INTACT) to_chat(user, "[src] has not been shortened!") return - if(istype(loc, /obj/item/storage)) //To prevent inventory exploits + if(isstorage(loc)) //To prevent inventory exploits to_chat(user, "How do you plan to modify [src] while it's in a bag.") return if(chambered) //if the gun is chambering live ammo, shoot self, if chambering empty ammo, 'click' diff --git a/code/modules/projectiles/guns/projectile/sniper.dm b/code/modules/projectiles/guns/projectile/sniper.dm index b63abd47d4e..956795cdc81 100644 --- a/code/modules/projectiles/guns/projectile/sniper.dm +++ b/code/modules/projectiles/guns/projectile/sniper.dm @@ -113,7 +113,7 @@ weaken = 0 /obj/item/projectile/bullet/sniper/soporific/on_hit(atom/target, blocked = 0, hit_zone) - if((blocked != 100) && istype(target, /mob/living)) + if((blocked != 100) && isliving(target)) var/mob/living/L = target L.SetSleeping(40 SECONDS) diff --git a/code/modules/projectiles/guns/syringe_gun.dm b/code/modules/projectiles/guns/syringe_gun.dm index bf3213febf7..a88c9cb76dc 100644 --- a/code/modules/projectiles/guns/syringe_gun.dm +++ b/code/modules/projectiles/guns/syringe_gun.dm @@ -177,7 +177,7 @@ /obj/item/gun/syringe/rapidsyringe/attackby(obj/item/A, mob/user, params, show_msg) - if(istype(A, /obj/item/storage)) + if(isstorage(A)) // Boxes can be dumped in. var/obj/item/storage/container = A if(!length(container.contents)) diff --git a/code/modules/projectiles/projectile/magic.dm b/code/modules/projectiles/projectile/magic.dm index 43f0de7e3c3..c5e613571e2 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(istype(change, /obj/item) || istype(change, /obj/structure) && !is_type_in_list(change, GLOB.protected_objects)) + if(isitem(change) || istype(change, /obj/structure) && !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/projectiles/projectile/special.dm b/code/modules/projectiles/projectile/special.dm index 77bd75e0dcb..31ad2c28c0f 100644 --- a/code/modules/projectiles/projectile/special.dm +++ b/code/modules/projectiles/projectile/special.dm @@ -257,7 +257,7 @@ /obj/item/projectile/snowball/on_hit(atom/target) //chilling . = ..() - if(istype(target, /mob/living)) + if(isliving(target)) var/mob/living/M = target M.bodytemperature = max(0, M.bodytemperature - 50) //each hit will drop your body temp, so don't get surrounded! M.ExtinguishMob() //bright side, they counter being on fire! diff --git a/code/modules/reagents/chemistry/reagents/blob.dm b/code/modules/reagents/chemistry/reagents/blob.dm index 33ebeadf9d2..540026fd3f8 100644 --- a/code/modules/reagents/chemistry/reagents/blob.dm +++ b/code/modules/reagents/chemistry/reagents/blob.dm @@ -127,7 +127,7 @@ var/turf/pull = get_turf(M) var/range_power = clamp(round(volume/5, 1), 1, 5) for(var/atom/movable/X in range(range_power,pull)) - if(istype(X, /obj/effect)) + if(iseffect(X)) continue if(X.move_resist <= MOVE_FORCE_DEFAULT && !X.anchored) var/distance = get_dist(X, pull) diff --git a/code/modules/reagents/chemistry/reagents/drugs.dm b/code/modules/reagents/chemistry/reagents/drugs.dm index a286695f672..b21b2c5d5b7 100644 --- a/code/modules/reagents/chemistry/reagents/drugs.dm +++ b/code/modules/reagents/chemistry/reagents/drugs.dm @@ -14,7 +14,7 @@ taste_description = "metal" /datum/reagent/lithium/on_mob_life(mob/living/M) - if(isturf(M.loc) && !istype(M.loc, /turf/space)) + if(isturf(M.loc) && !isspaceturf(M.loc)) if((M.mobility_flags & MOBILITY_MOVE) && !M.restrained()) step(M, pick(GLOB.cardinal)) if(prob(5)) @@ -50,7 +50,7 @@ /datum/reagent/space_drugs/on_mob_life(mob/living/M) var/update_flags = STATUS_UPDATE_NONE M.Druggy(30 SECONDS) - if(isturf(M.loc) && !istype(M.loc, /turf/space)) + if(isturf(M.loc) && !isspaceturf(M.loc)) if((M.mobility_flags & MOBILITY_MOVE) && !M.restrained()) step(M, pick(GLOB.cardinal)) if(prob(7)) diff --git a/code/modules/reagents/chemistry/reagents/water.dm b/code/modules/reagents/chemistry/reagents/water.dm index 0f4c31f3630..1a9c8bc450e 100644 --- a/code/modules/reagents/chemistry/reagents/water.dm +++ b/code/modules/reagents/chemistry/reagents/water.dm @@ -57,7 +57,7 @@ taste_description = "floor cleaner" /datum/reagent/space_cleaner/reaction_obj(obj/O, volume) - if(istype(O, /obj/effect)) + if(iseffect(O)) var/obj/effect/E = O if(E.is_cleanable()) var/obj/effect/decal/cleanable/blood/B = E diff --git a/code/modules/reagents/chemistry/recipes.dm b/code/modules/reagents/chemistry/recipes.dm index 6e1254a3884..9b98a849032 100644 --- a/code/modules/reagents/chemistry/recipes.dm +++ b/code/modules/reagents/chemistry/recipes.dm @@ -79,7 +79,7 @@ var/moved_count = 0 // The ternary below isnt exactly needed, but it makes code more readable because `pull` is a bool for(var/atom/movable/X in view(2 + (pull ? 1 : 0) + (volume > 30 ? 1 : 0), T)) - if(istype(X, /obj/effect)) + if(iseffect(X)) continue //stop pulling smoke and hotspots please if(X && !X.anchored && X.move_resist <= MOVE_FORCE_DEFAULT) if(pull) diff --git a/code/modules/reagents/reagent_containers/glass_containers.dm b/code/modules/reagents/reagent_containers/glass_containers.dm index fddb26d9229..a7065df2e9d 100644 --- a/code/modules/reagents/reagent_containers/glass_containers.dm +++ b/code/modules/reagents/reagent_containers/glass_containers.dm @@ -110,7 +110,7 @@ reagents.clear_reagents() /obj/item/reagent_containers/glass/attackby(obj/item/I, mob/user, params) - if(istype(I, /obj/item/pen) || istype(I, /obj/item/flashlight/pen)) + if(is_pen(I) || istype(I, /obj/item/flashlight/pen)) var/t = rename_interactive(user, I) if(!isnull(t)) label_text = t diff --git a/code/modules/reagents/reagent_containers/iv_bag.dm b/code/modules/reagents/reagent_containers/iv_bag.dm index d3e21b39c21..0f6f187ae17 100644 --- a/code/modules/reagents/reagent_containers/iv_bag.dm +++ b/code/modules/reagents/reagent_containers/iv_bag.dm @@ -149,7 +149,7 @@ . += "inject" /obj/item/reagent_containers/iv_bag/attackby(obj/item/I, mob/user, params) - if(istype(I, /obj/item/pen) || istype(I, /obj/item/flashlight/pen)) + if(is_pen(I) || istype(I, /obj/item/flashlight/pen)) rename_interactive(user, I) // PRE-FILLED IV BAGS BELOW diff --git a/code/modules/reagents/reagent_containers/spray.dm b/code/modules/reagents/reagent_containers/spray.dm index a342dee5a57..78ae9dbc3c0 100644 --- a/code/modules/reagents/reagent_containers/spray.dm +++ b/code/modules/reagents/reagent_containers/spray.dm @@ -19,7 +19,7 @@ possible_transfer_amounts = null /obj/item/reagent_containers/spray/afterattack(atom/A, mob/user) - if(istype(A, /obj/item/storage) || istype(A, /obj/structure/table) || istype(A, /obj/structure/rack) || istype(A, /obj/structure/closet) \ + if(isstorage(A) || istype(A, /obj/structure/table) || istype(A, /obj/structure/rack) || istype(A, /obj/structure/closet) \ || istype(A, /obj/item/reagent_containers) || istype(A, /obj/structure/sink) || istype(A, /obj/structure/janitorialcart) || istype(A, /obj/machinery/hydroponics)) return diff --git a/code/modules/recycling/conveyor2.dm b/code/modules/recycling/conveyor2.dm index 159d7934cb6..49c2cb15cb5 100644 --- a/code/modules/recycling/conveyor2.dm +++ b/code/modules/recycling/conveyor2.dm @@ -428,7 +428,7 @@ GLOBAL_LIST_INIT(conveyor_switches, list()) return if(user.incapacitated()) return - if(!istype(T, /turf/simulated/floor)) + if(!isfloorturf(T)) return if(T == get_turf(user)) to_chat(user, "You cannot place [src] under yourself.") @@ -463,7 +463,7 @@ GLOBAL_LIST_INIT(conveyor_switches, list()) return if(user.incapacitated()) return - if(!istype(T, /turf/simulated/floor)) + if(!isfloorturf(T)) return var/found = FALSE for(var/obj/machinery/conveyor/C in view()) diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm index 1c90c07aefb..1e2d225b532 100644 --- a/code/modules/recycling/disposal.dm +++ b/code/modules/recycling/disposal.dm @@ -96,7 +96,7 @@ to_chat(user, "You can't place that item inside the disposal unit.") return - if(istype(I, /obj/item/storage)) + if(isstorage(I)) var/obj/item/storage/S = I if((S.allow_quick_empty || S.allow_quick_gather) && S.contents.len) S.hide_from(user) @@ -655,7 +655,7 @@ // called when player tries to move while in a pipe /obj/structure/disposalholder/relaymove(mob/user) - if(!istype(user, /mob/living)) + if(!isliving(user)) return var/mob/living/U = user @@ -766,7 +766,7 @@ if(T.transparent_floor) update_icon(UPDATE_ICON_STATE) return - hide(T.intact && !istype(T, /turf/space)) // space never hides pipes + hide(T.intact && !isspaceturf(T)) // space never hides pipes update_icon(UPDATE_ICON_STATE) // hide called by levelupdate if turf intact status changes @@ -808,7 +808,7 @@ new turf_typecache(T) if(direction) // direction is specified - if(istype(T, /turf/space)) // if ended in space, then range is unlimited + if(isspaceturf(T)) // if ended in space, then range is unlimited target = get_edge_target_turf(T, direction) else // otherwise limit to 10 tiles target = get_ranged_target_turf(T, direction, 10) diff --git a/code/modules/recycling/sortingmachinery.dm b/code/modules/recycling/sortingmachinery.dm index 46436093bb1..09fae8d964c 100755 --- a/code/modules/recycling/sortingmachinery.dm +++ b/code/modules/recycling/sortingmachinery.dm @@ -55,7 +55,7 @@ qdel(sp) playsound(loc, 'sound/items/poster_ripped.ogg', 50, 1) - else if(istype(W, /obj/item/pen)) + else if(is_pen(W)) rename_interactive(user, W) else if(istype(W, /obj/item/stack/wrapping_paper) && !giftwrapped) @@ -123,7 +123,7 @@ qdel(sp) playsound(loc, 'sound/items/poster_ripped.ogg', 50, 1) - else if(istype(W, /obj/item/pen)) + else if(is_pen(W)) rename_interactive(user, W) else if(istype(W, /obj/item/stack/wrapping_paper) && !giftwrapped) @@ -167,7 +167,7 @@ if(target in user) return - if(istype(target, /obj/item) && !(istype(target, /obj/item/storage) && !istype(target,/obj/item/storage/box) && !istype(target, /obj/item/shippingPackage))) + if(isitem(target) && !(isstorage(target) && !istype(target,/obj/item/storage/box) && !istype(target, /obj/item/shippingPackage))) var/obj/item/O = target if(!use(1)) return FALSE @@ -391,7 +391,7 @@ /obj/item/shippingPackage/attackby(obj/item/O, mob/user, params) if(sealed) - if(istype(O, /obj/item/pen)) + if(is_pen(O)) var/str = copytext(sanitize(input(user, "Intended recipient?", "Address", "")), 1, MAX_NAME_LEN) if(!str || !length(str)) to_chat(user, "Invalid text.") @@ -402,7 +402,7 @@ if(wrapped) to_chat(user, "[src] already contains \a [wrapped].") return - if(istype(O, /obj/item) && !istype(O, /obj/item/storage) && !istype(O, /obj/item/shippingPackage)) + if(isitem(O) && !isstorage(O) && !istype(O, /obj/item/shippingPackage)) if(!user.canUnEquip(O)) to_chat(user, "[O] is stuck to your hand, you cannot put it in [src]!") return diff --git a/code/modules/research/destructive_analyzer.dm b/code/modules/research/destructive_analyzer.dm index dc0b3c9b8e2..e1bb1e43354 100644 --- a/code/modules/research/destructive_analyzer.dm +++ b/code/modules/research/destructive_analyzer.dm @@ -69,7 +69,7 @@ Note: Must be placed within 3 tiles of the R&D Console to_chat(user, "[src] is busy right now.") return - if(istype(O, /obj/item) && !loaded_item) + if(isitem(O) && !loaded_item) if(!O.origin_tech) to_chat(user, "This doesn't seem to have a tech origin!") return diff --git a/code/modules/research/experimentor.dm b/code/modules/research/experimentor.dm index 149fb602a67..be69f133baa 100644 --- a/code/modules/research/experimentor.dm +++ b/code/modules/research/experimentor.dm @@ -119,7 +119,7 @@ to_chat(user, "[src] is already loaded.") return - if(istype(O, /obj/item)) + if(isitem(O)) if(!O.origin_tech) to_chat(user, "This doesn't seem to have a tech origin!") return diff --git a/code/modules/shuttle/navigation_computer.dm b/code/modules/shuttle/navigation_computer.dm index e1d3507a88c..fe318901c2e 100644 --- a/code/modules/shuttle/navigation_computer.dm +++ b/code/modules/shuttle/navigation_computer.dm @@ -274,7 +274,7 @@ return ..() /mob/camera/aiEye/remote/shuttle_docker/setLoc(T) - if(istype(get_turf(T), /turf/space) || istype(get_area(T), /area/space) || istype(get_area(T), /area/shuttle)) + if(isspaceturf(get_turf(T)) || istype(get_area(T), /area/space) || istype(get_area(T), /area/shuttle)) ..() var/obj/machinery/computer/camera_advanced/shuttle_docker/console = origin console.checkLandingSpot() diff --git a/code/modules/shuttle/shuttle.dm b/code/modules/shuttle/shuttle.dm index f39b25ed55c..38c09fbdbba 100644 --- a/code/modules/shuttle/shuttle.dm +++ b/code/modules/shuttle/shuttle.dm @@ -496,7 +496,7 @@ T0.copyTurf(T1) //copy over air - if(istype(T1, /turf/simulated)) + if(issimulatedturf(T1)) var/turf/simulated/Ts1 = T1 Ts1.copy_air_with_tile(T0) diff --git a/code/modules/surgery/generic.dm b/code/modules/surgery/generic.dm index d15b4586a95..3c313a2b50f 100644 --- a/code/modules/surgery/generic.dm +++ b/code/modules/surgery/generic.dm @@ -269,7 +269,7 @@ // okay if you can feel your arm getting chopped off you aren't gonna be singing to_chat(target, "Your [affected] goes completely numb at the [affected.amputation_point]!") target.emote("scream") - if(istype(thing, /obj/item)) + if(isitem(thing)) user.put_in_hands(thing) return SURGERY_STEP_CONTINUE diff --git a/code/modules/surgery/robotics.dm b/code/modules/surgery/robotics.dm index 83031d61501..083b17f8096 100644 --- a/code/modules/surgery/robotics.dm +++ b/code/modules/surgery/robotics.dm @@ -615,7 +615,7 @@ add_attack_logs(user, target, "Surgically removed [affected.name] from. INTENT: [uppertext(user.a_intent)]")//log it var/atom/movable/thing = affected.droplimb(1, DROPLIMB_SHARP) - if(istype(thing, /obj/item)) + if(isitem(thing)) user.put_in_hands(thing) return SURGERY_STEP_CONTINUE