From bdcb16113aa9d85c99f4ab007de802dfa9e67e1c Mon Sep 17 00:00:00 2001 From: Joan Lung Date: Sat, 1 Oct 2016 13:25:46 -0400 Subject: [PATCH] Adds a few turf istype helpers (#20754) * a very calming act when the world is too much, too fast * i'm tired but i have to be efficient, infinite * lick your lips at the sight of me a fantasy made reality --- code/__DEFINES/is_helpers.dm | 117 ++++++++++-------- code/__HELPERS/icon_smoothing.dm | 2 +- code/_onclick/hud/ai.dm | 4 +- code/_onclick/hud/robot.dm | 4 +- code/controllers/subsystem/minimap.dm | 2 +- code/controllers/subsystem/persistence.dm | 4 +- code/controllers/subsystem/shuttles.dm | 2 +- code/datums/antagonists/datum_clockcult.dm | 8 +- code/datums/helper_datums/teleport.dm | 2 +- code/datums/martial.dm | 2 +- code/game/area/areas.dm | 2 +- code/game/atoms.dm | 2 +- code/game/gamemodes/blob/blob_report.dm | 4 +- code/game/gamemodes/blob/overmind.dm | 2 +- code/game/gamemodes/blob/powers.dm | 2 +- code/game/gamemodes/blob/theblob.dm | 4 +- .../gamemodes/clock_cult/clock_scripture.dm | 2 +- .../gamemodes/clock_cult/clock_structures.dm | 4 +- code/game/gamemodes/cult/ritual.dm | 2 +- code/game/gamemodes/cult/runes.dm | 6 +- code/game/gamemodes/gang/recaller.dm | 2 +- .../gamemodes/malfunction/Malf_Modules.dm | 2 +- code/game/gamemodes/meteor/meteors.dm | 8 +- .../miniantags/abduction/abduction_gear.dm | 2 +- .../gamemodes/miniantags/bot_swarm/swarmer.dm | 6 +- .../gamemodes/miniantags/revenant/revenant.dm | 2 +- .../miniantags/revenant/revenant_abilities.dm | 2 +- code/game/machinery/camera/tracking.dm | 2 +- code/game/machinery/computer/camera.dm | 4 +- code/game/machinery/computer/crew.dm | 2 +- code/game/machinery/computer/law.dm | 2 +- code/game/machinery/computer/prisoner.dm | 2 +- code/game/machinery/doors/poddoor.dm | 2 +- code/game/machinery/machinery.dm | 2 +- code/game/machinery/shieldgen.dm | 2 +- code/game/machinery/syndicatebomb.dm | 2 +- .../telecomms/machine_interactions.dm | 2 +- code/game/machinery/transformer.dm | 4 +- .../mecha/equipment/tools/mining_tools.dm | 2 +- code/game/mecha/equipment/tools/work_tools.dm | 12 +- code/game/objects/effects/alien_acid.dm | 6 +- code/game/objects/effects/contraband.dm | 2 +- .../effects/effect_system/effects_smoke.dm | 2 +- code/game/objects/explosion.dm | 2 +- code/game/objects/items.dm | 2 +- code/game/objects/items/apc_frame.dm | 4 +- code/game/objects/items/crayons.dm | 2 +- .../objects/items/devices/chameleonproj.dm | 2 +- .../objects/items/devices/laserpointer.dm | 2 +- .../game/objects/items/devices/radio/radio.dm | 2 +- code/game/objects/items/robot/robot_items.dm | 12 +- code/game/objects/items/stacks/stack.dm | 8 +- code/game/objects/items/weapons/RCD.dm | 20 +-- code/game/objects/items/weapons/RSF.dm | 14 +-- .../objects/items/weapons/airlock_painter.dm | 2 +- code/game/objects/items/weapons/defib.dm | 2 +- .../objects/items/weapons/extinguisher.dm | 2 +- .../items/weapons/grenades/syndieminibomb.dm | 40 +++--- code/game/objects/items/weapons/handcuffs.dm | 2 +- .../objects/items/weapons/holosign_creator.dm | 2 +- code/game/objects/items/weapons/melee/misc.dm | 6 +- code/game/objects/items/weapons/mop.dm | 2 +- code/game/objects/items/weapons/paint.dm | 2 +- .../objects/items/weapons/storage/backpack.dm | 2 +- .../objects/items/weapons/storage/book.dm | 2 +- .../objects/items/weapons/storage/storage.dm | 2 +- code/game/objects/items/weapons/stunbaton.dm | 4 +- code/game/objects/items/weapons/twohanded.dm | 6 +- code/game/objects/structures.dm | 2 +- code/game/objects/structures/aliens.dm | 6 +- code/game/objects/structures/extinguisher.dm | 4 +- code/game/objects/structures/false_walls.dm | 2 +- code/game/objects/structures/fireaxe.dm | 2 +- code/game/objects/structures/girders.dm | 6 +- code/game/objects/structures/guncase.dm | 4 +- code/game/objects/structures/mineral_doors.dm | 2 +- code/game/objects/structures/statues.dm | 2 +- .../transit_tubes/transit_tube_pod.dm | 2 +- code/game/objects/structures/watercloset.dm | 2 +- code/game/turfs/open.dm | 2 +- code/game/turfs/simulated/floor.dm | 6 +- code/game/turfs/simulated/river.dm | 6 +- code/game/turfs/simulated/walls.dm | 6 +- code/game/turfs/space/space.dm | 2 +- code/modules/admin/admin.dm | 2 +- code/modules/admin/player_panel.dm | 2 +- code/modules/admin/topic.dm | 4 +- code/modules/admin/verbs/buildmode.dm | 10 +- code/modules/admin/verbs/diagnostics.dm | 2 +- .../atmospherics/machinery/datum_pipeline.dm | 2 +- code/modules/events/wizard/curseditems.dm | 2 +- code/modules/food_and_drinks/drinks/drinks.dm | 2 +- code/modules/holiday/easter.dm | 2 +- code/modules/holodeck/area_copy.dm | 2 +- code/modules/holodeck/computer.dm | 2 +- code/modules/hydroponics/gene_modder.dm | 2 +- code/modules/hydroponics/grown/kudzu.dm | 2 +- code/modules/hydroponics/grown/mushrooms.dm | 4 +- code/modules/hydroponics/grown/tomato.dm | 2 +- code/modules/hydroponics/grown/towercap.dm | 2 +- code/modules/mining/equipment.dm | 4 +- .../mining/lavaland/necropolis_chests.dm | 2 +- code/modules/mining/mine_turfs.dm | 8 +- code/modules/mob/living/brain/MMI.dm | 2 +- .../carbon/alien/humanoid/alien_powers.dm | 2 +- code/modules/mob/living/living.dm | 4 +- code/modules/mob/living/silicon/ai/life.dm | 8 +- .../mob/living/simple_animal/bot/cleanbot.dm | 2 +- .../mob/living/simple_animal/bot/floorbot.dm | 14 +-- .../mob/living/simple_animal/friendly/dog.dm | 4 +- .../simple_animal/guardian/types/support.dm | 2 +- .../mob/living/simple_animal/hostile/alien.dm | 4 +- .../living/simple_animal/hostile/hostile.dm | 2 +- .../hostile/megafauna/colossus.dm | 6 +- .../hostile/megafauna/hierophant.dm | 2 +- .../mob/living/simple_animal/hostile/mimic.dm | 2 +- .../simple_animal/hostile/mining_mobs.dm | 4 +- .../mob/living/simple_animal/hostile/tree.dm | 2 +- .../mob/living/simple_animal/parrot.dm | 2 +- .../mob/living/simple_animal/simple_animal.dm | 2 +- code/modules/mob/mob_helpers.dm | 4 +- code/modules/mob/mob_movement.dm | 4 +- code/modules/mob/new_player/new_player.dm | 2 +- code/modules/paperwork/handlabeler.dm | 2 +- code/modules/paperwork/photography.dm | 2 +- code/modules/power/power.dm | 2 +- code/modules/power/supermatter/supermatter.dm | 4 +- .../procedural_mapping/mapGeneratorModule.dm | 2 +- code/modules/projectiles/guns/energy.dm | 2 +- .../guns/energy/kinetic_accelerator.dm | 4 +- code/modules/projectiles/projectile/magic.dm | 2 +- .../modules/projectiles/projectile/special.dm | 2 +- .../chemistry/reagents/drug_reagents.dm | 2 +- .../chemistry/reagents/food_reagents.dm | 4 +- .../chemistry/reagents/other_reagents.dm | 12 +- .../reagents/pyrotechnic_reagents.dm | 8 +- .../reagents/reagent_containers/borghydro.dm | 4 +- .../reagents/reagent_containers/hypospray.dm | 2 +- code/modules/recycling/conveyor2.dm | 4 +- .../recycling/disposal-construction.dm | 4 +- code/modules/recycling/disposal-structures.dm | 6 +- code/modules/shuttle/shuttle.dm | 2 +- code/modules/station_goals/bsa.dm | 2 +- code/modules/station_goals/shield.dm | 2 +- code/modules/surgery/surgery_step.dm | 4 +- 145 files changed, 337 insertions(+), 326 deletions(-) diff --git a/code/__DEFINES/is_helpers.dm b/code/__DEFINES/is_helpers.dm index ad3d3d6027bb..d96df8be1713 100644 --- a/code/__DEFINES/is_helpers.dm +++ b/code/__DEFINES/is_helpers.dm @@ -4,13 +4,32 @@ #define in_range(source, user) (get_dist(source, user) <= 1) -#define is_cleanable(A) (istype(A, /obj/effect/decal/cleanable) || istype(A, /obj/effect/rune)) //if something is cleanable +#define ismovableatom(A) (istype(A, /atom/movable)) -// MOB HELPERS +//Turfs +#define isopenturf(A) (istype(A, /turf/open)) + +#define isspaceturf(A) (istype(A, /turf/open/space)) + +#define isfloorturf(A) (istype(A, /turf/open/floor)) + +#define isclosedturf(A) (istype(A, /turf/closed)) + +#define iswallturf(A) (istype(A, /turf/closed/wall)) + +#define ismineralturf(A) (istype(A, /turf/closed/mineral)) + +//Mobs +#define isliving(A) (istype(A, /mob/living)) + +#define isbrain(A) (istype(A, /mob/living/brain)) + +//Carbon mobs +#define iscarbon(A) (istype(A, /mob/living/carbon)) #define ishuman(A) (istype(A, /mob/living/carbon/human)) -// Human sub-species +//Human sub-species #define isabductor(A) (is_species(A, /datum/species/abductor)) #define isgolem(A) (is_species(A, /datum/species/golem)) #define islizard(A) (is_species(A, /datum/species/lizard)) @@ -22,80 +41,78 @@ #define iszombie(A) (is_species(A, /datum/species/zombie)) #define ishumanbasic(A) (is_species(A, /datum/species/human)) +//more carbon mobs #define ismonkey(A) (istype(A, /mob/living/carbon/monkey)) -#define isbrain(A) (istype(A, /mob/living/brain)) - #define isalien(A) (istype(A, /mob/living/carbon/alien)) -#define isalienadult(A) (istype(A, /mob/living/carbon/alien/humanoid)) - #define islarva(A) (istype(A, /mob/living/carbon/alien/larva)) -#define isslime(A) (istype(A, /mob/living/simple_animal/slime)) +#define isalienadult(A) (istype(A, /mob/living/carbon/alien/humanoid)) -#define isrobot(A) (istype(A, /mob/living/silicon/robot)) +//Silicon mobs +#define issilicon(A) (istype(A, /mob/living/silicon)) -#define isanimal(A) (istype(A, /mob/living/simple_animal)) - -#define iscorgi(A) (istype(A, /mob/living/simple_animal/pet/dog/corgi)) - -#define iscrab(A) (istype(A, /mob/living/simple_animal/crab)) - -#define iscat(A) (istype(A, /mob/living/simple_animal/pet/cat)) - -#define ismouse(A) (istype(A, /mob/living/simple_animal/mouse)) - -#define isconstruct(A) (istype(A, /mob/living/simple_animal/hostile/construct)) - -#define isclockmob(A) (istype(A, /mob/living/simple_animal/hostile/clockwork)) - -#define ismegafauna(A) (istype(A, /mob/living/simple_animal/hostile/megafauna)) - -#define isshade(A) (istype(A, /mob/living/simple_animal/shade)) - -#define isbear(A) (istype(A, /mob/living/simple_animal/hostile/bear)) - -#define iscarp(A) (istype(A, /mob/living/simple_animal/hostile/carp)) - -#define isclown(A) (istype(A, /mob/living/simple_animal/hostile/retaliate/clown)) +#define iscyborg(A) (istype(A, /mob/living/silicon/robot)) #define isAI(A) (istype(A, /mob/living/silicon/ai)) #define ispAI(A) (istype(A, /mob/living/silicon/pai)) -#define iscarbon(A) (istype(A, /mob/living/carbon)) +//Simple animals +#define isanimal(A) (istype(A, /mob/living/simple_animal)) -#define issilicon(A) (istype(A, /mob/living/silicon)) +#define isbot(A) (istype(A, /mob/living/simple_animal/bot)) -#define iscyborg(A) (istype(A, /mob/living/silicon/robot)) +#define iscrab(A) (istype(A, /mob/living/simple_animal/crab)) -#define isliving(A) (istype(A, /mob/living)) +#define isshade(A) (istype(A, /mob/living/simple_animal/shade)) +#define ismouse(A) (istype(A, /mob/living/simple_animal/mouse)) + +#define isslime(A) (istype(A, /mob/living/simple_animal/slime)) + +#define isdrone(A) (istype(A, /mob/living/simple_animal/drone)) + +#define iscat(A) (istype(A, /mob/living/simple_animal/pet/cat)) + +#define isdog(A) (istype(A, /mob/living/simple_animal/pet/dog)) + +#define iscorgi(A) (istype(A, /mob/living/simple_animal/pet/dog/corgi)) + +#define ishostile(A) (istype(A, /mob/living/simple_animal/hostile)) + +#define isbear(A) (istype(A, /mob/living/simple_animal/hostile/bear)) + +#define iscarp(A) (istype(A, /mob/living/simple_animal/hostile/carp)) + +#define isswarmer(A) (istype(A, /mob/living/simple_animal/hostile/swarmer)) + +#define isguardian(A) (istype(A, /mob/living/simple_animal/hostile/guardian)) + +#define isclockmob(A) (istype(A, /mob/living/simple_animal/hostile/clockwork)) + +#define isconstruct(A) (istype(A, /mob/living/simple_animal/hostile/construct)) + +#define ismegafauna(A) (istype(A, /mob/living/simple_animal/hostile/megafauna)) + +#define isclown(A) (istype(A, /mob/living/simple_animal/hostile/retaliate/clown)) + +//Misc mobs #define isobserver(A) (istype(A, /mob/dead/observer)) #define isnewplayer(A) (istype(A, /mob/new_player)) #define isovermind(A) (istype(A, /mob/camera/blob)) -#define isdrone(A) (istype(A, /mob/living/simple_animal/drone)) - -#define isswarmer(A) (istype(A, /mob/living/simple_animal/hostile/swarmer)) - -#define isguardian(A) (istype(A, /mob/living/simple_animal/hostile/guardian)) - -#define ishostile(A) (istype(A, /mob/living/simple_animal/hostile)) +//Objects +#define isobj(A) istype(A, /obj) //override the byond proc because it returns true on children of /atom/movable that aren't objs #define islimb(A) (istype(A, /obj/item/bodypart)) -#define isbot(A) (istype(A, /mob/living/simple_animal/bot)) - -#define ismovableatom(A) (istype(A, /atom/movable)) - -#define isobj(A) istype(A, /obj) //override the byond proc because it returns true on children of /atom/movable that aren't objs - -// ASSEMBLY HELPERS +#define is_cleanable(A) (istype(A, /obj/effect/decal/cleanable) || istype(A, /obj/effect/rune)) //if something is cleanable +//Assemblies #define isassembly(O) (istype(O, /obj/item/device/assembly)) #define isigniter(O) (istype(O, /obj/item/device/assembly/igniter)) diff --git a/code/__HELPERS/icon_smoothing.dm b/code/__HELPERS/icon_smoothing.dm index 22b6e15808e0..2f7876809346 100644 --- a/code/__HELPERS/icon_smoothing.dm +++ b/code/__HELPERS/icon_smoothing.dm @@ -166,7 +166,7 @@ if(T && (T.density || T.smooth)) T = get_step(src, turn(adjacencies, 225)) - if(istype(T, /turf/open/space) && !istype(T, /turf/open/space/transit)) + if(isspaceturf(T) && !istype(T, /turf/open/space/transit)) underlays += image('icons/turf/space.dmi', SPACE_ICON_STATE, layer=TURF_LAYER) else if(T && !T.density && !T.smooth) underlays += T diff --git a/code/_onclick/hud/ai.dm b/code/_onclick/hud/ai.dm index 8ec7d0c38438..901c4b144610 100644 --- a/code/_onclick/hud/ai.dm +++ b/code/_onclick/hud/ai.dm @@ -133,7 +133,7 @@ if(isAI(usr)) var/mob/living/silicon/ai/AI = usr AI.aicamera.toggle_camera_mode() - else if(isrobot(usr)) + else if(iscyborg(usr)) var/mob/living/silicon/robot/R = usr R.aicamera.toggle_camera_mode() @@ -145,7 +145,7 @@ if(isAI(usr)) var/mob/living/silicon/ai/AI = usr AI.aicamera.viewpictures() - else if(isrobot(usr)) + else if(iscyborg(usr)) var/mob/living/silicon/robot/R = usr R.aicamera.viewpictures() diff --git a/code/_onclick/hud/robot.dm b/code/_onclick/hud/robot.dm index 0e8129962ecc..93292a2ee4a8 100644 --- a/code/_onclick/hud/robot.dm +++ b/code/_onclick/hud/robot.dm @@ -179,7 +179,7 @@ /datum/hud/proc/toggle_show_robot_modules() - if(!isrobot(mymob)) return + if(!iscyborg(mymob)) return var/mob/living/silicon/robot/R = mymob @@ -187,7 +187,7 @@ update_robot_modules_display() /datum/hud/proc/update_robot_modules_display(mob/viewer) - if(!isrobot(mymob)) return + if(!iscyborg(mymob)) return var/mob/living/silicon/robot/R = mymob diff --git a/code/controllers/subsystem/minimap.dm b/code/controllers/subsystem/minimap.dm index d651cabd4989..1687cb1b2b88 100644 --- a/code/controllers/subsystem/minimap.dm +++ b/code/controllers/subsystem/minimap.dm @@ -87,7 +87,7 @@ var/datum/subsystem/minimap/SSminimap var/obj/obj var/list/obj_icons // Don't use icons for space, just add objects in space if they exist. - if(istype(tile, /turf/open/space)) + if(isspaceturf(tile)) obj = locate(/obj/structure/lattice/catwalk) in tile if(obj) tile_icon = new /icon('icons/obj/smooth_structures/catwalk.dmi', "catwalk", SOUTH) diff --git a/code/controllers/subsystem/persistence.dm b/code/controllers/subsystem/persistence.dm index 03fbf1aa4bc5..183ef4944e75 100644 --- a/code/controllers/subsystem/persistence.dm +++ b/code/controllers/subsystem/persistence.dm @@ -29,7 +29,7 @@ var/datum/subsystem/persistence/SSpersistence var/list/free_satchels = list() for(var/turf/T in shuffle(block(locate(TRANSITIONEDGE,TRANSITIONEDGE,ZLEVEL_STATION), locate(world.maxx-TRANSITIONEDGE,world.maxy-TRANSITIONEDGE,ZLEVEL_STATION)))) //Nontrivially expensive but it's roundstart only - if(istype(T,/turf/open/floor) && !istype(T,/turf/open/floor/plating/)) + if(isfloorturf(T) && !istype(T,/turf/open/floor/plating/)) free_satchels += new /obj/item/weapon/storage/backpack/satchel/flat/secret(T) if(!isemptylist(free_satchels) && ((free_satchels.len + placed_satchels) >= (50 - expanded_old_satchels.len) * 0.1)) //up to six tiles, more than enough to kill anything that moves break @@ -60,7 +60,7 @@ var/datum/subsystem/persistence/SSpersistence F.x = text2num(chosen_satchel[1]) F.y = text2num(chosen_satchel[2]) F.z = ZLEVEL_STATION - if(istype(F.loc,/turf/open/floor) && !istype(F.loc,/turf/open/floor/plating/)) + if(isfloorturf(F.loc) && !istype(F.loc,/turf/open/floor/plating/)) F.hide(1) new path(F) return 1 diff --git a/code/controllers/subsystem/shuttles.dm b/code/controllers/subsystem/shuttles.dm index 8f320b9109b0..cb46d3f136c0 100644 --- a/code/controllers/subsystem/shuttles.dm +++ b/code/controllers/subsystem/shuttles.dm @@ -82,7 +82,7 @@ var/datum/subsystem/shuttle/SSshuttle for(var/i in block(A, B)) var/turf/T = i // Only dying the "pure" space, not the transit tiles - if(!(T.type == /turf/open/space)) + if(istype(T, /turf/open/space/transit) || !isspaceturf(T)) continue if((T.x == A.x) || (T.x == B.x) || (T.y == A.y) || (T.y == B.y)) T.color = "#ffff00" diff --git a/code/datums/antagonists/datum_clockcult.dm b/code/datums/antagonists/datum_clockcult.dm index ad369769eb8d..da13e3175f6b 100644 --- a/code/datums/antagonists/datum_clockcult.dm +++ b/code/datums/antagonists/datum_clockcult.dm @@ -46,7 +46,7 @@ owner.attack_log += "\[[time_stamp()]\] Has been converted to the cult of Ratvar!" if(issilicon(owner)) var/mob/living/silicon/S = owner - if(isrobot(S) && !silent_update) + if(iscyborg(S) && !silent_update) S << "You have been desynced from your master AI. In addition, your onboard camera is no longer active and your safeties have been disabled." S << "You can communicate with other servants by using the Hierophant Network action button in the upper left." else if(isbrain(owner) || isclockmob(owner)) @@ -61,7 +61,7 @@ owner.update_action_buttons_icon() //because a few clockcult things are action buttons and we may be wearing/holding them for whatever reason, we need to update buttons if(issilicon(owner)) var/mob/living/silicon/S = owner - if(isrobot(S)) + if(iscyborg(S)) var/mob/living/silicon/robot/R = S R.UnlinkSelf() R.emagged = 1 @@ -109,7 +109,7 @@ qdel(F) if(issilicon(owner)) var/mob/living/silicon/S = owner - if(isrobot(S)) + if(iscyborg(S)) var/mob/living/silicon/robot/R = S R.emagged = initial(R.emagged) S.make_laws() @@ -128,6 +128,6 @@ owner.mind.memory = "" //Not sure if there's a better way to do this owner.mind.special_role = null owner.attack_log += "\[[time_stamp()]\] Has renounced the cult of Ratvar!" - if(isrobot(owner)) + if(iscyborg(owner)) owner << "Despite your freedom from Ratvar's influence, you are still irreparably damaged and no longer possess certain functions such as AI linking." ..() diff --git a/code/datums/helper_datums/teleport.dm b/code/datums/helper_datums/teleport.dm index f37515875309..a36f4f5172bc 100644 --- a/code/datums/helper_datums/teleport.dm +++ b/code/datums/helper_datums/teleport.dm @@ -185,7 +185,7 @@ var/z = pick(zlevels) var/random_location = locate(x,y,z) - if(!(istype(random_location, /turf/open/floor))) + if(!isfloorturf(random_location)) continue var/turf/open/floor/F = random_location if(!F.air) diff --git a/code/datums/martial.dm b/code/datums/martial.dm index 9b9cfb3c3d68..dfdb9d7e97d4 100644 --- a/code/datums/martial.dm +++ b/code/datums/martial.dm @@ -484,7 +484,7 @@ else user.take_bodypart_damage(2*force) return - if(isrobot(target)) + if(iscyborg(target)) return ..() if(!isliving(target)) return ..() diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index cc1a8f561afc..9b50ef5c6c81 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -353,7 +353,7 @@ if(!T || !isturf(T)) T = get_turf(src) var/area/A = get_area(T) - if(istype(T, /turf/open/space)) // Turf never has gravity + if(isspaceturf(T)) // Turf never has gravity return 0 else if(A && A.has_gravity) // Areas which always has gravity return 1 diff --git a/code/game/atoms.dm b/code/game/atoms.dm index fbbde83a9db9..ac83c557ddbc 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -355,7 +355,7 @@ var/list/blood_splatter_icons = list() return 0 /atom/proc/isinspace() - if(istype(get_turf(src), /turf/open/space)) + if(isspaceturf(get_turf(src))) return 1 else return 0 diff --git a/code/game/gamemodes/blob/blob_report.dm b/code/game/gamemodes/blob/blob_report.dm index 246677cea137..95fb000a2c83 100644 --- a/code/game/gamemodes/blob/blob_report.dm +++ b/code/game/gamemodes/blob/blob_report.dm @@ -57,13 +57,13 @@ /datum/station_state/proc/count(count_territories) for(var/turf/T in block(locate(1,1,1), locate(world.maxx,world.maxy,1))) - if(istype(T,/turf/open/floor)) + if(isfloorturf(T)) if(!(T:burnt)) src.floor += 12 else src.floor += 1 - if(istype(T, /turf/closed/wall)) + if(iswallturf(T)) if(T:intact) src.wall += 2 else diff --git a/code/game/gamemodes/blob/overmind.dm b/code/game/gamemodes/blob/overmind.dm index dc078d4aea5e..e9ab0a757e84 100644 --- a/code/game/gamemodes/blob/overmind.dm +++ b/code/game/gamemodes/blob/overmind.dm @@ -180,7 +180,7 @@ return 0 else var/area/A = get_area(NewLoc) - if(istype(NewLoc, /turf/open/space) || istype(A, /area/shuttle)) //if unplaced, can't go on shuttles or space tiles + if(isspaceturf(NewLoc) || istype(A, /area/shuttle)) //if unplaced, can't go on shuttles or space tiles return 0 loc = NewLoc return 1 diff --git a/code/game/gamemodes/blob/powers.dm b/code/game/gamemodes/blob/powers.dm index 7a631a741b1f..fa7d3a14987a 100644 --- a/code/game/gamemodes/blob/powers.dm +++ b/code/game/gamemodes/blob/powers.dm @@ -194,7 +194,7 @@ src << "You have no core and are about to die! May you rest in peace." return var/area/A = get_area(T) - if(istype(T, /turf/open/space) || A && !A.blob_allowed) + if(isspaceturf(T) || A && !A.blob_allowed) src << "You cannot relocate your core here!" return if(!can_buy(80)) diff --git a/code/game/gamemodes/blob/theblob.dm b/code/game/gamemodes/blob/theblob.dm index d46eba21ee7a..7f2e732eade1 100644 --- a/code/game/gamemodes/blob/theblob.dm +++ b/code/game/gamemodes/blob/theblob.dm @@ -143,7 +143,7 @@ /obj/structure/blob/proc/ConsumeTile() for(var/atom/A in loc) A.blob_act(src) - if(istype(loc, /turf/closed/wall)) + if(iswallturf(loc)) loc.blob_act(src) //don't ask how a wall got on top of the core, just eat it /obj/structure/blob/proc/blob_attack_animation(atom/A = null, controller) //visually attacks an atom @@ -174,7 +174,7 @@ return 0 var/make_blob = TRUE //can we make a blob? - if(istype(T, /turf/open/space) && !(locate(/obj/structure/lattice) in T) && prob(80)) + if(isspaceturf(T) && !(locate(/obj/structure/lattice) in T) && prob(80)) make_blob = FALSE playsound(src.loc, 'sound/effects/splat.ogg', 50, 1) //Let's give some feedback that we DID try to spawn in space, since players are used to it diff --git a/code/game/gamemodes/clock_cult/clock_scripture.dm b/code/game/gamemodes/clock_cult/clock_scripture.dm index 2689358aaee8..5097607dfbed 100644 --- a/code/game/gamemodes/clock_cult/clock_scripture.dm +++ b/code/game/gamemodes/clock_cult/clock_scripture.dm @@ -170,7 +170,7 @@ Judgement: 10 servants, 100 CV, and any existing AIs are converted or destroyed /datum/clockwork_scripture/create_object/check_special_requirements() var/turf/T = get_turf(invoker) - if(!space_allowed && istype(T, /turf/open/space)) + if(!space_allowed && isspaceturf(T)) invoker << "You need solid ground to place this object!" return 0 if(one_per_tile && (locate(prevent_path) in T)) diff --git a/code/game/gamemodes/clock_cult/clock_structures.dm b/code/game/gamemodes/clock_cult/clock_structures.dm index 400c680ba192..69aead38fc34 100644 --- a/code/game/gamemodes/clock_cult/clock_structures.dm +++ b/code/game/gamemodes/clock_cult/clock_structures.dm @@ -346,10 +346,10 @@ user << "You need one brass sheet to do this!" return var/turf/T = get_turf(src) - if(istype(T, /turf/closed/wall)) + if(iswallturf(T)) user << "There is already a wall present!" return - if(!istype(T, /turf/open/floor)) + if(!isfloorturf(T)) user << "A floor must be present to build a [anchored ? "false ":""]wall!" return if(locate(/obj/structure/falsewall) in T.contents) diff --git a/code/game/gamemodes/cult/ritual.dm b/code/game/gamemodes/cult/ritual.dm index 0b1d11cd3c49..9b14d82cd9ec 100644 --- a/code/game/gamemodes/cult/ritual.dm +++ b/code/game/gamemodes/cult/ritual.dm @@ -189,7 +189,7 @@ This file contains the arcane tome files. entered_rune_name = input(user, "Choose a rite to scribe.", "Sigils of Power") as null|anything in possible_runes if(!Adjacent(user) || !src || qdeleted(src) || user.incapacitated()) return - if(istype(Turf, /turf/open/space)) + if(isspaceturf(Turf)) user << "You cannot scribe runes in space!" return for(var/T in typesof(/obj/effect/rune)) diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm index a04e96cd6ace..b30ac5561ed5 100644 --- a/code/game/gamemodes/cult/runes.dm +++ b/code/game/gamemodes/cult/runes.dm @@ -404,7 +404,7 @@ var/list/teleport_runes = list() return 1 /obj/effect/rune/convert/proc/do_sacrifice(mob/living/sacrificial, list/invokers) - if((((ishuman(sacrificial) || isrobot(sacrificial)) && sacrificial.stat != DEAD) || is_sacrifice_target(sacrificial.mind)) && invokers.len < 3) + if((((ishuman(sacrificial) || iscyborg(sacrificial)) && sacrificial.stat != DEAD) || is_sacrifice_target(sacrificial.mind)) && invokers.len < 3) for(var/M in invokers) M << "[sacrificial] is too greatly linked to the world! You need three acolytes!" log_game("Offer rune failed - not enough acolytes and target is living or sac target") @@ -423,7 +423,7 @@ var/list/teleport_runes = list() if(sacrifice_fulfilled) M << "\"Yes! This is the one I desire! You have done well.\"" else - if(ishuman(sacrificial) || isrobot(sacrificial)) + if(ishuman(sacrificial) || iscyborg(sacrificial)) M << "\"I accept this sacrifice.\"" else M << "\"I accept this meager sacrifice.\"" @@ -435,7 +435,7 @@ var/list/teleport_runes = list() stone.invisibility = 0 if(sacrificial) - if(isrobot(sacrificial)) + if(iscyborg(sacrificial)) playsound(sacrificial, 'sound/magic/Disable_Tech.ogg', 100, 1) sacrificial.dust() //To prevent the MMI from remaining else diff --git a/code/game/gamemodes/gang/recaller.dm b/code/game/gamemodes/gang/recaller.dm index 3f1a00593d47..2d7fafd31d6f 100644 --- a/code/game/gamemodes/gang/recaller.dm +++ b/code/game/gamemodes/gang/recaller.dm @@ -258,7 +258,7 @@ var/area/usrarea = get_area(usr.loc) var/usrturf = get_turf(usr.loc) - if(initial(usrarea.name) == "Space" || istype(usrturf,/turf/open/space) || usr.z != 1) + if(initial(usrarea.name) == "Space" || isspaceturf(usrturf) || usr.z != 1) usr << "You can only use this on the station!" return diff --git a/code/game/gamemodes/malfunction/Malf_Modules.dm b/code/game/gamemodes/malfunction/Malf_Modules.dm index 76a6de59b026..940a715f86cd 100644 --- a/code/game/gamemodes/malfunction/Malf_Modules.dm +++ b/code/game/gamemodes/malfunction/Malf_Modules.dm @@ -372,7 +372,7 @@ for(var/n=1;n<4,n++) var/fail var/turf/T = turfs[n] - if(!istype(T, /turf/open/floor)) + if(!isfloorturf(T)) fail = 1 var/datum/camerachunk/C = cameranet.getCameraChunk(T.x, T.y, T.z) if(!C.visibleTurfs[T]) diff --git a/code/game/gamemodes/meteor/meteors.dm b/code/game/gamemodes/meteor/meteors.dm index 194a0bca0af7..7aa568483bff 100644 --- a/code/game/gamemodes/meteor/meteors.dm +++ b/code/game/gamemodes/meteor/meteors.dm @@ -29,7 +29,7 @@ var/turf/pickedstart var/turf/pickedgoal var/max_i = 10//number of tries to spawn meteor. - while (!istype(pickedstart, /turf/open/space)) + while(!isspaceturf(pickedstart)) var/startSide = pick(cardinal) pickedstart = spaceDebrisStartLoc(startSide, 1) pickedgoal = spaceDebrisFinishLoc(startSide, 1) @@ -114,7 +114,7 @@ var/turf/T = get_turf(loc) ram_turf(T) - if(prob(10) && !istype(T, /turf/open/space))//randomly takes a 'hit' from ramming + if(prob(10) && !isspaceturf(T))//randomly takes a 'hit' from ramming get_hit() /obj/effect/meteor/Destroy() @@ -292,7 +292,7 @@ /obj/effect/meteor/meaty/ram_turf(turf/T) - if(!istype(T, /turf/open/space)) + if(!isspaceturf(T)) new /obj/effect/decal/cleanable/blood(T) /obj/effect/meteor/meaty/Bump(atom/A) @@ -310,7 +310,7 @@ ..() /obj/effect/meteor/meaty/xeno/ram_turf(turf/T) - if(!istype(T, /turf/open/space)) + if(!isspaceturf(T)) new /obj/effect/decal/cleanable/xenoblood(T) //Station buster Tunguska diff --git a/code/game/gamemodes/miniantags/abduction/abduction_gear.dm b/code/game/gamemodes/miniantags/abduction/abduction_gear.dm index 7cb4fd7fccbb..7c79ebe648c2 100644 --- a/code/game/gamemodes/miniantags/abduction/abduction_gear.dm +++ b/code/game/gamemodes/miniantags/abduction/abduction_gear.dm @@ -392,7 +392,7 @@ Congratulations! You are now trained for xenobiology research!"} if(!isabductor(user)) return - if(isrobot(target)) + if(iscyborg(target)) ..() return diff --git a/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm b/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm index e36d330fb26d..db7a20a766fb 100644 --- a/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm +++ b/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm @@ -257,14 +257,14 @@ /turf/closed/wall/swarmer_act(mob/living/simple_animal/hostile/swarmer/S) for(var/turf/T in range(1, src)) - if(istype(T, /turf/open/space) || istype(T.loc, /area/space)) + if(isspaceturf(T) || istype(T.loc, /area/space)) S << "Destroying this object has the potential to cause a hull breach. Aborting." return ..() /obj/structure/window/swarmer_act(mob/living/simple_animal/hostile/swarmer/S) for(var/turf/T in range(1, src)) - if(istype(T, /turf/open/space) || istype(T.loc, /area/space)) + if(isspaceturf(T) || istype(T.loc, /area/space)) S << "Destroying this object has the potential to cause a hull breach. Aborting." return ..() @@ -482,7 +482,7 @@ if(!istype(L, /mob/living/simple_animal/hostile/swarmer)) playsound(loc,'sound/effects/snap.ogg',50, 1, -1) L.electrocute_act(0, src, 1, 1) - if(isrobot(L)) + if(iscyborg(L)) L.Weaken(5) qdel(src) ..() diff --git a/code/game/gamemodes/miniantags/revenant/revenant.dm b/code/game/gamemodes/miniantags/revenant/revenant.dm index 70902339dbe6..fcbe8fd31273 100644 --- a/code/game/gamemodes/miniantags/revenant/revenant.dm +++ b/code/game/gamemodes/miniantags/revenant/revenant.dm @@ -284,7 +284,7 @@ if(!src) return var/turf/T = get_turf(src) - if(istype(T, /turf/closed)) + if(isclosedturf(T)) src << "You cannot use abilities from inside of a wall." return 0 for(var/obj/O in T) diff --git a/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm b/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm index 3d3ca500d967..161ad5910823 100644 --- a/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm +++ b/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm @@ -248,7 +248,7 @@ if(T.flags & NOJAUNT) T.flags -= NOJAUNT PoolOrNew(/obj/effect/overlay/temp/revenant, T) - if(!istype(T, /turf/open/floor/plating) && !istype(T, /turf/open/floor/engine/cult) && istype(T, /turf/open/floor) && prob(15)) + if(!istype(T, /turf/open/floor/plating) && !istype(T, /turf/open/floor/engine/cult) && isfloorturf(T) && prob(15)) var/turf/open/floor/floor = T if(floor.intact && floor.floor_tile) PoolOrNew(floor.floor_tile, floor) diff --git a/code/game/machinery/camera/tracking.dm b/code/game/machinery/camera/tracking.dm index 89080938269a..34c595620910 100644 --- a/code/game/machinery/camera/tracking.dm +++ b/code/game/machinery/camera/tracking.dm @@ -136,7 +136,7 @@ /proc/near_camera(mob/living/M) if (!isturf(M.loc)) return 0 - if(isrobot(M)) + if(iscyborg(M)) var/mob/living/silicon/robot/R = M if(!(R.camera && R.camera.can_use()) && !cameranet.checkCameraVis(M)) return 0 diff --git a/code/game/machinery/computer/camera.dm b/code/game/machinery/computer/camera.dm index 70d099b12288..1342359a08e3 100644 --- a/code/game/machinery/computer/camera.dm +++ b/code/game/machinery/computer/camera.dm @@ -27,7 +27,7 @@ if(!Adjacent(user)) user.unset_machine() return - else if(isrobot(user)) + else if(iscyborg(user)) var/list/viewing = viewers(src) if(!viewing.Find(user)) user.unset_machine() @@ -88,7 +88,7 @@ var/camera_fail = 0 if(!C.can_use() || user.machine != src || user.eye_blind || user.incapacitated()) camera_fail = 1 - else if(isrobot(user)) + else if(iscyborg(user)) var/list/viewing = viewers(src) if(!viewing.Find(user)) camera_fail = 1 diff --git a/code/game/machinery/computer/crew.dm b/code/game/machinery/computer/crew.dm index d929f800cdd5..0ade3fe48b50 100644 --- a/code/game/machinery/computer/crew.dm +++ b/code/game/machinery/computer/crew.dm @@ -215,7 +215,7 @@ var/global/datum/crewmonitor/crewmonitor = new if (hclient.client.mob && hclient.client.mob.stat == 0 && hclient.client.mob.z == text2num(z)) if (isAI(hclient.client.mob)) return TRUE - else if (isrobot(hclient.client.mob)) + else if (iscyborg(hclient.client.mob)) return (locate(/obj/machinery/computer/crew, range(world.view, hclient.client.mob))) || (locate(/obj/item/device/sensor_device, hclient.client.mob.contents)) else return (locate(/obj/machinery/computer/crew, range(1, hclient.client.mob))) || (locate(/obj/item/device/sensor_device, hclient.client.mob.contents)) diff --git a/code/game/machinery/computer/law.dm b/code/game/machinery/computer/law.dm index 3c066205601d..26237a9eeab6 100644 --- a/code/game/machinery/computer/law.dm +++ b/code/game/machinery/computer/law.dm @@ -71,7 +71,7 @@ user << "[src.current.name] selected for law changes." /obj/machinery/computer/upload/borg/can_upload_to(mob/living/silicon/robot/B) - if(!B || !isrobot(B)) + if(!B || !iscyborg(B)) return 0 if(B.scrambledcodes || B.emagged) return 0 diff --git a/code/game/machinery/computer/prisoner.dm b/code/game/machinery/computer/prisoner.dm index 9df931c720a0..9858e48f257b 100644 --- a/code/game/machinery/computer/prisoner.dm +++ b/code/game/machinery/computer/prisoner.dm @@ -56,7 +56,7 @@ var/loc_display = "Unknown" var/mob/living/carbon/M = T.imp_in - if(Tr.z == ZLEVEL_STATION && !istype(M.loc, /turf/open/space)) + if(Tr.z == ZLEVEL_STATION && !isspaceturf(M.loc)) var/turf/mob_loc = get_turf(M) loc_display = mob_loc.loc diff --git a/code/game/machinery/doors/poddoor.dm b/code/game/machinery/doors/poddoor.dm index 118f2e18e442..f259e2c5cdb7 100644 --- a/code/game/machinery/doors/poddoor.dm +++ b/code/game/machinery/doors/poddoor.dm @@ -23,7 +23,7 @@ /obj/machinery/door/poddoor/shuttledock/proc/check() var/turf/T = get_step(src, checkdir) - if(!istype(T,/turf/open/space)) + if(!isspaceturf(T)) addtimer(src, "open", 0, TRUE) else addtimer(src, "close", 0, TRUE) diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm index c44cae77d61e..d9e78c96da84 100644 --- a/code/game/machinery/machinery.dm +++ b/code/game/machinery/machinery.dm @@ -296,7 +296,7 @@ Class Procs: /obj/machinery/attack_ai(mob/user) - if(isrobot(user))// For some reason attack_robot doesn't work + if(iscyborg(user))// For some reason attack_robot doesn't work var/mob/living/silicon/robot/R = user if(R.client && R.client.eye == R && !R.low_power_mode)// This is to stop robots from using cameras to remotely control machines; and from using machines when the borg has no power. return attack_hand(user) diff --git a/code/game/machinery/shieldgen.dm b/code/game/machinery/shieldgen.dm index 89c4e64995f5..ec4449127679 100644 --- a/code/game/machinery/shieldgen.dm +++ b/code/game/machinery/shieldgen.dm @@ -116,7 +116,7 @@ update_icon() for(var/turf/target_tile in range(shield_range, src)) - if (istype(target_tile,/turf/open/space) && !(locate(/obj/machinery/shield) in target_tile)) + if(isspaceturf(target_tile) && !(locate(/obj/machinery/shield) in target_tile)) if(!(stat & BROKEN) || prob(33)) deployed_shields += new /obj/machinery/shield(target_tile) diff --git a/code/game/machinery/syndicatebomb.dm b/code/game/machinery/syndicatebomb.dm index bc5486dbbf01..674a37358273 100644 --- a/code/game/machinery/syndicatebomb.dm +++ b/code/game/machinery/syndicatebomb.dm @@ -100,7 +100,7 @@ /obj/machinery/syndicatebomb/attackby(obj/item/I, mob/user, params) if(istype(I, /obj/item/weapon/wrench)) if(!anchored) - if(!isturf(src.loc) || istype(src.loc, /turf/open/space)) + if(!isturf(loc) || isspaceturf(loc)) user << "The bomb must be placed on solid ground to attach it." else user << "You firmly wrench the bomb to the floor." diff --git a/code/game/machinery/telecomms/machine_interactions.dm b/code/game/machinery/telecomms/machine_interactions.dm index 90986ffcdffd..e3eda91f2ef0 100644 --- a/code/game/machinery/telecomms/machine_interactions.dm +++ b/code/game/machinery/telecomms/machine_interactions.dm @@ -138,7 +138,7 @@ else if(isAI(user)) var/mob/living/silicon/ai/U = user P = U.aiMulti - else if(isrobot(user) && in_range(user, src)) + else if(iscyborg(user) && in_range(user, src)) if(istype(user.get_active_held_item(), /obj/item/device/multitool)) P = user.get_active_held_item() return P diff --git a/code/game/machinery/transformer.dm b/code/game/machinery/transformer.dm index f7ca0ccd18fb..74c8430c810f 100644 --- a/code/game/machinery/transformer.dm +++ b/code/game/machinery/transformer.dm @@ -120,10 +120,10 @@ //East var/turf/east = locate(T.x + 1, T.y, T.z) - if(istype(east, /turf/open/floor)) + if(isfloorturf(east)) new /obj/machinery/conveyor/auto(east, WEST) // West var/turf/west = locate(T.x - 1, T.y, T.z) - if(istype(west, /turf/open/floor)) + if(isfloorturf(west)) new /obj/machinery/conveyor/auto(west, WEST) diff --git a/code/game/mecha/equipment/tools/mining_tools.dm b/code/game/mecha/equipment/tools/mining_tools.dm index 5c52da34820a..ad8dbb9188dc 100644 --- a/code/game/mecha/equipment/tools/mining_tools.dm +++ b/code/game/mecha/equipment/tools/mining_tools.dm @@ -13,7 +13,7 @@ /obj/item/mecha_parts/mecha_equipment/drill/action(atom/target) if(!action_checks(target)) return - if(istype(target, /turf/open/space)) + if(isspaceturf(target)) return if(isobj(target)) var/obj/target_obj = target diff --git a/code/game/mecha/equipment/tools/work_tools.dm b/code/game/mecha/equipment/tools/work_tools.dm index 139dd0db77f8..791dd42a8e95 100644 --- a/code/game/mecha/equipment/tools/work_tools.dm +++ b/code/game/mecha/equipment/tools/work_tools.dm @@ -216,14 +216,14 @@ switch(mode) if(0) - if (istype(target, /turf/closed/wall)) + if(iswallturf(target)) var/turf/closed/wall/W = target occupant_message("Deconstructing [W]...") if(do_after_cooldown(W)) chassis.spark_system.start() W.ChangeTurf(/turf/open/floor/plating) playsound(W, 'sound/items/Deconstruct.ogg', 50, 1) - else if (istype(target, /turf/open/floor)) + else if(isfloorturf(target)) var/turf/open/floor/F = target occupant_message("Deconstructing [F]...") if(do_after_cooldown(target)) @@ -237,14 +237,14 @@ qdel(target) playsound(target, 'sound/items/Deconstruct.ogg', 50, 1) if(1) - if(istype(target, /turf/open/space)) + if(isspaceturf(target)) var/turf/open/space/S = target occupant_message("Building Floor...") if(do_after_cooldown(S)) S.ChangeTurf(/turf/open/floor/plating) playsound(S, 'sound/items/Deconstruct.ogg', 50, 1) chassis.spark_system.start() - else if(istype(target, /turf/open/floor)) + else if(isfloorturf(target)) var/turf/open/floor/F = target occupant_message("Building Wall...") if(do_after_cooldown(F)) @@ -252,7 +252,7 @@ playsound(F, 'sound/items/Deconstruct.ogg', 50, 1) chassis.spark_system.start() if(2) - if(istype(target, /turf/open/floor)) + if(isfloorturf(target)) occupant_message("Building Airlock...") if(do_after_cooldown(target)) chassis.spark_system.start() @@ -386,7 +386,7 @@ last_piece = null /obj/item/mecha_parts/mecha_equipment/cable_layer/proc/dismantleFloor(var/turf/new_turf) - if(istype(new_turf, /turf/open/floor)) + if(isfloorturf(new_turf)) var/turf/open/floor/T = new_turf if(!istype(T, /turf/open/floor/plating)) if(!T.broken && !T.burnt) diff --git a/code/game/objects/effects/alien_acid.dm b/code/game/objects/effects/alien_acid.dm index 6cc2831d154e..d95106c22107 100644 --- a/code/game/objects/effects/alien_acid.dm +++ b/code/game/objects/effects/alien_acid.dm @@ -50,15 +50,15 @@ T.dump_contents() qdel(target) - if(istype(target, /turf/closed/mineral)) + if(ismineralturf(target)) var/turf/closed/mineral/M = target M.ChangeTurf(M.baseturf) - if(istype(target, /turf/open/floor)) + if(isfloorturf(target)) var/turf/open/floor/F = target F.ChangeTurf(F.baseturf) - if(istype(target, /turf/closed/wall)) + if(iswallturf(target)) var/turf/closed/wall/W = target W.dismantle_wall(1) diff --git a/code/game/objects/effects/contraband.dm b/code/game/objects/effects/contraband.dm index 2e54d2f2b0b0..e2b248cb28de 100644 --- a/code/game/objects/effects/contraband.dm +++ b/code/game/objects/effects/contraband.dm @@ -272,7 +272,7 @@ list(name = "- Carbon Dioxide", desc = " This informational poster teaches the v if(!D) return - if(istype(src,/turf/closed/wall) && user && user.loc == temp_loc) //Let's check if everything is still there + if(iswallturf(src) && user && user.loc == temp_loc) //Let's check if everything is still there user << "You place the poster!" else D.roll_and_drop(temp_loc,D.official) diff --git a/code/game/objects/effects/effect_system/effects_smoke.dm b/code/game/objects/effects/effect_system/effects_smoke.dm index 42eecf20b49e..c74b9a0cc42c 100644 --- a/code/game/objects/effects/effect_system/effects_smoke.dm +++ b/code/game/objects/effects/effect_system/effects_smoke.dm @@ -157,7 +157,7 @@ var/blast = 0 /datum/effect_system/smoke_spread/freezing/proc/Chilled(atom/A) - if(istype(A,/turf/open)) + if(isopenturf(A)) var/turf/open/T = A if(T.air) var/datum/gas_mixture/G = T.air diff --git a/code/game/objects/explosion.dm b/code/game/objects/explosion.dm index e7c04dcd6fa6..8504bea3e585 100644 --- a/code/game/objects/explosion.dm +++ b/code/game/objects/explosion.dm @@ -133,7 +133,7 @@ //------- TURF FIRES ------- if(T) - if(flame_dist && prob(40) && !istype(T, /turf/open/space) && !T.density) + if(flame_dist && prob(40) && !isspaceturf(T) && !T.density) PoolOrNew(/obj/effect/hotspot, T) //Mostly for ambience! if(dist > 0) T.ex_act(dist) diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 613238957052..d5a551f6fb4d 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -284,7 +284,7 @@ var/global/image/fire_overlay = image("icon" = 'icons/effects/fire.dmi', "icon_s /obj/item/attack_ai(mob/user) if(istype(src.loc, /obj/item/weapon/robot_module)) //If the item is part of a cyborg module, equip it - if(!isrobot(user)) + if(!iscyborg(user)) return var/mob/living/silicon/robot/R = user if(!R.low_power_mode) //can't equip modules with an empty cell. diff --git a/code/game/objects/items/apc_frame.dm b/code/game/objects/items/apc_frame.dm index 3fc4875cd4ee..a9ef391d7caa 100644 --- a/code/game/objects/items/apc_frame.dm +++ b/code/game/objects/items/apc_frame.dm @@ -16,7 +16,7 @@ return var/turf/loc = get_turf(usr) var/area/A = loc.loc - if(!istype(loc, /turf/open/floor)) + if(!isfloorturf(loc)) usr << "You cannot place [src] on this spot!" return if(A.requires_power == 0 || istype(A, /area/space)) @@ -51,7 +51,7 @@ if(istype(W, /obj/item/weapon/screwdriver)) // For camera-building borgs var/turf/T = get_step(get_turf(user), user.dir) - if(istype(T, /turf/closed/wall)) + if(iswallturf(T)) T.attackby(src, user, params) var/metal_amt = round(materials[MAT_METAL]/MINERAL_MATERIAL_AMOUNT) diff --git a/code/game/objects/items/crayons.dm b/code/game/objects/items/crayons.dm index a79ee1e4704c..51ddf7aeccbf 100644 --- a/code/game/objects/items/crayons.dm +++ b/code/game/objects/items/crayons.dm @@ -710,7 +710,7 @@ /obj/item/toy/crayon/spraycan/borg/afterattack(atom/target,mob/user,proximity) var/diff = ..() - if(!isrobot(user)) + if(!iscyborg(user)) user << "How did you get this?" qdel(src) return FALSE diff --git a/code/game/objects/items/devices/chameleonproj.dm b/code/game/objects/items/devices/chameleonproj.dm index 07bfc457c929..c1727274ae44 100644 --- a/code/game/objects/items/devices/chameleonproj.dm +++ b/code/game/objects/items/devices/chameleonproj.dm @@ -115,7 +115,7 @@ master.disrupt() /obj/effect/dummy/chameleon/relaymove(mob/user, direction) - if(istype(loc, /turf/open/space) || !direction) + if(isspaceturf(loc) || !direction) return //No magical space movement! if(can_move) diff --git a/code/game/objects/items/devices/laserpointer.dm b/code/game/objects/items/devices/laserpointer.dm index dfdccf1b8d15..f881152be5af 100644 --- a/code/game/objects/items/devices/laserpointer.dm +++ b/code/game/objects/items/devices/laserpointer.dm @@ -106,7 +106,7 @@ outmsg = "You fail to blind [C] by shining [src] at their eyes!" //robots - else if(isrobot(target)) + else if(iscyborg(target)) var/mob/living/silicon/S = target //20% chance to actually hit the sensors if(prob(effectchance * diode.rating)) diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index 804137dd3ab0..8300db6ca5f1 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -277,7 +277,7 @@ jobname = "AI" // --- Cyborg --- - else if(isrobot(M)) + else if(iscyborg(M)) var/mob/living/silicon/robot/B = M jobname = "[B.designation] Cyborg" diff --git a/code/game/objects/items/robot/robot_items.dm b/code/game/objects/items/robot/robot_items.dm index 5f1e514cde76..bf853d2273c1 100644 --- a/code/game/objects/items/robot/robot_items.dm +++ b/code/game/objects/items/robot/robot_items.dm @@ -16,7 +16,7 @@ if(H.check_shields(0, "[M]'s [name]", src, MELEE_ATTACK)) playsound(M, 'sound/weapons/Genhit.ogg', 50, 1) return 0 - if(isrobot(user)) + if(iscyborg(user)) var/mob/living/silicon/robot/R = user if(!R.cell.use(charge_cost)) return @@ -43,7 +43,7 @@ var/shockallowed = 0//Can it be a stunarm when emagged. Only PK borgs get this by default. /obj/item/borg/cyborghug/attack_self(mob/living/user) - if(isrobot(user)) + if(iscyborg(user)) var/mob/living/silicon/robot/P = user if(P.emagged&&shockallowed == 1) if(mode < 3) @@ -107,7 +107,7 @@ "You electrocute [M] with your touch!") M.update_canmove() else - if(!isrobot(M)) + if(!iscyborg(M)) M.adjustFireLoss(10) user.visible_message("[user] shocks [M]!", \ "You shock [M]!") @@ -161,7 +161,7 @@ update_icon() /obj/item/borg/charger/afterattack(obj/item/target, mob/living/silicon/robot/user, proximity_flag) - if(!proximity_flag || !isrobot(user)) + if(!proximity_flag || !iscyborg(user)) return if(mode == "draw") if(is_type_in_list(target, charge_machines)) @@ -282,7 +282,7 @@ user << "The device is still recharging!" return - if(isrobot(user)) + if(iscyborg(user)) var/mob/living/silicon/robot/R = user if(R.cell.charge < 1200) user << "You don't have enough charge to do this!" @@ -302,7 +302,7 @@ playsound(get_turf(src), 'sound/AI/harmalarm.ogg', 70, 3) cooldown = world.time + 200 log_game("[user.ckey]([user]) used a Cyborg Harm Alarm in ([user.x],[user.y],[user.z])") - if(isrobot(user)) + if(iscyborg(user)) var/mob/living/silicon/robot/R = user R.connected_ai << "
NOTICE - Peacekeeping 'HARM ALARM' used by: [user]
" diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index 74be2659ad9c..c5bf5fdfe2be 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -78,12 +78,6 @@ var/title as text var/can_build = 1 can_build = can_build && (max_multiplier>0) - /* - if (R.one_per_turf) - can_build = can_build && !(locate(R.result_type) in usr.loc) - if (R.on_floor) - can_build = can_build && istype(usr.loc, /turf/open/floor) - */ if (R.res_amount>1) title+= "[R.res_amount]x [R.title]\s" else @@ -168,7 +162,7 @@ if (R.one_per_turf && (locate(R.result_type) in usr.loc)) usr << "There is another [R.title] here!" return 0 - if (R.on_floor && !istype(usr.loc, /turf/open/floor)) + if(R.on_floor && !isfloorturf(usr.loc)) usr << "\The [R.title] must be constructed on the floor!" return 0 return 1 diff --git a/code/game/objects/items/weapons/RCD.dm b/code/game/objects/items/weapons/RCD.dm index 4d69fecb2807..7f974faaf42c 100644 --- a/code/game/objects/items/weapons/RCD.dm +++ b/code/game/objects/items/weapons/RCD.dm @@ -230,7 +230,7 @@ RCD return ..() /obj/item/weapon/rcd/attackby(obj/item/weapon/W, mob/user, params) - if(isrobot(user)) //Make sure cyborgs can't load their RCDs + if(iscyborg(user)) //Make sure cyborgs can't load their RCDs return var/loaded = 0 if(istype(W, /obj/item/weapon/rcd_ammo)) @@ -307,7 +307,7 @@ RCD switch(mode) if(1) - if(istype(A, /turf/open/space)) + if(isspaceturf(A)) var/turf/open/space/S = A if(useResource(floorcost, user)) user << "You start building floor..." @@ -316,7 +316,7 @@ RCD return 1 return 0 - if(istype(A, /turf/open/floor)) + if(isfloorturf(A)) var/turf/open/floor/F = A if(checkResource(wallcost, user)) user << "You start building wall..." @@ -330,7 +330,7 @@ RCD return 0 if(2) - if(istype(A, /turf/open/floor)) + if(isfloorturf(A)) if(checkResource(airlockcost, user)) var/door_check = 1 for(var/obj/machinery/door/D in A) @@ -370,12 +370,12 @@ RCD return 0 if(3) - if(istype(A, /turf/closed/wall)) + if(iswallturf(A)) var/turf/closed/wall/W = A if(istype(W, /turf/closed/wall/r_wall) && !canRturf) return 0 if(checkResource(deconwallcost, user)) - user << "You start deconstructing wall..." + user << "You start deconstructing [W]..." playsound(src.loc, 'sound/machines/click.ogg', 50, 1) if(do_after(user, deconwalldelay, target = A)) if(!useResource(deconwallcost, user)) return 0 @@ -384,7 +384,7 @@ RCD return 1 return 0 - if(istype(A, /turf/open/floor)) + if(isfloorturf(A)) var/turf/open/floor/F = A if(istype(F, /turf/open/floor/engine) && !canRturf) return 0 @@ -435,7 +435,7 @@ RCD return 0 if (4) - if(istype(A, /turf/open/floor)) + if(isfloorturf(A)) if(checkResource(grillecost, user)) if(locate(/obj/structure/grille) in A) user << "There is already a grille there!" @@ -504,7 +504,7 @@ RCD canRturf = 1 /obj/item/weapon/rcd/borg/useResource(amount, mob/user) - if(!isrobot(user)) + if(!iscyborg(user)) return 0 var/mob/living/silicon/robot/borgy = user if(!borgy.cell) @@ -517,7 +517,7 @@ RCD return . /obj/item/weapon/rcd/borg/checkResource(amount, mob/user) - if(!isrobot(user)) + if(!iscyborg(user)) return 0 var/mob/living/silicon/robot/borgy = user if(!borgy.cell) diff --git a/code/game/objects/items/weapons/RSF.dm b/code/game/objects/items/weapons/RSF.dm index 3a2b286a2b4a..76772fbf2a66 100644 --- a/code/game/objects/items/weapons/RSF.dm +++ b/code/game/objects/items/weapons/RSF.dm @@ -64,13 +64,13 @@ RSF /obj/item/weapon/rsf/afterattack(atom/A, mob/user, proximity) if(!proximity) return - if (!(istype(A, /obj/structure/table) || istype(A, /turf/open/floor))) + if (!(istype(A, /obj/structure/table) || isfloorturf(A))) return if(matter < 1) user << "\The [src] doesn't have enough matter left." return - if(isrobot(user)) + if(iscyborg(user)) var/mob/living/silicon/robot/R = user if(!R.cell || R.cell.charge < 200) user << "You do not have enough power to use [src]." @@ -105,7 +105,7 @@ RSF use_matter(10, user) /obj/item/weapon/rsf/proc/use_matter(charge, mob/user) - if (isrobot(user)) + if (iscyborg(user)) var/mob/living/silicon/robot/R = user R.cell.charge -= charge else @@ -141,7 +141,7 @@ RSF /obj/item/weapon/cookiesynth/attack_self(mob/user) var/mob/living/silicon/robot/P = null - if(isrobot(user)) + if(iscyborg(user)) P = user if(emagged&&!toxin) toxin = 1 @@ -162,12 +162,12 @@ RSF return if(!proximity) return - if (!(istype(A, /obj/structure/table) || istype(A, /turf/open/floor))) + if (!(istype(A, /obj/structure/table) || isfloorturf(A))) return if(matter < 1) user << "The [src] doesn't have enough matter left. Wait for it to recharge!" return - if(isrobot(user)) + if(iscyborg(user)) var/mob/living/silicon/robot/R = user if(!R.cell || R.cell.charge < 400) user << "You do not have enough power to use [src]." @@ -178,7 +178,7 @@ RSF var/obj/item/weapon/reagent_containers/food/snacks/cookie/S = new /obj/item/weapon/reagent_containers/food/snacks/cookie(T) if(toxin) S.reagents.add_reagent("chloralhydrate2", 10) - if (isrobot(user)) + if (iscyborg(user)) var/mob/living/silicon/robot/R = user R.cell.charge -= 100 else diff --git a/code/game/objects/items/weapons/airlock_painter.dm b/code/game/objects/items/weapons/airlock_painter.dm index 0e17c792a8aa..695eaec581fb 100644 --- a/code/game/objects/items/weapons/airlock_painter.dm +++ b/code/game/objects/items/weapons/airlock_painter.dm @@ -55,7 +55,7 @@ // Find out if there is an open turf in front of us, // and if not, pick the turf we are standing on. var/turf/T = get_step(get_turf(src), user.dir) - if(!istype(T, /turf/open)) + if(!isopenturf(T)) T = get_turf(src) // they managed to lose their lungs between then and diff --git a/code/game/objects/items/weapons/defib.dm b/code/game/objects/items/weapons/defib.dm index 07550fb00f81..b43514eb2cb3 100644 --- a/code/game/objects/items/weapons/defib.dm +++ b/code/game/objects/items/weapons/defib.dm @@ -353,7 +353,7 @@ playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0) return if(!wielded) - if(isrobot(user)) + if(iscyborg(user)) user << "You must activate the paddles in your active module before you can use them on someone!" else user << "You need to wield the paddles in both hands before you can use them on someone!" diff --git a/code/game/objects/items/weapons/extinguisher.dm b/code/game/objects/items/weapons/extinguisher.dm index fc5ffa9c2b98..0e4a15a74ba6 100644 --- a/code/game/objects/items/weapons/extinguisher.dm +++ b/code/game/objects/items/weapons/extinguisher.dm @@ -172,7 +172,7 @@ reagents.clear_reagents() var/turf/T = get_turf(loc) - if(istype(T, /turf/open)) + if(isopenturf(T)) var/turf/open/theturf = T theturf.MakeSlippery(min_wet_time = 10, wet_time_to_add = 5) diff --git a/code/game/objects/items/weapons/grenades/syndieminibomb.dm b/code/game/objects/items/weapons/grenades/syndieminibomb.dm index bbc2f455aae4..0e19162de1e2 100644 --- a/code/game/objects/items/weapons/grenades/syndieminibomb.dm +++ b/code/game/objects/items/weapons/grenades/syndieminibomb.dm @@ -29,25 +29,25 @@ icon_state = "frag" /obj/item/weapon/grenade/gluon - desc = "An advanced grenade that releases a harmful stream of gluons inducing radiation in those nearby. These gluon streams will also make victims feel exhausted, and induce shivering. This extreme coldness will also likely wet any nearby floors." - name = "gluon frag grenade" - icon = 'icons/obj/grenade.dmi' - icon_state = "bluefrag" - item_state = "flashbang" - var/freeze_range = 4 - var/rad_damage = 35 - var/stamina_damage = 30 + desc = "An advanced grenade that releases a harmful stream of gluons inducing radiation in those nearby. These gluon streams will also make victims feel exhausted, and induce shivering. This extreme coldness will also likely wet any nearby floors." + name = "gluon frag grenade" + icon = 'icons/obj/grenade.dmi' + icon_state = "bluefrag" + item_state = "flashbang" + var/freeze_range = 4 + var/rad_damage = 35 + var/stamina_damage = 30 /obj/item/weapon/grenade/gluon/prime() - update_mob() - playsound(loc, 'sound/effects/EMPulse.ogg', 50, 1) - radiation_pulse(loc,freeze_range,freeze_range+1,rad_damage) - for(var/turf/T in view(freeze_range,loc)) - if(istype(T,/turf/open/floor)) - var/turf/open/floor/F = T - F.wet = TURF_WET_PERMAFROST - addtimer(F, "MakeDry", rand(3000, 3100), 0, TURF_WET_PERMAFROST) - for(var/mob/living/carbon/L in T) - L.adjustStaminaLoss(stamina_damage) - L.bodytemperature -= 230 - qdel(src) + update_mob() + playsound(loc, 'sound/effects/EMPulse.ogg', 50, 1) + radiation_pulse(loc,freeze_range,freeze_range+1,rad_damage) + for(var/turf/T in view(freeze_range,loc)) + if(isfloorturf(T)) + var/turf/open/floor/F = T + F.wet = TURF_WET_PERMAFROST + addtimer(F, "MakeDry", rand(3000, 3100), 0, TURF_WET_PERMAFROST) + for(var/mob/living/carbon/L in T) + L.adjustStaminaLoss(stamina_damage) + L.bodytemperature -= 230 + qdel(src) diff --git a/code/game/objects/items/weapons/handcuffs.dm b/code/game/objects/items/weapons/handcuffs.dm index 439a3584df0c..7951045eb840 100644 --- a/code/game/objects/items/weapons/handcuffs.dm +++ b/code/game/objects/items/weapons/handcuffs.dm @@ -186,7 +186,7 @@ return ..() /obj/item/weapon/restraints/handcuffs/cable/zipties/cyborg/attack(mob/living/carbon/C, mob/user) - if(isrobot(user)) + if(iscyborg(user)) if(!C.handcuffed) playsound(loc, 'sound/weapons/cablecuff.ogg', 30, 1, -2) C.visible_message("[user] is trying to put zipties on [C]!", \ diff --git a/code/game/objects/items/weapons/holosign_creator.dm b/code/game/objects/items/weapons/holosign_creator.dm index 4fa45cb7d8cd..c2693b246b26 100644 --- a/code/game/objects/items/weapons/holosign_creator.dm +++ b/code/game/objects/items/weapons/holosign_creator.dm @@ -83,7 +83,7 @@ var/shock = 0 /obj/item/weapon/holosign_creator/cyborg/attack_self(mob/user) - if(isrobot(user)) + if(iscyborg(user)) var/mob/living/silicon/robot/R = user if(shock) diff --git a/code/game/objects/items/weapons/melee/misc.dm b/code/game/objects/items/weapons/melee/misc.dm index 596ed7b35b68..316d34adde8a 100644 --- a/code/game/objects/items/weapons/melee/misc.dm +++ b/code/game/objects/items/weapons/melee/misc.dm @@ -82,7 +82,7 @@ else user.take_bodypart_damage(2*force) return - if(isrobot(target)) + if(iscyborg(target)) ..() return if(!isliving(target)) @@ -90,7 +90,7 @@ if (user.a_intent == "harm") if(!..()) return - if(!isrobot(target)) + if(!iscyborg(target)) return else if(cooldown <= world.time) @@ -190,7 +190,7 @@ consume_everything(target) else var/turf/T = get_turf(src) - if(!istype(T,/turf/open/space)) + if(!isspaceturf(T)) consume_turf(T) /obj/item/weapon/melee/supermatter_sword/afterattack(target, mob/user, proximity_flag) diff --git a/code/game/objects/items/weapons/mop.dm b/code/game/objects/items/weapons/mop.dm index 7a8b36c66db4..de00af41d6fe 100644 --- a/code/game/objects/items/weapons/mop.dm +++ b/code/game/objects/items/weapons/mop.dm @@ -26,7 +26,7 @@ obj/item/weapon/mop/proc/clean(turf/A) for(var/obj/effect/O in A) if(is_cleanable(O)) qdel(O) - if(istype(A, /turf/closed)) + if(isclosedturf(A)) var/turf/closed/C = A C.thermite = 0 reagents.reaction(A, TOUCH, 10) //Needed for proper floor wetting. diff --git a/code/game/objects/items/weapons/paint.dm b/code/game/objects/items/weapons/paint.dm index b15225639fe3..1b51fdd88adb 100644 --- a/code/game/objects/items/weapons/paint.dm +++ b/code/game/objects/items/weapons/paint.dm @@ -83,7 +83,7 @@ if(paintleft <= 0) icon_state = "paint_empty" return - if(!istype(target) || istype(target, /turf/open/space)) + if(!istype(target) || isspaceturf(target)) return target.color = "#" + item_color diff --git a/code/game/objects/items/weapons/storage/backpack.dm b/code/game/objects/items/weapons/storage/backpack.dm index 8a8c69871030..6255c1ebe135 100644 --- a/code/game/objects/items/weapons/storage/backpack.dm +++ b/code/game/objects/items/weapons/storage/backpack.dm @@ -302,7 +302,7 @@ /obj/item/weapon/storage/backpack/satchel/flat/secret/New() ..() - if(istype(loc,/turf/open/floor) && !istype(loc,/turf/open/floor/plating/)) + if(isfloorturf(loc) && !istype(loc,/turf/open/floor/plating/)) hide(1) /obj/item/weapon/storage/backpack/satchel/flat/secret/hide(intact) diff --git a/code/game/objects/items/weapons/storage/book.dm b/code/game/objects/items/weapons/storage/book.dm index 7e308b915230..0b93ec1fb7ae 100644 --- a/code/game/objects/items/weapons/storage/book.dm +++ b/code/game/objects/items/weapons/storage/book.dm @@ -187,7 +187,7 @@ var/global/list/bibleitemstates = list("bible", "koran", "scrapbook", "bible", " /obj/item/weapon/storage/book/bible/afterattack(atom/A, mob/user, proximity) if(!proximity) return - if (istype(A, /turf/open/floor)) + if(isfloorturf(A)) user << "You hit the floor with the bible." if(user.mind && (user.mind.assigned_role == "Chaplain")) for(var/obj/effect/rune/R in orange(2,user)) diff --git a/code/game/objects/items/weapons/storage/storage.dm b/code/game/objects/items/weapons/storage/storage.dm index 19b88ca80167..1f169b0db525 100644 --- a/code/game/objects/items/weapons/storage/storage.dm +++ b/code/game/objects/items/weapons/storage/storage.dm @@ -386,7 +386,7 @@ if(labeler.mode) return 0 . = 1 //no afterattack - if(isrobot(user)) + if(iscyborg(user)) return //Robots can't interact with storage items. if(!can_be_inserted(W, 0 , user)) diff --git a/code/game/objects/items/weapons/stunbaton.dm b/code/game/objects/items/weapons/stunbaton.dm index 1b71da0cdf66..b5a5175d0b09 100644 --- a/code/game/objects/items/weapons/stunbaton.dm +++ b/code/game/objects/items/weapons/stunbaton.dm @@ -111,7 +111,7 @@ deductcharge(hitcost) return - if(isrobot(M)) + if(iscyborg(M)) ..() return @@ -140,7 +140,7 @@ if(H.check_shields(0, "[user]'s [name]", src, MELEE_ATTACK)) //No message; check_shields() handles that playsound(L, 'sound/weapons/Genhit.ogg', 50, 1) return 0 - if(isrobot(loc)) + if(iscyborg(loc)) var/mob/living/silicon/robot/R = loc if(!R || !R.cell || !R.cell.use(hitcost)) return 0 diff --git a/code/game/objects/items/weapons/twohanded.dm b/code/game/objects/items/weapons/twohanded.dm index 58f18f9a4936..6890ef0f7a9f 100644 --- a/code/game/objects/items/weapons/twohanded.dm +++ b/code/game/objects/items/weapons/twohanded.dm @@ -41,7 +41,7 @@ else //something wrong name = "[initial(name)]" update_icon() - if(isrobot(user)) + if(iscyborg(user)) user << "You free up your module." else if(istype(src, /obj/item/weapon/twohanded/required)) user << "You drop \the [name]." @@ -71,7 +71,7 @@ force = force_wielded name = "[name] (Wielded)" update_icon() - if(isrobot(user)) + if(iscyborg(user)) user << "You dedicate your module to [name]." else user << "You grab the [name] with both hands." @@ -362,7 +362,7 @@ /obj/item/weapon/twohanded/spear/afterattack(atom/movable/AM, mob/user, proximity) if(!proximity) return - if(istype(AM, /turf/open)) //So you can actually melee with it + if(isopenturf(AM)) //So you can actually melee with it return if(explosive && wielded) user.say("[war_cry]") diff --git a/code/game/objects/structures.dm b/code/game/objects/structures.dm index 9d446d885a55..7f1220f9e316 100644 --- a/code/game/objects/structures.dm +++ b/code/game/objects/structures.dm @@ -66,7 +66,7 @@ return if ((!( istype(O, /obj/item/weapon) ) || user.get_active_held_item() != O)) return - if(isrobot(user)) + if(iscyborg(user)) return if(!user.drop_item()) return diff --git a/code/game/objects/structures/aliens.dm b/code/game/objects/structures/aliens.dm index 7d6e95810bef..0c8f5237e05a 100644 --- a/code/game/objects/structures/aliens.dm +++ b/code/game/objects/structures/aliens.dm @@ -195,7 +195,7 @@ if(3) icon = 'icons/obj/smooth_structures/alien/weeds3.dmi' linked_node = node - if(istype(loc, /turf/open/space)) + if(isspaceturf(loc)) qdel(src) return addtimer(src, "Life", rand(150, 200)) @@ -208,7 +208,7 @@ set background = BACKGROUND_ENABLED var/turf/U = get_turf(src) - if(istype(U, /turf/open/space)) + if(isspaceturf(U)) qdel(src) return @@ -217,7 +217,7 @@ for(var/turf/T in U.GetAtmosAdjacentTurfs()) - if (locate(/obj/structure/alien/weeds) in T || istype(T, /turf/open/space)) + if (locate(/obj/structure/alien/weeds) in T || isspaceturf(T)) continue new /obj/structure/alien/weeds(T, linked_node) diff --git a/code/game/objects/structures/extinguisher.dm b/code/game/objects/structures/extinguisher.dm index b6aca5e3736a..c766dc13a2f5 100644 --- a/code/game/objects/structures/extinguisher.dm +++ b/code/game/objects/structures/extinguisher.dm @@ -45,7 +45,7 @@ qdel(src) return - if(isrobot(user) || isalien(user)) + if(iscyborg(user) || isalien(user)) return if(istype(I, /obj/item/weapon/extinguisher)) if(!has_extinguisher && opened) @@ -62,7 +62,7 @@ /obj/structure/extinguisher_cabinet/attack_hand(mob/user) - if(isrobot(user) || isalien(user)) + if(iscyborg(user) || isalien(user)) return if(has_extinguisher) user.put_in_hands(has_extinguisher) diff --git a/code/game/objects/structures/false_walls.dm b/code/game/objects/structures/false_walls.dm index cd63c5713a8a..5de0247b4e26 100644 --- a/code/game/objects/structures/false_walls.dm +++ b/code/game/objects/structures/false_walls.dm @@ -107,7 +107,7 @@ if(T.density) user << "[src] is blocked!" return - if(!istype(T, /turf/open/floor)) + if(!isfloorturf(T)) user << "[src] bolts must be tightened on the floor!" return user.visible_message("[user] tightens some bolts on the wall.", "You tighten the bolts on the wall.") diff --git a/code/game/objects/structures/fireaxe.dm b/code/game/objects/structures/fireaxe.dm index 840613533ad2..f7b3ce720983 100644 --- a/code/game/objects/structures/fireaxe.dm +++ b/code/game/objects/structures/fireaxe.dm @@ -16,7 +16,7 @@ update_icon() /obj/structure/fireaxecabinet/attackby(obj/item/I, mob/user, params) - if(isrobot(user) || istype(I,/obj/item/device/multitool)) + if(iscyborg(user) || istype(I,/obj/item/device/multitool)) toggle_lock(user) return if(open || health <= 0) diff --git a/code/game/objects/structures/girders.dm b/code/game/objects/structures/girders.dm index 236f88c7f3f3..82333932cbc9 100644 --- a/code/game/objects/structures/girders.dm +++ b/code/game/objects/structures/girders.dm @@ -40,7 +40,7 @@ else if(istype(W, /obj/item/weapon/wrench)) if(state == GIRDER_DISPLACED) - if(!istype(loc, /turf/open/floor)) + if(!isfloorturf(loc)) user << "A floor must be present to secure the girder!" return playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1) @@ -86,10 +86,10 @@ qdel(src) else if(istype(W, /obj/item/stack)) - if (istype(src.loc, /turf/closed/wall)) + if(iswallturf(loc)) user << "There is already a wall present!" return - if (!istype(src.loc, /turf/open/floor)) + if(!isfloorturf(src.loc)) user << "A floor must be present to build a false wall!" return if (locate(/obj/structure/falsewall) in src.loc.contents) diff --git a/code/game/objects/structures/guncase.dm b/code/game/objects/structures/guncase.dm index 9477946c356c..8219c7f7a339 100644 --- a/code/game/objects/structures/guncase.dm +++ b/code/game/objects/structures/guncase.dm @@ -35,7 +35,7 @@ add_overlay("[icon_state]_door") /obj/structure/guncase/attackby(obj/item/I, mob/user, params) - if(isrobot(user) || isalien(user)) + if(iscyborg(user) || isalien(user)) return if(istype(I, gun_category)) if(contents.len < capacity && open) @@ -53,7 +53,7 @@ return ..() /obj/structure/guncase/attack_hand(mob/user) - if(isrobot(user) || isalien(user)) + if(iscyborg(user) || isalien(user)) return if(contents.len && open) ShowWindow(user) diff --git a/code/game/objects/structures/mineral_doors.dm b/code/game/objects/structures/mineral_doors.dm index b10348b74353..520aba8873e2 100644 --- a/code/game/objects/structures/mineral_doors.dm +++ b/code/game/objects/structures/mineral_doors.dm @@ -43,7 +43,7 @@ /obj/structure/mineral_door/attack_ai(mob/user) //those aren't machinery, they're just big fucking slabs of a mineral if(isAI(user)) //so the AI can't open it return - else if(isrobot(user)) //but cyborgs can + else if(iscyborg(user)) //but cyborgs can if(get_dist(user,src) <= 1) //not remotely though return TryToSwitchState(user) diff --git a/code/game/objects/structures/statues.dm b/code/game/objects/structures/statues.dm index 4ea17faf8f65..acbaa96531ba 100644 --- a/code/game/objects/structures/statues.dm +++ b/code/game/objects/structures/statues.dm @@ -31,7 +31,7 @@ "You loosen the [name]'s bolts!") anchored = 0 else - if (!istype(src.loc, /turf/open/floor)) + if(!isfloorturf(src.loc)) user.visible_message("A floor must be present to secure the [name]!") return playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1) diff --git a/code/game/objects/structures/transit_tubes/transit_tube_pod.dm b/code/game/objects/structures/transit_tubes/transit_tube_pod.dm index da766af9a9f6..520e18ab1ab4 100644 --- a/code/game/objects/structures/transit_tubes/transit_tube_pod.dm +++ b/code/game/objects/structures/transit_tubes/transit_tube_pod.dm @@ -182,7 +182,7 @@ mob.client.Move(get_step(loc, direction), direction) mob.reset_perspective(null) - //if(moving && istype(loc, /turf/open/space)) + //if(moving && isspaceturf(loc)) // Todo: If you get out of a moving pod in space, you should move as well. // Same direction as pod? Direcion you moved? Halfway between? diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm index 1328572f43b0..69f0fbc1fbd5 100644 --- a/code/game/objects/structures/watercloset.dm +++ b/code/game/objects/structures/watercloset.dm @@ -208,7 +208,7 @@ else wash_obj(G) else - if(istype(loc, /turf/open)) + if(isopenturf(loc)) var/turf/open/tile = loc tile.MakeSlippery(min_wet_time = 5, wet_time_to_add = 1) diff --git a/code/game/turfs/open.dm b/code/game/turfs/open.dm index 5fc29b24f79e..10851dcd9dd8 100644 --- a/code/game/turfs/open.dm +++ b/code/game/turfs/open.dm @@ -92,7 +92,7 @@ qdel(O) var/obj/effect/hotspot/hotspot = (locate(/obj/effect/hotspot) in src) - if(hotspot && !istype(src, /turf/open/space)) + if(hotspot && !isspaceturf(src)) air.temperature = max(min(air.temperature-2000,air.temperature/2),0) qdel(hotspot) return 1 diff --git a/code/game/turfs/simulated/floor.dm b/code/game/turfs/simulated/floor.dm index 2ac025cc98a6..4385b13c8d3f 100644 --- a/code/game/turfs/simulated/floor.dm +++ b/code/game/turfs/simulated/floor.dm @@ -112,10 +112,10 @@ var/list/icons_to_ignore_at_floor_init = list("damaged1","damaged2","damaged3"," /turf/open/floor/proc/make_plating() return ChangeTurf(/turf/open/floor/plating) -/turf/open/floor/ChangeTurf(turf/open/floor/T) - if(!istype(src,/turf/open/floor)) +/turf/open/floor/ChangeTurf(new_path) + if(!isfloorturf(src)) return ..() //fucking turfs switch the fucking src of the fucking running procs - if(!ispath(T,/turf/open/floor)) + if(!ispath(new_path, /turf/open/floor)) return ..() var/old_icon = icon_regular_floor var/old_dir = dir diff --git a/code/game/turfs/simulated/river.dm b/code/game/turfs/simulated/river.dm index d4b3da85cb34..d5659ccb1fc5 100644 --- a/code/game/turfs/simulated/river.dm +++ b/code/game/turfs/simulated/river.dm @@ -71,10 +71,10 @@ for(var/F in RANGE_TURFS(1, src) - src) var/turf/T = F var/area/new_area = get_area(T) - if(!T || (T.density && !istype(T, /turf/closed/mineral)) || istype(T, /turf/open/indestructible) || (whitelisted_area && !istype(new_area, whitelisted_area))) + if(!T || (T.density && !ismineralturf(T)) || istype(T, /turf/open/indestructible) || (whitelisted_area && !istype(new_area, whitelisted_area))) continue - if(!logged_turf_type && istype(T, /turf/closed/mineral)) + if(!logged_turf_type && ismineralturf(T)) var/turf/closed/mineral/M = T logged_turf_type = M.turf_type @@ -92,7 +92,7 @@ var/turf/T = F if(!istype(T, logged_turf_type) && prob(probability) && T.ChangeTurf(type)) T.Spread(probability - prob_loss, prob_loss, whitelisted_area) - else if(istype(T, /turf/closed/mineral)) + else if(ismineralturf(T)) var/turf/closed/mineral/M = T M.ChangeTurf(M.turf_type) diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm index 95ba9cc818d8..aec76bc3ba0b 100644 --- a/code/game/turfs/simulated/walls.dm +++ b/code/game/turfs/simulated/walls.dm @@ -179,7 +179,7 @@ user << "You begin slicing through the outer plating..." playsound(src, 'sound/items/Welder.ogg', 100, 1) if(do_after(user, slicing_duration/W.toolspeed, target = src)) - if( !istype(src, /turf/closed/wall) || !user || !WT || !WT.isOn() || !T ) + if(!iswallturf(src) || !user || !WT || !WT.isOn() || !T) return 1 if( user.loc == T && user.get_active_held_item() == WT ) user << "You remove the outer plating." @@ -189,7 +189,7 @@ user << "You begin slicing through the outer plating..." playsound(src, 'sound/items/Welder.ogg', 100, 1) if(do_after(user, slicing_duration*0.6, target = src)) // plasma cutter is faster than welding tool - if( !istype(src, /turf/closed/wall) || !user || !W || !T ) + if(!iswallturf(src) || !user || !W || !T) return 1 if( user.loc == T && user.get_active_held_item() == W ) user << "You remove the outer plating." @@ -202,7 +202,7 @@ /turf/closed/wall/proc/try_destroy(obj/item/weapon/W, mob/user, turf/T) if(istype(W, /obj/item/weapon/pickaxe/drill/jackhammer)) var/obj/item/weapon/pickaxe/drill/jackhammer/D = W - if( !istype(src, /turf/closed/wall) || !user || !W || !T ) + if(!iswallturf(src) || !user || !W || !T) return 1 if( user.loc == T && user.get_active_held_item() == W ) D.playDigSound() diff --git a/code/game/turfs/space/space.dm b/code/game/turfs/space/space.dm index d13b8f9d2cdc..f48eb683c59d 100644 --- a/code/game/turfs/space/space.dm +++ b/code/game/turfs/space/space.dm @@ -51,7 +51,7 @@ /turf/open/space/proc/update_starlight() if(config.starlight) for(var/t in RANGE_TURFS(1,src)) //RANGE_TURFS is in code\__HELPERS\game.dm - if(istype(t, /turf/open/space)) + if(isspaceturf(t)) //let's NOT update this that much pls continue SetLuminosity(4,1) diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 22b243bc1efd..50064c3bbc49 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -688,7 +688,7 @@ var/global/BSACooldown = 0 ai_number++ if(isAI(S)) usr << "AI [key_name(S, usr)]'s laws:" - else if(isrobot(S)) + else if(iscyborg(S)) var/mob/living/silicon/robot/R = S usr << "CYBORG [key_name(S, usr)] [R.connected_ai?"(Slaved to: [R.connected_ai])":"(Independant)"]: laws:" else if (ispAI(S)) diff --git a/code/modules/admin/player_panel.dm b/code/modules/admin/player_panel.dm index 199e00dfd231..04c9ed14ae5e 100644 --- a/code/modules/admin/player_panel.dm +++ b/code/modules/admin/player_panel.dm @@ -244,7 +244,7 @@ M_job = "AI" else if(ispAI(M)) M_job = "pAI" - else if(isrobot(M)) + else if(iscyborg(M)) M_job = "Cyborg" else M_job = "Silicon-based" diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 9df8084a3b81..613e28ff4efb 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -1929,7 +1929,7 @@ switch(where) if("inhand") - if (!iscarbon(usr) && !isrobot(usr)) + if (!iscarbon(usr) && !iscyborg(usr)) usr << "Can only spawn in hand when you're a carbon mob or cyborg." where = "onfloor" target = usr @@ -1972,7 +1972,7 @@ var/mob/living/L = usr var/obj/item/I = O L.put_in_hands(I) - if(isrobot(L)) + if(iscyborg(L)) var/mob/living/silicon/robot/R = L if(R.module) R.module.add_module(I) diff --git a/code/modules/admin/verbs/buildmode.dm b/code/modules/admin/verbs/buildmode.dm index 16bd59b16848..53ba86ca1d56 100644 --- a/code/modules/admin/verbs/buildmode.dm +++ b/code/modules/admin/verbs/buildmode.dm @@ -244,20 +244,20 @@ if(BASIC_BUILDMODE) if(istype(object,/turf) && left_click && !alt_click && !ctrl_click) var/turf/T = object - if(istype(object,/turf/open/space)) + if(isspaceturf(object)) T.ChangeTurf(/turf/open/floor/plasteel) - else if(istype(object,/turf/open/floor)) + else if(isfloorturf(object)) T.ChangeTurf(/turf/closed/wall) - else if(istype(object,/turf/closed/wall)) + else if(iswallturf(object)) T.ChangeTurf(/turf/closed/wall/r_wall) log_admin("Build Mode: [key_name(user)] built [T] at ([T.x],[T.y],[T.z])") return else if(right_click) log_admin("Build Mode: [key_name(user)] deleted [object] at ([object.x],[object.y],[object.z])") - if(istype(object,/turf/closed/wall)) + if(iswallturf(object)) var/turf/T = object T.ChangeTurf(/turf/open/floor/plasteel) - else if(istype(object,/turf/open/floor)) + else if(isfloorturf(object)) var/turf/T = object T.ChangeTurf(/turf/open/space) else if(istype(object,/turf/closed/wall/r_wall)) diff --git a/code/modules/admin/verbs/diagnostics.dm b/code/modules/admin/verbs/diagnostics.dm index a69cc1df9dce..7d75d17956a5 100644 --- a/code/modules/admin/verbs/diagnostics.dm +++ b/code/modules/admin/verbs/diagnostics.dm @@ -8,7 +8,7 @@ var/datum/gas_mixture/GM = target.return_air() var/list/GM_gases var/burning = 0 - if(istype(target, /turf/open)) + if(isopenturf(target)) var/turf/open/T = target if(T.active_hotspot) burning = 1 diff --git a/code/modules/atmospherics/machinery/datum_pipeline.dm b/code/modules/atmospherics/machinery/datum_pipeline.dm index a4e0d60541bc..b01167128330 100644 --- a/code/modules/atmospherics/machinery/datum_pipeline.dm +++ b/code/modules/atmospherics/machinery/datum_pipeline.dm @@ -144,7 +144,7 @@ var/pipenetwarnings = 10 var/target_temperature var/target_heat_capacity - if(istype(target, /turf/open)) + if(isopenturf(target)) var/turf/open/modeled_location = target target_temperature = modeled_location.GetTemperature() diff --git a/code/modules/events/wizard/curseditems.dm b/code/modules/events/wizard/curseditems.dm index 5d0bc33b168c..cb0add4374d9 100644 --- a/code/modules/events/wizard/curseditems.dm +++ b/code/modules/events/wizard/curseditems.dm @@ -38,7 +38,7 @@ ruins_wizard_loadout = 1 for(var/mob/living/carbon/human/H in living_mob_list) - if(ruins_spaceworthiness && (H.z != 1 || istype(H.loc, /turf/open/space) || isplasmaman(H))) + if(ruins_spaceworthiness && (H.z != 1 || isspaceturf(H.loc) || isplasmaman(H))) continue //#savetheminers if(ruins_wizard_loadout && H.mind && ((H.mind in ticker.mode.wizards) || (H.mind in ticker.mode.apprentices))) continue diff --git a/code/modules/food_and_drinks/drinks/drinks.dm b/code/modules/food_and_drinks/drinks/drinks.dm index 05a4b68164b0..cc98c437146d 100644 --- a/code/modules/food_and_drinks/drinks/drinks.dm +++ b/code/modules/food_and_drinks/drinks/drinks.dm @@ -74,7 +74,7 @@ var/trans = src.reagents.trans_to(target, amount_per_transfer_from_this) user << "You transfer [trans] units of the solution to [target]." - if(isrobot(user)) //Cyborg modules that include drinks automatically refill themselves, but drain the borg's cell + if(iscyborg(user)) //Cyborg modules that include drinks automatically refill themselves, but drain the borg's cell var/mob/living/silicon/robot/bro = user bro.cell.use(30) addtimer(reagents, "add_reagent", 600, FALSE, refill, trans) diff --git a/code/modules/holiday/easter.dm b/code/modules/holiday/easter.dm index a75446b667e2..fbe73113f1ae 100644 --- a/code/modules/holiday/easter.dm +++ b/code/modules/holiday/easter.dm @@ -29,7 +29,7 @@ for(var/obj/effect/landmark/R in landmarks_list) if(R.name != "blobspawn") if(prob(35)) - if(istype(R.loc,/turf/open/space)) + if(isspaceturf(R.loc)) new /mob/living/simple_animal/chicken/rabbit/space(R.loc) else new /mob/living/simple_animal/chicken/rabbit(R.loc) diff --git a/code/modules/holodeck/area_copy.dm b/code/modules/holodeck/area_copy.dm index 3f31cddf91d0..67e55144f486 100644 --- a/code/modules/holodeck/area_copy.dm +++ b/code/modules/holodeck/area_copy.dm @@ -76,7 +76,7 @@ continue if(platingRequired) - if(istype(B, /turf/open/space)) + if(isspaceturf(B)) continue var/old_dir1 = T.dir diff --git a/code/modules/holodeck/computer.dm b/code/modules/holodeck/computer.dm index c29ebfb5ea7f..0065687b1248 100644 --- a/code/modules/holodeck/computer.dm +++ b/code/modules/holodeck/computer.dm @@ -143,7 +143,7 @@ /obj/machinery/computer/holodeck/proc/floorcheck() for(var/turf/T in linked) - if(!T.intact || istype(T,/turf/open/space)) + if(!T.intact || isspaceturf(T)) return 0 return 1 diff --git a/code/modules/hydroponics/gene_modder.dm b/code/modules/hydroponics/gene_modder.dm index 4787f2829b0c..7e8a209857ee 100644 --- a/code/modules/hydroponics/gene_modder.dm +++ b/code/modules/hydroponics/gene_modder.dm @@ -66,7 +66,7 @@ return if(default_deconstruction_crowbar(I)) return - if(isrobot(user)) + if(iscyborg(user)) return if(istype(I, /obj/item/seeds)) diff --git a/code/modules/hydroponics/grown/kudzu.dm b/code/modules/hydroponics/grown/kudzu.dm index 04b48caa83a9..c431644831c9 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/open/space)) + if(isspaceturf(user.loc)) return var/turf/T = get_turf(src) message_admins("Kudzu planted by [key_name_admin(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 9dc0ab8f97c9..c974d1b9da3a 100644 --- a/code/modules/hydroponics/grown/mushrooms.dm +++ b/code/modules/hydroponics/grown/mushrooms.dm @@ -168,7 +168,7 @@ origin_tech = "biotech=4;programming=5" /obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/walkingmushroom/attack_self(mob/user) - if(istype(user.loc,/turf/open/space)) + if(isspaceturf(user.loc)) return var/mob/living/simple_animal/hostile/mushroom/M = new /mob/living/simple_animal/hostile/mushroom(user.loc) M.maxHealth += round(seed.endurance / 4) @@ -241,7 +241,7 @@ origin_tech = "biotech=4;plasmatech=6" /obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/glowshroom/attack_self(mob/user) - if(istype(user.loc,/turf/open/space)) + if(isspaceturf(user.loc)) return var/obj/structure/glowshroom/planted = new effect_path(user.loc) planted.delay = planted.delay - seed.production * 100 //So the delay goes DOWN with better stats instead of up. :I diff --git a/code/modules/hydroponics/grown/tomato.dm b/code/modules/hydroponics/grown/tomato.dm index f93cc1c6ad9e..30a20975fd51 100644 --- a/code/modules/hydroponics/grown/tomato.dm +++ b/code/modules/hydroponics/grown/tomato.dm @@ -124,7 +124,7 @@ ..() /obj/item/weapon/reagent_containers/food/snacks/grown/tomato/killer/attack_self(mob/user) - if(awakening || istype(user.loc,/turf/open/space)) + if(awakening || isspaceturf(user.loc)) return user << "You begin to awaken the Killer Tomato..." awakening = 1 diff --git a/code/modules/hydroponics/grown/towercap.dm b/code/modules/hydroponics/grown/towercap.dm index 96b40353db3f..a1c9b2fc2d69 100644 --- a/code/modules/hydroponics/grown/towercap.dm +++ b/code/modules/hydroponics/grown/towercap.dm @@ -134,7 +134,7 @@ /obj/structure/bonfire/proc/CheckOxygen() - if(istype(loc,/turf/open)) + if(isopenturf(loc)) var/turf/open/O = loc if(O.air) var/G = O.air.gases diff --git a/code/modules/mining/equipment.dm b/code/modules/mining/equipment.dm index b6bb55972503..076d1a7afe04 100644 --- a/code/modules/mining/equipment.dm +++ b/code/modules/mining/equipment.dm @@ -242,7 +242,7 @@ /obj/effect/resonance/proc/burst(turf/T) playsound(src,'sound/weapons/resonator_blast.ogg',50,1) - if(istype(T, /turf/closed/mineral)) + if(ismineralturf(T)) var/turf/closed/mineral/M = T M.gets_drilled(creator) for(var/mob/living/L in T) @@ -522,7 +522,7 @@ L.underlays += I hammer_synced.marked_image = I var/target_turf = get_turf(target) - if(istype(target_turf, /turf/closed/mineral)) + if(ismineralturf(target_turf)) var/turf/closed/mineral/M = target_turf PoolOrNew(/obj/effect/overlay/temp/kinetic_blast, M) M.gets_drilled(firer) diff --git a/code/modules/mining/lavaland/necropolis_chests.dm b/code/modules/mining/lavaland/necropolis_chests.dm index e53c101c9551..46f25ab3c4bc 100644 --- a/code/modules/mining/lavaland/necropolis_chests.dm +++ b/code/modules/mining/lavaland/necropolis_chests.dm @@ -794,7 +794,7 @@ addtimer(src, "aoe_burst", 0, FALSE, T, user) add_logs(user, target, "fired 3x3 blast at", src) else - if(istype(target, /turf/closed/mineral) && get_dist(user, target) < 6) //target is minerals, we can hit it(even if we can't see it) + if(ismineralturf(target) && get_dist(user, target) < 6) //target is minerals, we can hit it(even if we can't see it) addtimer(src, "cardinal_blasts", 0, FALSE, T, user) timer = world.time + cooldown_time else if(target in view(5, get_turf(user))) //if the target is in view, hit it diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm index 8eabc7877095..368f813f2822 100644 --- a/code/modules/mining/mine_turfs.dm +++ b/code/modules/mining/mine_turfs.dm @@ -73,7 +73,7 @@ var/path = pickweight(mineralSpawnChanceList) var/turf/T = ChangeTurf(path) - if(T && istype(T, /turf/closed/mineral)) + if(T && ismineralturf(T)) var/turf/closed/mineral/M = T M.mineralAmt = rand(1, 5) M.environment_type = src.environment_type @@ -358,7 +358,7 @@ /turf/open/floor/plating/asteroid/airless/cave/proc/SpawnFloor(turf/T) for(var/S in RANGE_TURFS(1, src)) var/turf/NT = S - if(!NT || istype(NT, /turf/open/space) || istype(NT.loc, /area/mine/explored) || istype(NT.loc, /area/lavaland/surface/outdoors/explored)) + if(!NT || isspaceturf(NT) || istype(NT.loc, /area/mine/explored) || istype(NT.loc, /area/lavaland/surface/outdoors/explored)) sanity = 0 break if(!sanity) @@ -400,7 +400,7 @@ P.playDigSound() if(do_after(user,P.digspeed, target = src)) - if(istype(src, /turf/closed/mineral)) + if(ismineralturf(src)) user << "You finish cutting into the rock." gets_drilled(user) feedback_add_details("pick_used_mining","[P.type]") @@ -715,7 +715,7 @@ for(var/i in 1 to 5) AM.pixel_y-- sleep(2) - if(isrobot(AM)) + if(iscyborg(AM)) var/mob/living/silicon/robot/S = AM qdel(S.mmi) qdel(AM) diff --git a/code/modules/mob/living/brain/MMI.dm b/code/modules/mob/living/brain/MMI.dm index 4979cbd6c7d5..32179d23f619 100644 --- a/code/modules/mob/living/brain/MMI.dm +++ b/code/modules/mob/living/brain/MMI.dm @@ -164,7 +164,7 @@ ..() /obj/item/device/mmi/Destroy() - if(isrobot(loc)) + if(iscyborg(loc)) var/mob/living/silicon/robot/borg = loc borg.mmi = null if(brainmob) 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 c9ef0237605b..8d155f8cecac 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm @@ -48,7 +48,7 @@ Doesn't work on other aliens/AI.*/ if(!silent) user << "Not enough plasma stored." return 0 - if(check_turf && (!isturf(user.loc) || istype(user.loc, /turf/open/space))) + if(check_turf && (!isturf(user.loc) || isspaceturf(user.loc))) if(!silent) user << "Bad place for a garden!" return 0 diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index a7b8bf933fbc..37921ac6d34e 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -432,7 +432,7 @@ /mob/living/movement_delay() . = ..() - if(istype(loc, /turf/open)) + if(isopenturf(loc)) var/turf/open/T = loc . += T.slowdown switch(m_intent) @@ -739,7 +739,7 @@ else if(istype(loc, /obj/structure/transit_tube_pod)) loc_temp = environment.temperature - else if(istype(get_turf(src), /turf/open/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 c4a68499d217..ccc15b42069f 100644 --- a/code/modules/mob/living/silicon/ai/life.dm +++ b/code/modules/mob/living/silicon/ai/life.dm @@ -47,7 +47,7 @@ /mob/living/silicon/ai/proc/lacks_power() var/turf/T = get_turf(src) var/area/A = get_area(src) - return !T || !A || ((!A.master.power_equip || istype(T, /turf/open/space)) && !is_type_in_list(src.loc, list(/obj/item, /obj/mecha))) + return !T || !A || ((!A.master.power_equip || isspaceturf(T)) && !is_type_in_list(loc, list(/obj/item, /obj/mecha))) /mob/living/silicon/ai/updatehealth() if(status_flags & GODMODE) @@ -88,7 +88,7 @@ var/turf/T = get_turf(src) var/area/AIarea = get_area(src) if(AIarea && AIarea.master.power_equip) - if(!istype(T, /turf/open/space)) + if(!isspaceturf(T)) ai_restore_power() return src << "Fault confirmed: missing external power. Shutting down main control system to save power." @@ -96,7 +96,7 @@ src << "Emergency control system online. Verifying connection to power network." sleep(50) T = get_turf(src) - if (istype(T, /turf/open/space)) + if(isspaceturf(T)) src << "Unable to verify! No power connection detected!" aiRestorePowerRoutine = POWER_RESTORATION_SEARCH_APC return @@ -123,7 +123,7 @@ aiRestorePowerRoutine = POWER_RESTORATION_SEARCH_APC return if(AIarea.master.power_equip) - if (!istype(T, /turf/open/space)) + if(!isspaceturf(T)) ai_restore_power() return switch(PRP) diff --git a/code/modules/mob/living/simple_animal/bot/cleanbot.dm b/code/modules/mob/living/simple_animal/bot/cleanbot.dm index d3cc4116ffb7..3b2130312341 100644 --- a/code/modules/mob/living/simple_animal/bot/cleanbot.dm +++ b/code/modules/mob/living/simple_animal/bot/cleanbot.dm @@ -98,7 +98,7 @@ return if(emagged == 2) //Emag functions - if(istype(loc, /turf/open)) + if(isopenturf(loc)) for(var/mob/living/carbon/victim in loc) if(victim != target) diff --git a/code/modules/mob/living/simple_animal/bot/floorbot.dm b/code/modules/mob/living/simple_animal/bot/floorbot.dm index 1d276b2bf3ba..7fe09e215331 100644 --- a/code/modules/mob/living/simple_animal/bot/floorbot.dm +++ b/code/modules/mob/living/simple_animal/bot/floorbot.dm @@ -187,10 +187,10 @@ if(!target && emagged < 2) if(targetdirection != null) //The bot is in line mode. var/turf/T = get_step(src, targetdirection) - if(istype(T, /turf/open/space)) //Check for space + if(isspaceturf(T)) //Check for space target = T process_type = LINE_SPACE_MODE - if(istype(T, /turf/open/floor)) //Check for floor + if(isfloorturf(T)) //Check for floor target = T if(!target) @@ -250,7 +250,7 @@ return if(istype(target, /turf/) && emagged < 2) repair(target) - else if(emagged == 2 && istype(target,/turf/open/floor)) + else if(emagged == 2 && isfloorturf(target)) var/turf/open/floor/F = target anchored = 1 mode = BOT_REPAIRING @@ -291,7 +291,7 @@ result = F if(REPLACE_TILE) F = scan_target - if(istype(F, /turf/open/floor) && !istype(F, /turf/open/floor/plating)) //The floor must already have a tile. + if(isfloorturf(F) && !istype(F, /turf/open/floor/plating)) //The floor must already have a tile. result = F if(FIX_TILE) //Selects only damaged floors. F = scan_target @@ -307,14 +307,14 @@ /mob/living/simple_animal/bot/floorbot/proc/repair(turf/target_turf) - if(istype(target_turf, /turf/open/space/)) + if(isspaceturf(target_turf)) //Must be a hull breach or in line mode to continue. if(!is_hull_breach(target_turf) && !targetdirection) target = null return - else if(!istype(target_turf, /turf/open/floor)) + else if(!isfloorturf(target_turf)) return - if(istype(target_turf, /turf/open/space/)) //If we are fixing an area not part of pure space, it is + if(isspaceturf(target_turf)) //If we are fixing an area not part of pure space, it is anchored = 1 icon_state = "floorbot-c" visible_message("[targetdirection ? "[src] begins installing a bridge plating." : "[src] begins to repair the hole."] ") diff --git a/code/modules/mob/living/simple_animal/friendly/dog.dm b/code/modules/mob/living/simple_animal/friendly/dog.dm index 40bda94fb41f..202f5ba29c06 100644 --- a/code/modules/mob/living/simple_animal/friendly/dog.dm +++ b/code/modules/mob/living/simple_animal/friendly/dog.dm @@ -113,7 +113,7 @@ //Removing from inventory if(href_list["remove_inv"]) - if(!Adjacent(usr) || !(ishuman(usr) || ismonkey(usr) || isrobot(usr) || isalienadult(usr))) + if(!Adjacent(usr) || !(ishuman(usr) || ismonkey(usr) || iscyborg(usr) || isalienadult(usr))) return var/remove_from = href_list["remove_inv"] switch(remove_from) @@ -140,7 +140,7 @@ //Adding things to inventory else if(href_list["add_inv"]) - if(!Adjacent(usr) || !(ishuman(usr) || ismonkey(usr) || isrobot(usr) || isalienadult(usr))) + if(!Adjacent(usr) || !(ishuman(usr) || ismonkey(usr) || iscyborg(usr) || isalienadult(usr))) return var/add_to = href_list["add_inv"] diff --git a/code/modules/mob/living/simple_animal/guardian/types/support.dm b/code/modules/mob/living/simple_animal/guardian/types/support.dm index a7a204af676f..041116b0a39b 100644 --- a/code/modules/mob/living/simple_animal/guardian/types/support.dm +++ b/code/modules/mob/living/simple_animal/guardian/types/support.dm @@ -76,7 +76,7 @@ return var/turf/beacon_loc = get_turf(src.loc) - if(!istype(beacon_loc, /turf/open/floor)) + if(!isfloorturf(beacon_loc)) return if(beacon) diff --git a/code/modules/mob/living/simple_animal/hostile/alien.dm b/code/modules/mob/living/simple_animal/hostile/alien.dm index 761530926410..6ed4d60229e5 100644 --- a/code/modules/mob/living/simple_animal/hostile/alien.dm +++ b/code/modules/mob/living/simple_animal/hostile/alien.dm @@ -108,7 +108,7 @@ LayEggs() /mob/living/simple_animal/hostile/alien/proc/SpreadPlants() - if(!isturf(loc) || istype(loc, /turf/open/space)) + if(!isturf(loc) || isspaceturf(loc)) return if(locate(/obj/structure/alien/weeds/node) in get_turf(src)) return @@ -116,7 +116,7 @@ new /obj/structure/alien/weeds/node(loc) /mob/living/simple_animal/hostile/alien/proc/LayEggs() - if(!isturf(loc) || istype(loc, /turf/open/space)) + if(!isturf(loc) || isspaceturf(loc)) return if(locate(/obj/structure/alien/egg) in get_turf(src)) return diff --git a/code/modules/mob/living/simple_animal/hostile/hostile.dm b/code/modules/mob/living/simple_animal/hostile/hostile.dm index f5c9269c0d94..4bee096b9f49 100644 --- a/code/modules/mob/living/simple_animal/hostile/hostile.dm +++ b/code/modules/mob/living/simple_animal/hostile/hostile.dm @@ -352,7 +352,7 @@ EscapeConfinement() for(var/dir in cardinal) var/turf/T = get_step(targets_from, dir) - if(istype(T, /turf/closed/wall) || istype(T, /turf/closed/mineral)) + if(iswallturf(T) || ismineralturf(T)) if(T.Adjacent(targets_from)) T.attack_animal(src) for(var/a in T) diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm index 83354cdfe633..85d6e6a72e45 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm @@ -496,7 +496,7 @@ Difficulty: Very Hard for(var/atom/Stuff in A) if(isturf(Stuff)) var/turf/T = Stuff - if((istype(T, /turf/open/space) || istype(T, /turf/open/floor)) && NewTerrainFloors) + if((isspaceturf(T) || isfloorturf(T)) && NewTerrainFloors) var/turf/open/O = T.ChangeTurf(NewTerrainFloors) if(O.air) var/datum/gas_mixture/G = O.air @@ -505,7 +505,7 @@ Difficulty: Very Hard var/atom/Picked = pick(NewFlora) new Picked(O) continue - if(istype(T, /turf/closed/wall) && NewTerrainWalls) + if(iswallturf(T) && NewTerrainWalls) T.ChangeTurf(NewTerrainWalls) continue if(istype(Stuff, /obj/structure/chair) && NewTerrainChairs) @@ -759,7 +759,7 @@ Difficulty: Very Hard sound = null /obj/effect/proc_holder/spell/targeted/exit_possession/cast(list/targets, mob/user = usr) - if(!istype(user.loc, /turf/open/floor)) + if(!isfloorturf(user.loc)) return var/datum/mind/target_mind = user.mind for(var/i in user) diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm index 37aa5575a9b7..7cbcaa090bf3 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm @@ -492,7 +492,7 @@ Difficulty: Hard friendly_fire_check = friendly_fire if(new_caster) hit_things += new_caster - if(istype(loc, /turf/closed/mineral)) //drill mineral turfs + if(ismineralturf(loc)) //drill mineral turfs var/turf/closed/mineral/M = loc M.gets_drilled(caster) addtimer(src, "blast", 0) diff --git a/code/modules/mob/living/simple_animal/hostile/mimic.dm b/code/modules/mob/living/simple_animal/hostile/mimic.dm index 1c0e9180207d..bb7c223fa9cd 100644 --- a/code/modules/mob/living/simple_animal/hostile/mimic.dm +++ b/code/modules/mob/living/simple_animal/hostile/mimic.dm @@ -199,7 +199,7 @@ var/global/list/protected_objects = list(/obj/structure/table, /obj/structure/ca /mob/living/simple_animal/hostile/mimic/copy/machine/CanAttack(atom/the_target) if(the_target == creator) // Don't attack our creator AI. return 0 - if(isrobot(the_target)) + if(iscyborg(the_target)) var/mob/living/silicon/robot/R = the_target if(R.connected_ai == creator) // Only attack robots that aren't synced to our creator AI. return 0 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 de6056ca76e2..3478fff7ad05 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm @@ -483,7 +483,7 @@ /obj/effect/goliath_tentacle/New() var/turftype = get_turf(src) - if(istype(turftype, /turf/closed/mineral)) + if(ismineralturf(turftype)) var/turf/closed/mineral/M = turftype M.gets_drilled() addtimer(src, "Trip", 10) @@ -987,7 +987,7 @@ /mob/living/simple_animal/hostile/spawner/lavaland/New() ..() for(var/F in RANGE_TURFS(1, src)) - if(istype(F, /turf/closed/mineral)) + if(ismineralturf(F)) var/turf/closed/mineral/M = F M.ChangeTurf(M.turf_type) gps = new /obj/item/device/gps/internal(src) diff --git a/code/modules/mob/living/simple_animal/hostile/tree.dm b/code/modules/mob/living/simple_animal/hostile/tree.dm index e7a4dbb6f82b..fb9e9fc3c6f6 100644 --- a/code/modules/mob/living/simple_animal/hostile/tree.dm +++ b/code/modules/mob/living/simple_animal/hostile/tree.dm @@ -41,7 +41,7 @@ /mob/living/simple_animal/hostile/tree/Life() ..() - if(istype(src.loc, /turf/open)) + if(isopenturf(loc)) var/turf/open/T = src.loc if(T.air && T.air.gases["co2"]) var/co2 = T.air.gases["co2"][MOLES] diff --git a/code/modules/mob/living/simple_animal/parrot.dm b/code/modules/mob/living/simple_animal/parrot.dm index ebe6e3352555..e1528dea4efe 100644 --- a/code/modules/mob/living/simple_animal/parrot.dm +++ b/code/modules/mob/living/simple_animal/parrot.dm @@ -199,7 +199,7 @@ return //Is the usr's mob type able to do this? (lolaliens) - if(ishuman(usr) || ismonkey(usr) || isrobot(usr) || isalienadult(usr)) + if(ishuman(usr) || ismonkey(usr) || iscyborg(usr) || isalienadult(usr)) //Removing from inventory if(href_list["remove_inv"]) diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index c0113b19c588..5d571abf6549 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -199,7 +199,7 @@ //world << "changed from [bodytemperature] by [diff] to [bodytemperature + diff]" bodytemperature += diff - if(istype(T,/turf/open)) + if(isopenturf(T)) var/turf/open/ST = T if(ST.air) var/ST_gases = ST.air.gases diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index e59f4708e90e..766cc83f1b74 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -318,7 +318,7 @@ It's fairly easy to fix if dealing with single letters but not so much with comp if(hud_used && hud_used.action_intent) hud_used.action_intent.icon_state = "[a_intent]" - else if(isrobot(src) || ismonkey(src) || islarva(src)) + else if(iscyborg(src) || ismonkey(src) || islarva(src)) switch(input) if("help") a_intent = "help" @@ -342,7 +342,7 @@ It's fairly easy to fix if dealing with single letters but not so much with comp if(!istype(M)) return 0 if(issilicon(M)) - if(isrobot(M)) //For cyborgs, returns 1 if the cyborg has a law 0 and special_role. Returns 0 if the borg is merely slaved to an AI traitor. + if(iscyborg(M)) //For cyborgs, returns 1 if the cyborg has a law 0 and special_role. Returns 0 if the borg is merely slaved to an AI traitor. var/mob/living/silicon/robot/R = M if(R.mind && R.mind.special_role) if(R.laws && R.laws.zeroth && R.syndicate) diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm index 25df31320da9..d52bdf07aa0a 100644 --- a/code/modules/mob/mob_movement.dm +++ b/code/modules/mob/mob_movement.dm @@ -85,7 +85,7 @@ /client/verb/drop_item() set hidden = 1 - if(!isrobot(mob)) + if(!iscyborg(mob)) mob.drop_item_v() return @@ -283,7 +283,7 @@ continue else if(isturf(A)) var/turf/turf = A - if(istype(turf,/turf/open/space)) + if(isspaceturf(turf)) continue if(!turf.density && !mob_negates_gravity()) continue diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index e947d24c1a77..570ceb1e4a65 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -304,7 +304,7 @@ var/mob/living/character = create_character() //creates the human and transfers vars and mind var/equip = SSjob.EquipRank(character, rank, 1) - if(isrobot(equip)) //Borgs get borged in the equip, so we need to make sure we handle the new mob. + if(iscyborg(equip)) //Borgs get borged in the equip, so we need to make sure we handle the new mob. character = equip diff --git a/code/modules/paperwork/handlabeler.dm b/code/modules/paperwork/handlabeler.dm index 963e094e8459..ab809e089f7d 100644 --- a/code/modules/paperwork/handlabeler.dm +++ b/code/modules/paperwork/handlabeler.dm @@ -96,7 +96,7 @@ /obj/item/weapon/hand_labeler/borg/afterattack(atom/A, mob/user, proximity) ..(A, user, proximity) - if(!isrobot(user)) + if(!iscyborg(user)) return var/mob/living/silicon/robot/borgy = user diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm index 5ec6076deb06..c43dcda5bb9a 100644 --- a/code/modules/paperwork/photography.dm +++ b/code/modules/paperwork/photography.dm @@ -411,7 +411,7 @@ qdel(P) //so 10 thousand picture items are not left in memory should an AI take them and then view them all /obj/item/device/camera/siliconcam/proc/viewpictures(user) - if(isrobot(user)) // Cyborg + if(iscyborg(user)) // Cyborg var/mob/living/silicon/robot/C = src.loc var/obj/item/device/camera/siliconcam/Cinfo if(C.connected_ai) diff --git a/code/modules/power/power.dm b/code/modules/power/power.dm index b2450fa28f30..46bd4b9dc0aa 100644 --- a/code/modules/power/power.dm +++ b/code/modules/power/power.dm @@ -117,7 +117,7 @@ if(istype(W, /obj/item/stack/cable_coil)) var/obj/item/stack/cable_coil/coil = W var/turf/T = user.loc - if(T.intact || !istype(T, /turf/open/floor)) + if(T.intact || !isfloorturf(T)) return if(get_dist(src, user) > 1) return diff --git a/code/modules/power/supermatter/supermatter.dm b/code/modules/power/supermatter/supermatter.dm index d14f1af8735b..cb765e76f403 100644 --- a/code/modules/power/supermatter/supermatter.dm +++ b/code/modules/power/supermatter/supermatter.dm @@ -94,7 +94,7 @@ if(!istype(T)) //We are in a crate or somewhere that isn't turf, if we return to turf resume processing but for now. return //Yeah just stop. - if(istype(T, /turf/open/space)) // Stop processing this stuff if we've been ejected. + if(isspaceturf(T)) // Stop processing this stuff if we've been ejected. return if(damage > warning_point) // while the core is still damaged and it's still worth noting its status @@ -243,7 +243,7 @@ return(gain) /obj/machinery/power/supermatter_shard/blob_act(obj/structure/blob/B) - if(B && !istype(loc, /turf/open/space)) //does nothing in space + if(B && !isspaceturf(loc)) //does nothing in space playsound(get_turf(src), 'sound/effects/supermatter.ogg', 50, 1) damage += B.health * 0.5 //take damage equal to 50% of remaining blob health before it tried to eat us if(B.health > 100) diff --git a/code/modules/procedural_mapping/mapGeneratorModule.dm b/code/modules/procedural_mapping/mapGeneratorModule.dm index 33ff0ee2235e..0ad35adddba0 100644 --- a/code/modules/procedural_mapping/mapGeneratorModule.dm +++ b/code/modules/procedural_mapping/mapGeneratorModule.dm @@ -114,7 +114,7 @@ if(A.density) . = 0 break - if(!allowAtomsOnSpace && (istype(T,/turf/open/space))) + if(!allowAtomsOnSpace && (isspaceturf(T))) . = 0 diff --git a/code/modules/projectiles/guns/energy.dm b/code/modules/projectiles/guns/energy.dm index f729b9966cf6..f9c488f96289 100644 --- a/code/modules/projectiles/guns/energy.dm +++ b/code/modules/projectiles/guns/energy.dm @@ -155,7 +155,7 @@ return (OXYLOSS) /obj/item/weapon/gun/energy/proc/robocharge() - if(isrobot(src.loc)) + if(iscyborg(src.loc)) var/mob/living/silicon/robot/R = src.loc if(R && R.cell) var/obj/item/ammo_casing/energy/shot = ammo_type[select] //Necessary to find cost of shot diff --git a/code/modules/projectiles/guns/energy/kinetic_accelerator.dm b/code/modules/projectiles/guns/energy/kinetic_accelerator.dm index bb586419f9be..bf4a0dc30913 100644 --- a/code/modules/projectiles/guns/energy/kinetic_accelerator.dm +++ b/code/modules/projectiles/guns/energy/kinetic_accelerator.dm @@ -182,7 +182,7 @@ var/turf/target_turf = get_turf(target) if(!target_turf) target_turf = get_turf(src) - if(istype(target_turf, /turf/closed/mineral)) + if(ismineralturf(target_turf)) var/turf/closed/mineral/M = target_turf M.gets_drilled(firer) var/obj/effect/overlay/temp/kinetic_blast/K = PoolOrNew(/obj/effect/overlay/temp/kinetic_blast, target_turf) @@ -191,7 +191,7 @@ PoolOrNew(type, target_turf) if(turf_aoe) for(var/T in RANGE_TURFS(1, target_turf) - target_turf) - if(istype(T, /turf/closed/mineral)) + if(ismineralturf(T)) var/turf/closed/mineral/M = T M.gets_drilled(firer) if(mob_aoe) diff --git a/code/modules/projectiles/projectile/magic.dm b/code/modules/projectiles/projectile/magic.dm index 9b94ffd17f54..8bb247ed06b3 100644 --- a/code/modules/projectiles/projectile/magic.dm +++ b/code/modules/projectiles/projectile/magic.dm @@ -126,7 +126,7 @@ OpenDoor(target) else var/turf/T = get_turf(target) - if(istype(T,/turf/closed) && !istype(T, /turf/closed/indestructible)) + if(isclosedturf(T) && !istype(T, /turf/closed/indestructible)) CreateDoor(T) /obj/item/projectile/magic/door/proc/CreateDoor(turf/T) diff --git a/code/modules/projectiles/projectile/special.dm b/code/modules/projectiles/projectile/special.dm index 6a991950ff02..e9aa3a99e7f7 100644 --- a/code/modules/projectiles/projectile/special.dm +++ b/code/modules/projectiles/projectile/special.dm @@ -184,7 +184,7 @@ /obj/item/projectile/plasma/on_hit(atom/target) . = ..() - if(istype(target, /turf/closed/mineral)) + if(ismineralturf(target)) var/turf/closed/mineral/M = target M.gets_drilled(firer) Range() diff --git a/code/modules/reagents/chemistry/reagents/drug_reagents.dm b/code/modules/reagents/chemistry/reagents/drug_reagents.dm index 939f77472cf4..50058e1d2304 100644 --- a/code/modules/reagents/chemistry/reagents/drug_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/drug_reagents.dm @@ -12,7 +12,7 @@ /datum/reagent/drug/space_drugs/on_mob_life(mob/living/M) M.set_drugginess(15) - if(isturf(M.loc) && !istype(M.loc, /turf/open/space)) + if(isturf(M.loc) && !isspaceturf(M.loc)) if(M.canmove) if(prob(10)) step(M, pick(cardinal)) if(prob(7)) diff --git a/code/modules/reagents/chemistry/reagents/food_reagents.dm b/code/modules/reagents/chemistry/reagents/food_reagents.dm index 08489d37e46f..a74eef6c892b 100644 --- a/code/modules/reagents/chemistry/reagents/food_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/food_reagents.dm @@ -161,7 +161,7 @@ for(var/mob/living/simple_animal/slime/M in T) M.adjustToxLoss(rand(15,30)) if(reac_volume >= 1) // Make Freezy Foam and anti-fire grenades! - if(istype(T, /turf/open)) + if(isopenturf(T)) var/turf/open/OT = T OT.MakeSlippery(wet_setting=TURF_WET_ICE, min_wet_time=10, wet_time_to_add=reac_volume) // Is less effective in high pressure/high heat capacity environments. More effective in low pressure. OT.air.temperature -= MOLES_CELLSTANDARD*100*reac_volume/OT.air.heat_capacity() // reduces environment temperature by 5K per unit. @@ -392,7 +392,7 @@ color = "#FFFFFF" // rgb: 0, 0, 0 /datum/reagent/consumable/flour/reaction_turf(turf/T, reac_volume) - if(!istype(T, /turf/open/space)) + if(!isspaceturf(T)) var/obj/effect/decal/cleanable/reagentdecal = new/obj/effect/decal/cleanable/flour(T) reagentdecal.reagents.add_reagent("flour", reac_volume) diff --git a/code/modules/reagents/chemistry/reagents/other_reagents.dm b/code/modules/reagents/chemistry/reagents/other_reagents.dm index 4bc44632e0ff..ad66832f718e 100644 --- a/code/modules/reagents/chemistry/reagents/other_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/other_reagents.dm @@ -119,7 +119,7 @@ M.apply_water() var/obj/effect/hotspot/hotspot = (locate(/obj/effect/hotspot) in T) - if(hotspot && !istype(T, /turf/open/space)) + if(hotspot && !isspaceturf(T)) if(T.air) var/datum/gas_mixture/G = T.air G.temperature = max(min(G.temperature-(CT*1000),G.temperature/CT),0) @@ -500,7 +500,7 @@ color = "#484848" // rgb: 72, 72, 72 /datum/reagent/mercury/on_mob_life(mob/living/M) - if(M.canmove && istype(M.loc, /turf/open/space)) + if(M.canmove && isspaceturf(M.loc)) step(M, pick(cardinal)) if(prob(5)) M.emote(pick("twitch","drool","moan")) @@ -522,7 +522,7 @@ color = "#1C1300" // rgb: 30, 20, 0 /datum/reagent/carbon/reaction_turf(turf/T, reac_volume) - if(!istype(T, /turf/open/space)) + if(!isspaceturf(T)) var/obj/effect/decal/cleanable/dirt/D = locate() in T.contents if(!D) new /obj/effect/decal/cleanable/dirt(T) @@ -573,7 +573,7 @@ color = "#808080" // rgb: 128, 128, 128 /datum/reagent/lithium/on_mob_life(mob/living/M) - if(M.canmove && istype(M.loc, /turf/open/space)) + if(M.canmove && isspaceturf(M.loc)) step(M, pick(cardinal)) if(prob(5)) M.emote(pick("twitch","drool","moan")) @@ -598,7 +598,7 @@ /datum/reagent/radium/reaction_turf(turf/T, reac_volume) if(reac_volume >= 3) - if(!istype(T, /turf/open/space)) + if(!isspaceturf(T)) var/obj/effect/decal/cleanable/greenglow/GG = locate() in T.contents if(!GG) GG = new/obj/effect/decal/cleanable/greenglow(T) @@ -676,7 +676,7 @@ /datum/reagent/uranium/reaction_turf(turf/T, reac_volume) if(reac_volume >= 3) - if(!istype(T, /turf/open/space)) + if(!isspaceturf(T)) var/obj/effect/decal/cleanable/greenglow/GG = locate() in T.contents if(!GG) GG = new/obj/effect/decal/cleanable/greenglow(T) diff --git a/code/modules/reagents/chemistry/reagents/pyrotechnic_reagents.dm b/code/modules/reagents/chemistry/reagents/pyrotechnic_reagents.dm index d2958b475da5..5c8d19cb960f 100644 --- a/code/modules/reagents/chemistry/reagents/pyrotechnic_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/pyrotechnic_reagents.dm @@ -7,7 +7,7 @@ color = "#550000" /datum/reagent/thermite/reaction_turf(turf/T, reac_volume) - if(reac_volume >= 1 && istype(T, /turf/closed/wall)) + if(reac_volume >= 1 && iswallturf(T)) var/turf/closed/wall/Wall = T if(istype(Wall, /turf/closed/wall/r_wall)) Wall.thermite = Wall.thermite+(reac_volume*2.5) @@ -54,17 +54,17 @@ var/turf/open/floor/plating/F = T if(prob(10 + F.burnt + 5*F.broken)) //broken or burnt plating is more susceptible to being destroyed F.ChangeTurf(F.baseturf) - if(istype(T, /turf/open/floor/)) + if(isfloorturf(T)) var/turf/open/floor/F = T if(prob(reac_volume)) F.make_plating() else if(prob(reac_volume)) F.burn_tile() - if(istype(F, /turf/open/floor/)) + if(isfloorturf(F)) for(var/turf/turf in range(1,F)) if(!locate(/obj/effect/hotspot) in turf) PoolOrNew(/obj/effect/hotspot, F) - if(istype(T, /turf/closed/wall/)) + if(iswallturf(T)) var/turf/closed/wall/W = T if(prob(reac_volume)) W.ChangeTurf(/turf/open/floor/plating) diff --git a/code/modules/reagents/reagent_containers/borghydro.dm b/code/modules/reagents/reagent_containers/borghydro.dm index 735d0e13cca8..a9057ac6f19d 100644 --- a/code/modules/reagents/reagent_containers/borghydro.dm +++ b/code/modules/reagents/reagent_containers/borghydro.dm @@ -74,7 +74,7 @@ Borg Hypospray R.add_reagent(reagent, 30) /obj/item/weapon/reagent_containers/borghypo/proc/regenerate_reagents() - if(isrobot(src.loc)) + if(iscyborg(src.loc)) var/mob/living/silicon/robot/R = src.loc if(R && R.cell) for(var/i in 1 to reagent_ids.len) @@ -162,7 +162,7 @@ Borg Shaker return //Can't inject stuff with a shaker, can we? //not with that attitude /obj/item/weapon/reagent_containers/borghypo/borgshaker/regenerate_reagents() - if(isrobot(src.loc)) + if(iscyborg(src.loc)) var/mob/living/silicon/robot/R = src.loc if(R && R.cell) for(var/i in modes) //Lots of reagents in this one, so it's best to regenrate them all at once to keep it from being tedious. diff --git a/code/modules/reagents/reagent_containers/hypospray.dm b/code/modules/reagents/reagent_containers/hypospray.dm index b258903653e5..9f959083c006 100644 --- a/code/modules/reagents/reagent_containers/hypospray.dm +++ b/code/modules/reagents/reagent_containers/hypospray.dm @@ -81,7 +81,7 @@ ..() update_icon() spawn(80) - if(isrobot(user) && !reagents.total_volume) + if(iscyborg(user) && !reagents.total_volume) var/mob/living/silicon/robot/R = user if(R.cell.use(100)) reagents.add_reagent_list(list_reagents) diff --git a/code/modules/recycling/conveyor2.dm b/code/modules/recycling/conveyor2.dm index c6fe91dace47..1969ece48306 100644 --- a/code/modules/recycling/conveyor2.dm +++ b/code/modules/recycling/conveyor2.dm @@ -297,7 +297,7 @@ id = C.id /obj/item/conveyor_construct/afterattack(atom/A, mob/user, proximity) - if(!proximity || user.stat || !istype(A, /turf/open/floor) || istype(A, /area/shuttle)) + if(!proximity || user.stat || !isfloorturf(A) || istype(A, /area/shuttle)) return var/cdir = get_dir(A, user) if(A == user.loc) @@ -321,7 +321,7 @@ id = rand() //this couldn't possibly go wrong /obj/item/conveyor_switch_construct/afterattack(atom/A, mob/user, proximity) - if(!proximity || user.stat || !istype(A, /turf/open/floor) || istype(A, /area/shuttle)) + if(!proximity || user.stat || !isfloorturf(A) || istype(A, /area/shuttle)) return var/found = 0 for(var/obj/machinery/conveyor/C in view()) diff --git a/code/modules/recycling/disposal-construction.dm b/code/modules/recycling/disposal-construction.dm index 6f41c5fb43b2..6c75044074b1 100644 --- a/code/modules/recycling/disposal-construction.dm +++ b/code/modules/recycling/disposal-construction.dm @@ -182,11 +182,11 @@ nicetype = "pipe" var/turf/T = loc - if(T.intact && istype(T, /turf/open/floor)) + if(T.intact && isfloorturf(T)) user << "You can only attach the [nicetype] if the floor plating is removed!" return - if(!ispipe && istype(T, /turf/closed/wall)) + if(!ispipe && iswallturf(T)) user << "You can't build [nicetype]s on walls, only disposal pipes!" return diff --git a/code/modules/recycling/disposal-structures.dm b/code/modules/recycling/disposal-structures.dm index e31ecf4beffc..528b8dce387d 100644 --- a/code/modules/recycling/disposal-structures.dm +++ b/code/modules/recycling/disposal-structures.dm @@ -228,7 +228,7 @@ // update the icon_state to reflect hidden status /obj/structure/disposalpipe/proc/update() var/turf/T = src.loc - hide(T.intact && !istype(T,/turf/open/space)) // space never hides pipes + hide(T.intact && !isspaceturf(T)) // space never hides pipes // hide called by levelupdate if turf intact status changes // change visibility status and force update of icon @@ -256,14 +256,14 @@ var/turf/target - if(istype(T, /turf/open/floor)) //intact floor, pop the tile + if(isfloorturf(T)) //intact floor, pop the tile var/turf/open/floor/myturf = T if(myturf.floor_tile) PoolOrNew(myturf.floor_tile, T) myturf.make_plating() if(direction) // direction is specified - if(istype(T, /turf/open/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/shuttle/shuttle.dm b/code/modules/shuttle/shuttle.dm index 76bc75f6128f..208672cc81ea 100644 --- a/code/modules/shuttle/shuttle.dm +++ b/code/modules/shuttle/shuttle.dm @@ -472,7 +472,7 @@ areaInstance.contents += T1 //copy over air - if(istype(T1, /turf/open)) + if(isopenturf(T1)) var/turf/open/Ts1 = T1 Ts1.copy_air_with_tile(T0) diff --git a/code/modules/station_goals/bsa.dm b/code/modules/station_goals/bsa.dm index fdc5247f4aaf..352831bbecec 100644 --- a/code/modules/station_goals/bsa.dm +++ b/code/modules/station_goals/bsa.dm @@ -99,7 +99,7 @@ x_max = x - 6 for(var/turf/T in block(locate(x_min,y-1,z),locate(x_max,y+1,z))) - if(T.density || istype(T, /turf/open/space)) + if(T.density || isspaceturf(T)) return FALSE return TRUE diff --git a/code/modules/station_goals/shield.dm b/code/modules/station_goals/shield.dm index 20f5a76f6d43..b82ee24952b9 100644 --- a/code/modules/station_goals/shield.dm +++ b/code/modules/station_goals/shield.dm @@ -139,7 +139,7 @@ /obj/machinery/satellite/meteor_shield/proc/space_los(meteor) for(var/turf/T in getline(src,meteor)) - if(!istype(T, /turf/open/space)) + if(!isspaceturf(T)) return FALSE return TRUE diff --git a/code/modules/surgery/surgery_step.dm b/code/modules/surgery/surgery_step.dm index dae2c7092e2f..620671718622 100644 --- a/code/modules/surgery/surgery_step.dm +++ b/code/modules/surgery/surgery_step.dm @@ -30,7 +30,7 @@ else user << "You need to expose [target]'s [parse_zone(target_zone)] to perform surgery on it!" return 1 //returns 1 so we don't stab the guy in the dick or wherever. - if(isrobot(user) && user.a_intent != "harm") //to save asimov borgs a LOT of heartache + if(iscyborg(user) && user.a_intent != "harm") //to save asimov borgs a LOT of heartache return 1 return 0 @@ -50,7 +50,7 @@ prob_chance = implements[implement_type] prob_chance *= surgery.get_propability_multiplier() - if(prob(prob_chance) || isrobot(user)) + if(prob(prob_chance) || iscyborg(user)) if(success(user, target, target_zone, tool, surgery)) advance = 1 else