diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm
index 0a555c4e756c..a4427a96e528 100644
--- a/code/__HELPERS/unsorted.dm
+++ b/code/__HELPERS/unsorted.dm
@@ -441,7 +441,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
// For example, using this on a disk, which is in a bag, on a mob, will return the mob because it's on the turf.
/proc/get_atom_on_turf(atom/movable/M)
var/atom/loc = M
- while(loc && loc.loc && !istype(loc.loc, /turf/))
+ while(loc && loc.loc && !isturf(loc.loc))
loc = loc.loc
return loc
diff --git a/code/controllers/subsystem/jobs.dm b/code/controllers/subsystem/jobs.dm
index 27972b658c06..8b0968bec10f 100644
--- a/code/controllers/subsystem/jobs.dm
+++ b/code/controllers/subsystem/jobs.dm
@@ -382,7 +382,7 @@ var/datum/subsystem/job/SSjob
if(clear)
S = T
continue
- if(istype(S, /obj/effect/landmark) && istype(S.loc, /turf))
+ if(istype(S, /obj/effect/landmark) && isturf(S.loc))
H.loc = S.loc
if(H.mind)
diff --git a/code/game/atoms.dm b/code/game/atoms.dm
index 56e2f30c3863..504f72613c11 100644
--- a/code/game/atoms.dm
+++ b/code/game/atoms.dm
@@ -415,7 +415,7 @@ var/list/blood_splatter_icons = list()
return
/atom/proc/add_vomit_floor(mob/living/carbon/M, toxvomit = 0)
- if(istype(src,/turf) )
+ if(isturf(src))
var/obj/effect/decal/cleanable/vomit/V = PoolOrNew(/obj/effect/decal/cleanable/vomit, src)
// Make toxins vomit look different
if(toxvomit)
@@ -441,4 +441,4 @@ var/list/blood_splatter_icons = list()
admin_spawned = TRUE
/atom/proc/mech_melee_attack(obj/mecha/M)
- return
\ No newline at end of file
+ return
diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm
index 8b99e2f98bcf..ea1214f2989a 100644
--- a/code/game/atoms_movable.dm
+++ b/code/game/atoms_movable.dm
@@ -248,7 +248,7 @@
while(target && ((dist_travelled < range && loc != finalturf) || !has_gravity(src))) //stop if we reached our destination (or max range) and aren't floating
var/slept = 0
- if(!istype(loc, /turf))
+ if(!isturf(loc))
hit = 1
break
diff --git a/code/game/gamemodes/antag_spawner.dm b/code/game/gamemodes/antag_spawner.dm
index 7e96f2aa3dcf..7badeff7bbb7 100644
--- a/code/game/gamemodes/antag_spawner.dm
+++ b/code/game/gamemodes/antag_spawner.dm
@@ -50,7 +50,7 @@
if(!ishuman(H))
return 1
- if(loc == H || (in_range(src, H) && istype(loc, /turf)))
+ if(loc == H || (in_range(src, H) && isturf(loc)))
H.set_machine(src)
if(href_list["school"])
if (used)
diff --git a/code/game/gamemodes/gang/dominator.dm b/code/game/gamemodes/gang/dominator.dm
index a636a1d4d988..4b9532fd11fd 100644
--- a/code/game/gamemodes/gang/dominator.dm
+++ b/code/game/gamemodes/gang/dominator.dm
@@ -162,7 +162,7 @@
var/time = round(determine_domination_time(tempgang)/60,0.1)
if(alert(user,"With [round((tempgang.territory.len/start_state.num_territories)*100, 1)]% station control, a takeover will require [time] minutes.\nYour gang will be unable to gain influence while it is active.\nThe entire station will likely be alerted to it once it starts.\nYou have [tempgang.dom_attempts] attempt(s) remaining. Are you ready?","Confirm","Ready","Later") == "Ready")
- if((tempgang.is_dominating) || !tempgang.dom_attempts || !in_range(src, user) || !istype(src.loc, /turf))
+ if((tempgang.is_dominating) || !tempgang.dom_attempts || !in_range(src, user) || !isturf(loc))
return 0
var/area/A = get_area(loc)
diff --git a/code/game/gamemodes/wizard/spellbook.dm b/code/game/gamemodes/wizard/spellbook.dm
index 5718c688989a..6ea37d3ceeea 100644
--- a/code/game/gamemodes/wizard/spellbook.dm
+++ b/code/game/gamemodes/wizard/spellbook.dm
@@ -665,7 +665,7 @@
return
var/datum/spellbook_entry/E = null
- if(loc == H || (in_range(src, H) && istype(loc, /turf)))
+ if(loc == H || (in_range(src, H) && isturf(loc)))
H.set_machine(src)
if(href_list["buy"])
E = entries[text2num(href_list["buy"])]
diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm
index 6c5406a31b26..e458f081eb18 100644
--- a/code/game/machinery/doors/airlock.dm
+++ b/code/game/machinery/doors/airlock.dm
@@ -642,7 +642,7 @@ var/list/airlock_overlays = list()
usr.unset_machine()
return
- if((in_range(src, usr) && istype(src.loc, /turf)) && panel_open)
+ if((in_range(src, usr) && isturf(loc)) && panel_open)
usr.set_machine(src)
diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm
index f75846cd36db..a81c2d36fc90 100644
--- a/code/game/machinery/newscaster.dm
+++ b/code/game/machinery/newscaster.dm
@@ -1007,7 +1007,7 @@ var/list/obj/machinery/newscaster/allCasters = list()
/obj/item/weapon/newspaper/Topic(href, href_list)
var/mob/living/U = usr
..()
- if ((src in U.contents) || ( istype(loc, /turf) && in_range(src, U) ))
+ if((src in U.contents) || (isturf(loc) && in_range(src, U)))
U.set_machine(src)
if(href_list["next_page"])
if(curr_page == pages+1)
diff --git a/code/game/mecha/equipment/tools/work_tools.dm b/code/game/mecha/equipment/tools/work_tools.dm
index e40f3cbaf698..586e67bebb51 100644
--- a/code/game/mecha/equipment/tools/work_tools.dm
+++ b/code/game/mecha/equipment/tools/work_tools.dm
@@ -210,7 +210,7 @@
if(istype(target, /turf/open/space/transit))//>implying these are ever made -Sieve
return
- if(!istype(target, /turf) && !istype(target, /obj/machinery/door/airlock))
+ if(!isturf(target) && !istype(target, /obj/machinery/door/airlock))
target = get_turf(target)
if(!action_checks(target) || get_dist(chassis, target)>3)
return
diff --git a/code/game/objects/effects/effect_system/effects_foam.dm b/code/game/objects/effects/effect_system/effects_foam.dm
index ad098d196f67..80e6712ad5b0 100644
--- a/code/game/objects/effects/effect_system/effects_foam.dm
+++ b/code/game/objects/effects/effect_system/effects_foam.dm
@@ -144,7 +144,7 @@
return ..()
/datum/effect_system/foam_spread/set_up(amt=5, loca, datum/reagents/carry = null)
- if(istype(loca, /turf/))
+ if(isturf(loca))
location = loca
else
location = get_turf(loca)
diff --git a/code/game/objects/effects/effect_system/effects_smoke.dm b/code/game/objects/effects/effect_system/effects_smoke.dm
index 7d34bd409570..b51923eff972 100644
--- a/code/game/objects/effects/effect_system/effects_smoke.dm
+++ b/code/game/objects/effects/effect_system/effects_smoke.dm
@@ -266,7 +266,7 @@
return ..()
/datum/effect_system/smoke_spread/chem/set_up(datum/reagents/carry = null, radius = 1, loca, silent = 0)
- if(istype(loca, /turf/))
+ if(isturf(loca))
location = loca
else
location = get_turf(loca)
diff --git a/code/game/objects/effects/effect_system/effects_sparks.dm b/code/game/objects/effects/effect_system/effects_sparks.dm
index 6488083cd4c8..f6f07d16b33b 100644
--- a/code/game/objects/effects/effect_system/effects_sparks.dm
+++ b/code/game/objects/effects/effect_system/effects_sparks.dm
@@ -15,20 +15,20 @@
..()
flick("sparks", src) // replay the animation
playsound(src.loc, "sparks", 100, 1)
- var/turf/T = src.loc
- if (istype(T, /turf))
+ var/turf/T = loc
+ if(isturf(T))
T.hotspot_expose(1000,100)
QDEL_IN(src, 20)
/obj/effect/particle_effect/sparks/Destroy()
- var/turf/T = src.loc
- if (istype(T, /turf))
+ var/turf/T = loc
+ if(isturf(T))
T.hotspot_expose(1000,100)
return ..()
/obj/effect/particle_effect/sparks/Move()
..()
- var/turf/T = src.loc
+ var/turf/T = loc
if(isturf(T))
T.hotspot_expose(1000,100)
diff --git a/code/game/objects/effects/spiders.dm b/code/game/objects/effects/spiders.dm
index d2aff6fb3ecd..87fecb853080 100644
--- a/code/game/objects/effects/spiders.dm
+++ b/code/game/objects/effects/spiders.dm
@@ -103,7 +103,7 @@
/obj/structure/spider/spiderling/process()
if(travelling_in_vent)
- if(istype(src.loc, /turf))
+ if(isturf(loc))
travelling_in_vent = 0
entry_vent = null
else if(entry_vent)
diff --git a/code/game/objects/empulse.dm b/code/game/objects/empulse.dm
index 39db0c0ff938..510c5183af7d 100644
--- a/code/game/objects/empulse.dm
+++ b/code/game/objects/empulse.dm
@@ -1,7 +1,7 @@
/proc/empulse(turf/epicenter, heavy_range, light_range, log=0)
if(!epicenter) return
- if(!istype(epicenter, /turf))
+ if(!isturf(epicenter))
epicenter = get_turf(epicenter.loc)
if(log)
diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm
index 534dd1e27c0e..c01cad9f22a8 100644
--- a/code/game/objects/items.dm
+++ b/code/game/objects/items.dm
@@ -99,7 +99,7 @@ var/global/image/fire_overlay = image("icon" = 'icons/effects/fire.dmi', "icon_s
/obj/item/proc/check_allowed_items(atom/target, not_inside, target_self)
- if(((src in target) && !target_self) || (!istype(target.loc, /turf) && !istype(target, /turf) && not_inside))
+ if(((src in target) && !target_self) || (!isturf(target.loc) && !isturf(target) && not_inside))
return 0
else
return 1
@@ -139,7 +139,7 @@ var/global/image/fire_overlay = image("icon" = 'icons/effects/fire.dmi', "icon_s
set category = "Object"
set src in oview(1)
- if(!istype(src.loc, /turf) || usr.stat || usr.restrained() || !usr.canmove)
+ if(!isturf(loc) || usr.stat || usr.restrained() || !usr.canmove)
return
var/turf/T = src.loc
@@ -596,4 +596,4 @@ obj/item/proc/item_action_slot_check(slot, mob/user)
MO.pixel_x = rand(-16,16)
MO.pixel_y = rand(-16,16)
MO.desc = "Looks like this was \an [src] some time ago."
- ..()
\ No newline at end of file
+ ..()
diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm
index df9bed4e4e86..71a8585f900e 100644
--- a/code/game/objects/items/devices/PDA/PDA.dm
+++ b/code/game/objects/items/devices/PDA/PDA.dm
@@ -762,7 +762,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
user << "Card scanned."
else
//Basic safety check. If either both objects are held by user or PDA is on ground and card is in hand.
- if(((src in user.contents) && (C in user.contents)) || (istype(loc, /turf) && in_range(src, user) && (C in user.contents)) )
+ if(((src in user.contents) || (isturf(loc) && in_range(src, user))) && (C in user.contents))
if(!id_check(user, 2))
return
user << "You put the ID into \the [src]'s slot."
diff --git a/code/game/objects/items/robot/robot_parts.dm b/code/game/objects/items/robot/robot_parts.dm
index f89954ad43a5..a84a115c196f 100644
--- a/code/game/objects/items/robot/robot_parts.dm
+++ b/code/game/objects/items/robot/robot_parts.dm
@@ -154,7 +154,7 @@
else if(istype(W, /obj/item/device/mmi))
var/obj/item/device/mmi/M = W
if(check_completion())
- if(!istype(loc,/turf))
+ if(!isturf(loc))
user << "You can't put the MMI in, the frame has to be standing on the ground to be perfectly precise!"
return
if(!M.brainmob)
diff --git a/code/game/objects/items/stacks/sheets/glass.dm b/code/game/objects/items/stacks/sheets/glass.dm
index 728c6d0d48a7..bcdce786746c 100644
--- a/code/game/objects/items/stacks/sheets/glass.dm
+++ b/code/game/objects/items/stacks/sheets/glass.dm
@@ -62,7 +62,7 @@
/obj/item/stack/sheet/glass/proc/construct_window(mob/user)
if(!user || !src)
return 0
- if(!istype(user.loc,/turf))
+ if(!isturf(user.loc))
return 0
if(!user.IsAdvancedToolUser())
user << "You don't have the dexterity to do this!"
@@ -168,7 +168,7 @@
/obj/item/stack/sheet/rglass/proc/construct_window(mob/user)
if(!user || !src)
return 0
- if(!istype(user.loc,/turf))
+ if(!isturf(user.loc))
return 0
if(!user.IsAdvancedToolUser())
user << "You don't have the dexterity to do this!"
diff --git a/code/game/objects/items/weapons/RCD.dm b/code/game/objects/items/weapons/RCD.dm
index b42ea177b893..cf98f72dd387 100644
--- a/code/game/objects/items/weapons/RCD.dm
+++ b/code/game/objects/items/weapons/RCD.dm
@@ -304,7 +304,7 @@ RCD
if(!proximity) return 0
if(istype(A,/area/shuttle)||istype(A,/turf/open/space/transit))
return 0
- if(!(istype(A, /turf) || istype(A, /obj/machinery/door/airlock) || istype(A, /obj/structure/grille) || istype(A, /obj/structure/window)))
+ if(!(isturf(A) || istype(A, /obj/machinery/door/airlock) || istype(A, /obj/structure/grille) || istype(A, /obj/structure/window)))
return 0
switch(mode)
diff --git a/code/game/objects/items/weapons/RPD.dm b/code/game/objects/items/weapons/RPD.dm
index d7de33121f78..b94e7c416974 100644
--- a/code/game/objects/items/weapons/RPD.dm
+++ b/code/game/objects/items/weapons/RPD.dm
@@ -564,7 +564,7 @@ var/global/list/RPD_recipes=list(
user << "The [src]'s error light flickers! Perhaps you need to only use it on pipes and pipe meters?"
return 0
if(ATMOS_MODE)
- if(!(istype(A, /turf)))
+ if(!isturf(A))
user << "The [src]'s error light flickers!"
return 0
user << "You start building pipes..."
@@ -579,7 +579,7 @@ var/global/list/RPD_recipes=list(
return 0
if(METER_MODE)
- if(!(istype(A, /turf)))
+ if(!isturf(A))
user << "The [src]'s error light flickers!"
return 0
user << "You start building meter..."
diff --git a/code/game/objects/items/weapons/implants/implantpad.dm b/code/game/objects/items/weapons/implants/implantpad.dm
index 5b11165fe2d0..b00c1b29d524 100644
--- a/code/game/objects/items/weapons/implants/implantpad.dm
+++ b/code/game/objects/items/weapons/implants/implantpad.dm
@@ -62,7 +62,7 @@
..()
if(usr.stat)
return
- if((usr.contents.Find(src)) || ((in_range(src, usr) && istype(loc, /turf))))
+ if(usr.contents.Find(src) || (in_range(src, usr) && isturf(loc)))
usr.set_machine(src)
if(istype(loc, /mob))
diff --git a/code/game/objects/items/weapons/scrolls.dm b/code/game/objects/items/weapons/scrolls.dm
index 6060aec8d4cc..a286d6cb08fd 100644
--- a/code/game/objects/items/weapons/scrolls.dm
+++ b/code/game/objects/items/weapons/scrolls.dm
@@ -37,7 +37,7 @@
if (!ishuman(usr))
return 1
var/mob/living/carbon/human/H = usr
- if ((H == src.loc || (in_range(src, H) && istype(src.loc, /turf))))
+ if(H == src.loc || (in_range(src, H) && isturf(loc)))
H.set_machine(src)
if (href_list["spell_teleport"])
if (src.uses >= 1)
@@ -57,7 +57,7 @@
if (!user || user.stat || user.restrained() || uses <= 0)
return
- if(!((user == loc || (in_range(src, user) && istype(src.loc, /turf)))))
+ if(!(user == loc || (in_range(src, user) && isturf(loc))))
return
var/datum/effect_system/smoke_spread/smoke = new
diff --git a/code/game/objects/items/weapons/tanks/watertank.dm b/code/game/objects/items/weapons/tanks/watertank.dm
index b641a999de83..f199ba021ad3 100644
--- a/code/game/objects/items/weapons/tanks/watertank.dm
+++ b/code/game/objects/items/weapons/tanks/watertank.dm
@@ -295,7 +295,7 @@
nanofrost_cooldown = 0
return
if(nozzle_mode == METAL_FOAM)
- if(!Adj|| !istype(target, /turf))
+ if(!Adj|| !isturf(target))
return
if(metal_synthesis_cooldown < 5)
var/obj/effect/particle_effect/foam/metal/F = PoolOrNew(/obj/effect/particle_effect/foam/metal, get_turf(target))
diff --git a/code/game/objects/items/weapons/teleportation.dm b/code/game/objects/items/weapons/teleportation.dm
index f0480362db02..6adf153cef0e 100644
--- a/code/game/objects/items/weapons/teleportation.dm
+++ b/code/game/objects/items/weapons/teleportation.dm
@@ -51,7 +51,7 @@ Frequency:
if(!current_location||current_location.z==2)//If turf was not found or they're on z level 2.
usr << "The [src] is malfunctioning."
return
- if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))))
+ if(usr.contents.Find(src) || (in_range(src, usr) && isturf(loc)))
usr.set_machine(src)
if (href_list["refresh"])
src.temp = "Persistent Signal Locator
"
@@ -141,7 +141,7 @@ Frequency:
/obj/item/weapon/hand_tele/attack_self(mob/user)
var/turf/current_location = get_turf(user)//What turf is the user on?
var/area/current_area = current_location.loc
- if(!current_location||current_area.noteleport||current_location.z>=7 || !istype(user.loc, /turf))//If turf was not found or they're on z level 2 or >7 which does not currently exist. or if user is not located on a turf
+ if(!current_location || current_area.noteleport || current_location.z > ZLEVEL_SPACEMAX || !isturf(user.loc))//If turf was not found or they're on z level 2 or >7 which does not currently exist. or if user is not located on a turf
user << "\The [src] is malfunctioning."
return
var/list/L = list( )
diff --git a/code/game/objects/radiation.dm b/code/game/objects/radiation.dm
index 0dfa2b1b9075..3d7739c4e210 100644
--- a/code/game/objects/radiation.dm
+++ b/code/game/objects/radiation.dm
@@ -1,7 +1,7 @@
/proc/radiation_pulse(turf/epicenter, heavy_range, light_range, severity, log=0)
if(!epicenter || !severity) return
- if(!istype(epicenter, /turf))
+ if(!isturf(epicenter))
epicenter = get_turf(epicenter.loc)
if(heavy_range > light_range)
diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm
index e6365b97c83c..a3b1b12d7a91 100644
--- a/code/game/objects/structures/grille.dm
+++ b/code/game/objects/structures/grille.dm
@@ -82,7 +82,7 @@
if(!shock(user, 100))
playsound(loc, 'sound/items/Wirecutter.ogg', 100, 1)
deconstruct()
- else if((istype(W, /obj/item/weapon/screwdriver)) && (istype(loc, /turf) || anchored))
+ else if((istype(W, /obj/item/weapon/screwdriver)) && (isturf(loc) || anchored))
if(!shock(user, 90))
playsound(loc, 'sound/items/Screwdriver.ogg', 100, 1)
anchored = !anchored
diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm
index 6f5c4cb53b8d..e3760fcd446b 100644
--- a/code/game/turfs/simulated/walls.dm
+++ b/code/game/turfs/simulated/walls.dm
@@ -136,7 +136,7 @@
return
//get the user's location
- if( !istype(user.loc, /turf) )
+ if(!isturf(user.loc))
return //can't do this stuff whilst inside objects and such
add_fingerprint(user)
diff --git a/code/modules/admin/player_panel.dm b/code/modules/admin/player_panel.dm
index f744922369a8..168c0ac1bbae 100644
--- a/code/modules/admin/player_panel.dm
+++ b/code/modules/admin/player_panel.dm
@@ -356,11 +356,11 @@
for(var/obj/item/weapon/disk/nuclear/N in poi_list)
dat += "[N.name], "
var/atom/disk_loc = N.loc
- while(!istype(disk_loc, /turf))
- if(istype(disk_loc, /mob))
+ while(!isturf(disk_loc))
+ if(ismob(disk_loc))
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/verbs/SDQL2/SDQL_2.dm b/code/modules/admin/verbs/SDQL2/SDQL_2.dm
index e36a81bf8332..4dc8490ecebe 100644
--- a/code/modules/admin/verbs/SDQL2/SDQL_2.dm
+++ b/code/modules/admin/verbs/SDQL2/SDQL_2.dm
@@ -134,7 +134,7 @@
vals += v
vals[v] = SDQL_expression(d, set_list[v])
- if(istype(d, /turf))
+ if(isturf(d))
for(var/v in vals)
if(v == "x" || v == "y" || v == "z")
continue
diff --git a/code/modules/admin/verbs/buildmode.dm b/code/modules/admin/verbs/buildmode.dm
index fe3d5f35575d..c68066cac0ac 100644
--- a/code/modules/admin/verbs/buildmode.dm
+++ b/code/modules/admin/verbs/buildmode.dm
@@ -242,7 +242,7 @@
. = 1
switch(mode)
if(BASIC_BUILDMODE)
- if(istype(object,/turf) && left_click && !alt_click && !ctrl_click)
+ if(isturf(object) && left_click && !alt_click && !ctrl_click)
var/turf/T = object
if(isspaceturf(object))
T.ChangeTurf(/turf/open/floor/plasteel)
@@ -266,10 +266,10 @@
else if(isobj(object))
qdel(object)
return
- else if(istype(object,/turf) && alt_click && left_click)
+ else if(isturf(object) && alt_click && left_click)
log_admin("Build Mode: [key_name(user)] built an airlock at ([object.x],[object.y],[object.z])")
new/obj/machinery/door/airlock(get_turf(object))
- else if(istype(object,/turf) && ctrl_click && left_click)
+ else if(isturf(object) && ctrl_click && left_click)
switch(build_dir)
if(NORTH)
var/obj/structure/window/reinforced/WIN = new/obj/structure/window/reinforced(get_turf(object))
diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm
index 01bff9da6890..4ed208924f8f 100644
--- a/code/modules/admin/verbs/debug.dm
+++ b/code/modules/admin/verbs/debug.dm
@@ -220,7 +220,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
return
var/turf/T = mob.loc
- if (!( istype(T, /turf) ))
+ if(!isturf(T))
return
var/datum/gas_mixture/env = T.return_air()
diff --git a/code/modules/admin/verbs/massmodvar.dm b/code/modules/admin/verbs/massmodvar.dm
index 39e162e66c28..b4a6821c09b3 100644
--- a/code/modules/admin/verbs/massmodvar.dm
+++ b/code/modules/admin/verbs/massmodvar.dm
@@ -141,7 +141,7 @@
if("restore to default")
O.vars[variable] = initial(O.vars[variable])
if(method)
- if(istype(O, /mob))
+ if(ismob(O))
for(var/mob/M in mob_list)
if ( istype(M , O.type) )
M.vars[variable] = O.vars[variable]
@@ -212,7 +212,7 @@
//Convert the string vars for anything that's not O
if(method)
- if(istype(O, /mob))
+ if(ismob(O))
for(var/mob/M in mob_list)
if ( istype(M , O.type) )
new_value = pre_processing //reset new_value, ready to convert it uniquely for the next iteration
@@ -242,7 +242,7 @@
A.vars[variable] = new_value
CHECK_TICK
- else if(istype(O, /turf))
+ else if(isturf(O))
for(var/turf/A in world)
if ( istype(A , O.type) )
new_value = pre_processing
@@ -257,7 +257,7 @@
A.vars[variable] = new_value
CHECK_TICK
else
- if(istype(O, /mob))
+ if(ismob(O))
for(var/mob/M in mob_list)
if (M.type == O.type)
new_value = pre_processing
@@ -287,7 +287,7 @@
A.vars[variable] = new_value
CHECK_TICK
- else if(istype(O, /turf))
+ else if(isturf(O))
for(var/turf/A in world)
if (A.type == O.type)
new_value = pre_processing
@@ -313,7 +313,7 @@
O.vars[variable] = new_value
if(method)
- if(istype(O, /mob))
+ if(ismob(O))
for(var/mob/M in mob_list)
if ( istype(M , O.type) )
if(variable=="luminosity")
@@ -331,7 +331,7 @@
A.vars[variable] = O.vars[variable]
CHECK_TICK
- else if(istype(O, /turf))
+ else if(isturf(O))
for(var/turf/A in world)
if ( istype(A , O.type) )
if(variable=="luminosity")
@@ -341,7 +341,7 @@
CHECK_TICK
else
- if(istype(O, /mob))
+ if(ismob(O))
for(var/mob/M in mob_list)
if (M.type == O.type)
if(variable=="luminosity")
@@ -359,7 +359,7 @@
A.vars[variable] = O.vars[variable]
CHECK_TICK
- else if(istype(O, /turf))
+ else if(isturf(O))
for(var/turf/A in world)
if (A.type == O.type)
if(variable=="luminosity")
@@ -374,7 +374,7 @@
if(new_value == null) return
O.vars[variable] = new_value
if(method)
- if(istype(O, /mob))
+ if(ismob(O))
for(var/mob/M in mob_list)
if ( istype(M , O.type) )
M.vars[variable] = O.vars[variable]
@@ -386,14 +386,14 @@
A.vars[variable] = O.vars[variable]
CHECK_TICK
- else if(istype(O, /turf))
+ else if(isturf(O))
for(var/turf/A in world)
if ( istype(A , O.type) )
A.vars[variable] = O.vars[variable]
CHECK_TICK
else
- if(istype(O, /mob))
+ if(ismob(O))
for(var/mob/M in mob_list)
if (M.type == O.type)
M.vars[variable] = O.vars[variable]
@@ -405,7 +405,7 @@
A.vars[variable] = O.vars[variable]
CHECK_TICK
- else if(istype(O, /turf))
+ else if(isturf(O))
for(var/turf/A in world)
if (A.type == O.type)
A.vars[variable] = O.vars[variable]
@@ -417,25 +417,25 @@
O.vars[variable] = new_value
if(method)
- if(istype(O, /mob))
+ if(ismob(O))
for(var/mob/M in mob_list)
if ( istype(M , O.type) )
M.vars[variable] = O.vars[variable]
CHECK_TICK
- else if(isobj(O.type))
+ else if(isobj(O))
for(var/obj/A in world)
if ( istype(A , O.type) )
A.vars[variable] = O.vars[variable]
CHECK_TICK
- else if(istype(O.type, /turf))
+ else if(isturf(O))
for(var/turf/A in world)
if ( istype(A , O.type) )
A.vars[variable] = O.vars[variable]
CHECK_TICK
else
- if(istype(O, /mob))
+ if(ismob(O))
for(var/mob/M in mob_list)
if (M.type == O.type)
M.vars[variable] = O.vars[variable]
@@ -447,7 +447,7 @@
A.vars[variable] = O.vars[variable]
CHECK_TICK
- else if(istype(O, /turf))
+ else if(isturf(O))
for(var/turf/A in world)
if (A.type == O.type)
A.vars[variable] = O.vars[variable]
@@ -458,7 +458,7 @@
if(new_value == null) return
O.vars[variable] = new_value
if(method)
- if(istype(O, /mob))
+ if(ismob(O))
for(var/mob/M in mob_list)
if ( istype(M , O.type) )
M.vars[variable] = O.vars[variable]
@@ -470,14 +470,14 @@
A.vars[variable] = O.vars[variable]
CHECK_TICK
- else if(istype(O, /turf))
+ else if(isturf(O))
for(var/turf/A in world)
if ( istype(A , O.type) )
A.vars[variable] = O.vars[variable]
CHECK_TICK
else
- if(istype(O, /mob))
+ if(ismob(O))
for(var/mob/M in mob_list)
if (M.type == O.type)
M.vars[variable] = O.vars[variable]
@@ -489,7 +489,7 @@
A.vars[variable] = O.vars[variable]
CHECK_TICK
- else if(istype(O, /turf))
+ else if(isturf(O))
for(var/turf/A in world)
if (A.type == O.type)
A.vars[variable] = O.vars[variable]
diff --git a/code/modules/atmospherics/environmental/LINDA_fire.dm b/code/modules/atmospherics/environmental/LINDA_fire.dm
index 326ff220334c..fff0ba663143 100644
--- a/code/modules/atmospherics/environmental/LINDA_fire.dm
+++ b/code/modules/atmospherics/environmental/LINDA_fire.dm
@@ -150,7 +150,7 @@
SetLuminosity(0)
SSair.hotspots -= src
DestroyTurf()
- if(istype(loc, /turf))
+ if(isturf(loc))
var/turf/open/T = loc
if(T.active_hotspot == src)
T.active_hotspot = null
@@ -159,8 +159,7 @@
return QDEL_HINT_PUTINPOOL
/obj/effect/hotspot/proc/DestroyTurf()
-
- if(istype(loc, /turf))
+ if(isturf(loc))
var/turf/T = loc
if(T.to_be_destroyed)
var/chance_of_deletion
diff --git a/code/modules/atmospherics/environmental/LINDA_system.dm b/code/modules/atmospherics/environmental/LINDA_system.dm
index 30d359d4f403..73c2c7bc4b81 100644
--- a/code/modules/atmospherics/environmental/LINDA_system.dm
+++ b/code/modules/atmospherics/environmental/LINDA_system.dm
@@ -92,7 +92,7 @@
return adjacent_turfs
/atom/proc/air_update_turf(command = 0)
- if(!istype(loc,/turf) && command)
+ if(!isturf(loc) && command)
return
var/turf/T = get_turf(loc)
T.air_update_turf(command)
@@ -103,7 +103,7 @@
SSair.add_to_active(src,command)
/atom/movable/proc/move_update_air(turf/T)
- if(istype(T,/turf))
+ if(isturf(T))
T.air_update_turf(1)
air_update_turf(1)
diff --git a/code/modules/atmospherics/machinery/other/zvent.dm b/code/modules/atmospherics/machinery/other/zvent.dm
index fa1919818327..0df9d17410e3 100644
--- a/code/modules/atmospherics/machinery/other/zvent.dm
+++ b/code/modules/atmospherics/machinery/other/zvent.dm
@@ -20,7 +20,7 @@
/obj/machinery/zvent/process_atmos()
//all this object does, is make its turf share air with the ones above and below it, if they have a vent too.
- if (istype(loc,/turf)) //if we're not on a valid turf, forget it
+ if(isturf(loc)) //if we're not on a valid turf, forget it
for (var/new_z in list(-1,1)) //change this list if a fancier system of z-levels gets implemented
var/turf/open/zturf_conn = locate(x,y,z+new_z)
if (istype(zturf_conn))
diff --git a/code/modules/atmospherics/machinery/pipes/pipes.dm b/code/modules/atmospherics/machinery/pipes/pipes.dm
index 6401feaf4548..32803711f95b 100644
--- a/code/modules/atmospherics/machinery/pipes/pipes.dm
+++ b/code/modules/atmospherics/machinery/pipes/pipes.dm
@@ -38,7 +38,7 @@
..()
/obj/machinery/atmospherics/pipe/hide(i)
- if(level == 1 && istype(loc, /turf))
+ if(level == 1 && isturf(loc))
invisibility = i ? INVISIBILITY_MAXIMUM : 0
update_icon()
@@ -102,4 +102,4 @@
/obj/machinery/atmospherics/pipe/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir)
if(damage_flag == "melee" && damage_amount < 12)
return 0
- . = ..()
\ No newline at end of file
+ . = ..()
diff --git a/code/modules/clothing/head/misc_special.dm b/code/modules/clothing/head/misc_special.dm
index 94ca9b8ed5fa..509120945f49 100644
--- a/code/modules/clothing/head/misc_special.dm
+++ b/code/modules/clothing/head/misc_special.dm
@@ -63,7 +63,7 @@
if(M.is_holding(src) || M.head == src)
location = M.loc
- if (istype(location, /turf))
+ if(isturf(location))
location.hotspot_expose(700, 1)
/obj/item/clothing/head/hardhat/cakehat/turn_on()
diff --git a/code/modules/crafting/craft.dm b/code/modules/crafting/craft.dm
index 1e1ed209bf09..7def4aa1922f 100644
--- a/code/modules/crafting/craft.dm
+++ b/code/modules/crafting/craft.dm
@@ -62,7 +62,7 @@
. = list()
for(var/obj/item/I in user.held_items)
. += I
- if(!istype(user.loc, /turf))
+ if(!isturf(user.loc))
return
var/list/L = block(get_step(user, SOUTHWEST), get_step(user, NORTHEAST))
for(var/A in L)
diff --git a/code/modules/mining/equipment.dm b/code/modules/mining/equipment.dm
index 276d4d288696..c60ebd6c5360 100644
--- a/code/modules/mining/equipment.dm
+++ b/code/modules/mining/equipment.dm
@@ -531,7 +531,7 @@
/obj/item/weapon/twohanded/required/mining_hammer/afterattack(atom/target, mob/user, proximity_flag)
if(!proximity_flag && charged)//Mark a target, or mine a tile.
var/turf/proj_turf = get_turf(src)
- if(!istype(proj_turf, /turf))
+ if(!isturf(proj_turf))
return
var/datum/gas_mixture/environment = proj_turf.return_air()
var/pressure = environment.return_pressure()
diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm
index 2f775ea56e48..a3199707bd5d 100644
--- a/code/modules/mining/mine_turfs.dm
+++ b/code/modules/mining/mine_turfs.dm
@@ -394,7 +394,7 @@
if (istype(P, /obj/item/weapon/pickaxe))
var/turf/T = user.loc
- if (!( istype(T, /turf) ))
+ if (!isturf(T))
return
if(last_act+P.digspeed > world.time)//prevents message spam
@@ -553,7 +553,7 @@
digging_speed = P.digspeed
if (digging_speed)
var/turf/T = user.loc
- if (!( istype(T, /turf) ))
+ if(!isturf(T))
return
if (dug)
diff --git a/code/modules/mob/living/carbon/alien/alien_defense.dm b/code/modules/mob/living/carbon/alien/alien_defense.dm
index c78e574b2e91..2a84bfafb039 100644
--- a/code/modules/mob/living/carbon/alien/alien_defense.dm
+++ b/code/modules/mob/living/carbon/alien/alien_defense.dm
@@ -18,7 +18,7 @@ In all, this is a lot like the monkey code. /N
M << "You cannot attack people before the game has started."
return
- if (istype(loc, /turf) && istype(loc.loc, /area/start))
+ if(isturf(loc) && istype(loc.loc, /area/start))
M << "No attacking people at spawn, you jackass."
return
@@ -125,4 +125,4 @@ In all, this is a lot like the monkey code. /N
return 0
/mob/living/carbon/alien/acid_act(acidpwr, acid_volume)
- return 0//aliens are immune to acid.
\ No newline at end of file
+ return 0//aliens are immune to acid.
diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm
index 57ed24392270..27d465da4cea 100644
--- a/code/modules/mob/living/living_defense.dm
+++ b/code/modules/mob/living/living_defense.dm
@@ -208,7 +208,7 @@
M << "You cannot attack people before the game has started."
return 0
- if (istype(loc, /turf) && istype(loc.loc, /area/start))
+ if(isturf(loc) && istype(loc.loc, /area/start))
M << "No attacking people at spawn, you jackass."
return 0
@@ -252,7 +252,7 @@
M << "You cannot attack people before the game has started."
return 0
- if (istype(loc, /turf) && istype(loc.loc, /area/start))
+ if(isturf(loc) && istype(loc.loc, /area/start))
M << "No attacking people at spawn, you jackass."
return 0
diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm
index d778554cc8d9..8e3fc4a8fff2 100644
--- a/code/modules/mob/living/silicon/ai/ai.dm
+++ b/code/modules/mob/living/silicon/ai/ai.dm
@@ -110,7 +110,7 @@ var/list/ai_list = list()
radio = new /obj/item/device/radio/headset/ai(src)
aicamera = new/obj/item/device/camera/siliconcam/ai_camera(src)
- if (istype(loc, /turf))
+ if(isturf(loc))
verbs.Add(/mob/living/silicon/ai/proc/ai_network_change, \
/mob/living/silicon/ai/proc/ai_statuschange, /mob/living/silicon/ai/proc/ai_hologram_change, \
/mob/living/silicon/ai/proc/toggle_camera_light, /mob/living/silicon/ai/proc/botcall,\
diff --git a/code/modules/mob/living/silicon/pai/software.dm b/code/modules/mob/living/silicon/pai/software.dm
index d975d7706000..9b6704bfcf99 100644
--- a/code/modules/mob/living/silicon/pai/software.dm
+++ b/code/modules/mob/living/silicon/pai/software.dm
@@ -499,7 +499,7 @@
var/mob/living/M = card.loc
if(!isliving(M))
while(!isliving(M))
- if(istype(M, /turf))
+ if(isturf(M))
src.temp = "Error: No biological host found. "
src.subscreen = 0
return dat
diff --git a/code/modules/mob/living/simple_animal/bot/ed209bot.dm b/code/modules/mob/living/simple_animal/bot/ed209bot.dm
index 5cceafbcfaad..7d38d0c77920 100644
--- a/code/modules/mob/living/simple_animal/bot/ed209bot.dm
+++ b/code/modules/mob/living/simple_animal/bot/ed209bot.dm
@@ -418,19 +418,15 @@ Auto Patrol[]"},
return
lastfired = world.time
var/turf/T = loc
- var/atom/U = (istype(target, /atom/movable) ? target.loc : target)
- if((!( U ) || !( T )))
+ var/turf/U = get_turf(target)
+ if(!U)
return
- while(!(istype(U, /turf)))
- U = U.loc
- if(!(istype(T, /turf)))
+ if(!isturf(T))
return
if(!projectile)
return
- if(!(istype(U, /turf)))
- return
var/obj/item/projectile/A = new projectile (loc)
playsound(loc, shoot_sound, 50, 1)
A.current = U
diff --git a/code/modules/mob/living/simple_animal/bot/floorbot.dm b/code/modules/mob/living/simple_animal/bot/floorbot.dm
index 7fe09e215331..237e29b51455 100644
--- a/code/modules/mob/living/simple_animal/bot/floorbot.dm
+++ b/code/modules/mob/living/simple_animal/bot/floorbot.dm
@@ -225,7 +225,7 @@
if(target)
if(path.len == 0)
- if(!istype(target, /turf/))
+ if(!isturf(target))
var/turf/TL = get_turf(target)
path = get_path_to(src, TL, /turf/proc/Distance_cardinal, 0, 30, id=access_card,simulated_only = 0)
else
@@ -248,7 +248,7 @@
target = null
path = list()
return
- if(istype(target, /turf/) && emagged < 2)
+ if(isturf(target) && emagged < 2)
repair(target)
else if(emagged == 2 && isfloorturf(target))
var/turf/open/floor/F = target
diff --git a/code/modules/mob/living/simple_animal/bot/mulebot.dm b/code/modules/mob/living/simple_animal/bot/mulebot.dm
index 5ec565852e50..4c11c6d04d38 100644
--- a/code/modules/mob/living/simple_animal/bot/mulebot.dm
+++ b/code/modules/mob/living/simple_animal/bot/mulebot.dm
@@ -474,7 +474,7 @@ var/global/mulebot_count = 0
if(next == loc)
path -= next
return
- if(istype( next, /turf))
+ if(isturf(next))
//world << "at ([x],[y]) moving to ([next.x],[next.y])"
if(bloodiness)
diff --git a/code/modules/mob/living/simple_animal/hostile/giant_spider.dm b/code/modules/mob/living/simple_animal/hostile/giant_spider.dm
index bf85dfce9ce1..52285f23a685 100644
--- a/code/modules/mob/living/simple_animal/hostile/giant_spider.dm
+++ b/code/modules/mob/living/simple_animal/hostile/giant_spider.dm
@@ -214,7 +214,7 @@
walk(src,0)
if(do_after(src, 50, target = src))
if(busy == SPINNING_COCOON)
- if(cocoon_target && istype(cocoon_target.loc, /turf) && get_dist(src,cocoon_target) <= 1)
+ if(cocoon_target && isturf(cocoon_target.loc) && get_dist(src,cocoon_target) <= 1)
var/obj/structure/spider/cocoon/C = new(cocoon_target.loc)
var/large_cocoon = 0
C.pixel_x = cocoon_target.pixel_x
diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm
index ee3f2d016b69..b7ab39772edd 100644
--- a/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm
+++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm
@@ -459,7 +459,7 @@
/mob/living/simple_animal/hostile/asteroid/goliath/OpenFire()
var/tturf = get_turf(target)
- if(!(istype(tturf, /turf)))
+ if(!isturf(tturf))
return
if(get_dist(src, target) <= 7)//Screen range check, so you can't get tentacle'd offscreen
visible_message("The [src.name] digs its tentacles under [target.name]!")
diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm
index 941c423c43c1..8988e119ca2d 100644
--- a/code/modules/power/cable.dm
+++ b/code/modules/power/cable.dm
@@ -116,7 +116,7 @@ By design, d1 is the smallest direction and d2 is the highest
//If underfloor, hide the cable
/obj/structure/cable/hide(i)
- if(level == 1 && istype(loc, /turf))
+ if(level == 1 && isturf(loc))
invisibility = i ? INVISIBILITY_MAXIMUM : 0
updateicon()
diff --git a/code/modules/power/terminal.dm b/code/modules/power/terminal.dm
index f3fcb43585bd..68aa71916834 100644
--- a/code/modules/power/terminal.dm
+++ b/code/modules/power/terminal.dm
@@ -48,7 +48,7 @@
/obj/machinery/power/terminal/proc/dismantle(mob/living/user)
- if(istype(loc, /turf))
+ if(isturf(loc))
var/turf/T = loc
if(T.intact)
user << "You must first expose the power terminal!"
diff --git a/code/modules/projectiles/guns/energy/kinetic_accelerator.dm b/code/modules/projectiles/guns/energy/kinetic_accelerator.dm
index bf4a0dc30913..16c1d39d0164 100644
--- a/code/modules/projectiles/guns/energy/kinetic_accelerator.dm
+++ b/code/modules/projectiles/guns/energy/kinetic_accelerator.dm
@@ -147,7 +147,7 @@
KA.modify_projectile(BB)
var/turf/proj_turf = get_turf(BB)
- if(!istype(proj_turf, /turf))
+ if(!isturf(proj_turf))
return
var/datum/gas_mixture/environment = proj_turf.return_air()
var/pressure = environment.return_pressure()
diff --git a/code/modules/projectiles/projectile/beams.dm b/code/modules/projectiles/projectile/beams.dm
index 28902c019dc4..81c5bb9ddc1d 100644
--- a/code/modules/projectiles/projectile/beams.dm
+++ b/code/modules/projectiles/projectile/beams.dm
@@ -66,7 +66,7 @@
/obj/item/projectile/beam/pulse/on_hit(atom/target, blocked = 0)
. = ..()
- if(istype(target,/turf/)||istype(target,/obj/structure/))
+ if(isturf(target) || istype(target,/obj/structure/))
target.ex_act(2)
/obj/item/projectile/beam/pulse/shot
diff --git a/code/modules/projectiles/projectile/special.dm b/code/modules/projectiles/projectile/special.dm
index e9aa3a99e7f7..81e7bd0476f7 100644
--- a/code/modules/projectiles/projectile/special.dm
+++ b/code/modules/projectiles/projectile/special.dm
@@ -171,7 +171,7 @@
/obj/item/projectile/plasma/New()
var/turf/proj_turf = get_turf(src)
- if(!istype(proj_turf, /turf))
+ if(!isturf(proj_turf))
return
var/datum/gas_mixture/environment = proj_turf.return_air()
if(environment)
diff --git a/code/modules/reagents/chem_splash.dm b/code/modules/reagents/chem_splash.dm
index b32e9da17535..b99a7ced9c56 100644
--- a/code/modules/reagents/chem_splash.dm
+++ b/code/modules/reagents/chem_splash.dm
@@ -6,7 +6,7 @@
proc/chem_splash(turf/epicenter, affected_range = 3, list/datum/reagents/reactants = list(), extra_heat = 0, threatscale = 1, adminlog = 1)
- if(!istype(epicenter, /turf) || !reactants.len || threatscale <= 0)
+ if(!isturf(epicenter) || !reactants.len || threatscale <= 0)
return
var/has_reagents
var/total_reagents
diff --git a/code/modules/recycling/disposal-unit.dm b/code/modules/recycling/disposal-unit.dm
index bdcfe8fbae3a..fd9f6866d583 100644
--- a/code/modules/recycling/disposal-unit.dm
+++ b/code/modules/recycling/disposal-unit.dm
@@ -121,7 +121,7 @@
/obj/machinery/disposal/proc/stuff_mob_in(mob/living/target, mob/living/user)
if(!iscarbon(user) && !user.ventcrawler) //only carbon and ventcrawlers can climb into disposal by themselves.
return
- if(!istype(user.loc, /turf/)) //No magically doing it from inside closets
+ if(!isturf(user.loc)) //No magically doing it from inside closets
return
if(target.buckled || target.has_buckled_mobs())
return
diff --git a/code/modules/spells/spell.dm b/code/modules/spells/spell.dm
index 45e6d700cb4c..c4f20f931b9c 100644
--- a/code/modules/spells/spell.dm
+++ b/code/modules/spells/spell.dm
@@ -251,7 +251,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
var/location
if(isliving(target))
location = target.loc
- else if(istype(target,/turf))
+ else if(isturf(target))
location = target
var/obj/effect/overlay/spell = new /obj/effect/overlay(location)
spell.icon = overlay_icon
@@ -265,7 +265,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
var/location
if(isliving(target))
location = target.loc
- else if(istype(target,/turf))
+ else if(isturf(target))
location = target
if(isliving(target) && message)
target << text("[message]")
|