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
This commit is contained in:
Joan Lung
2016-10-01 13:25:46 -04:00
committed by AnturK
parent d6ba32394c
commit bdcb16113a
145 changed files with 337 additions and 326 deletions

View File

@@ -4,13 +4,32 @@
#define in_range(source, user) (get_dist(source, user) <= 1) #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)) #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 isabductor(A) (is_species(A, /datum/species/abductor))
#define isgolem(A) (is_species(A, /datum/species/golem)) #define isgolem(A) (is_species(A, /datum/species/golem))
#define islizard(A) (is_species(A, /datum/species/lizard)) #define islizard(A) (is_species(A, /datum/species/lizard))
@@ -22,80 +41,78 @@
#define iszombie(A) (is_species(A, /datum/species/zombie)) #define iszombie(A) (is_species(A, /datum/species/zombie))
#define ishumanbasic(A) (is_species(A, /datum/species/human)) #define ishumanbasic(A) (is_species(A, /datum/species/human))
//more carbon mobs
#define ismonkey(A) (istype(A, /mob/living/carbon/monkey)) #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 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 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 iscyborg(A) (istype(A, /mob/living/silicon/robot))
#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 isAI(A) (istype(A, /mob/living/silicon/ai)) #define isAI(A) (istype(A, /mob/living/silicon/ai))
#define ispAI(A) (istype(A, /mob/living/silicon/pai)) #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 isobserver(A) (istype(A, /mob/dead/observer))
#define isnewplayer(A) (istype(A, /mob/new_player)) #define isnewplayer(A) (istype(A, /mob/new_player))
#define isovermind(A) (istype(A, /mob/camera/blob)) #define isovermind(A) (istype(A, /mob/camera/blob))
#define isdrone(A) (istype(A, /mob/living/simple_animal/drone)) //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 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))
#define islimb(A) (istype(A, /obj/item/bodypart)) #define islimb(A) (istype(A, /obj/item/bodypart))
#define isbot(A) (istype(A, /mob/living/simple_animal/bot)) #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))
#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
//Assemblies
#define isassembly(O) (istype(O, /obj/item/device/assembly)) #define isassembly(O) (istype(O, /obj/item/device/assembly))
#define isigniter(O) (istype(O, /obj/item/device/assembly/igniter)) #define isigniter(O) (istype(O, /obj/item/device/assembly/igniter))

View File

@@ -166,7 +166,7 @@
if(T && (T.density || T.smooth)) if(T && (T.density || T.smooth))
T = get_step(src, turn(adjacencies, 225)) 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) underlays += image('icons/turf/space.dmi', SPACE_ICON_STATE, layer=TURF_LAYER)
else if(T && !T.density && !T.smooth) else if(T && !T.density && !T.smooth)
underlays += T underlays += T

View File

@@ -133,7 +133,7 @@
if(isAI(usr)) if(isAI(usr))
var/mob/living/silicon/ai/AI = usr var/mob/living/silicon/ai/AI = usr
AI.aicamera.toggle_camera_mode() AI.aicamera.toggle_camera_mode()
else if(isrobot(usr)) else if(iscyborg(usr))
var/mob/living/silicon/robot/R = usr var/mob/living/silicon/robot/R = usr
R.aicamera.toggle_camera_mode() R.aicamera.toggle_camera_mode()
@@ -145,7 +145,7 @@
if(isAI(usr)) if(isAI(usr))
var/mob/living/silicon/ai/AI = usr var/mob/living/silicon/ai/AI = usr
AI.aicamera.viewpictures() AI.aicamera.viewpictures()
else if(isrobot(usr)) else if(iscyborg(usr))
var/mob/living/silicon/robot/R = usr var/mob/living/silicon/robot/R = usr
R.aicamera.viewpictures() R.aicamera.viewpictures()

View File

@@ -179,7 +179,7 @@
/datum/hud/proc/toggle_show_robot_modules() /datum/hud/proc/toggle_show_robot_modules()
if(!isrobot(mymob)) return if(!iscyborg(mymob)) return
var/mob/living/silicon/robot/R = mymob var/mob/living/silicon/robot/R = mymob
@@ -187,7 +187,7 @@
update_robot_modules_display() update_robot_modules_display()
/datum/hud/proc/update_robot_modules_display(mob/viewer) /datum/hud/proc/update_robot_modules_display(mob/viewer)
if(!isrobot(mymob)) return if(!iscyborg(mymob)) return
var/mob/living/silicon/robot/R = mymob var/mob/living/silicon/robot/R = mymob

View File

@@ -87,7 +87,7 @@ var/datum/subsystem/minimap/SSminimap
var/obj/obj var/obj/obj
var/list/obj_icons var/list/obj_icons
// Don't use icons for space, just add objects in space if they exist. // 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 obj = locate(/obj/structure/lattice/catwalk) in tile
if(obj) if(obj)
tile_icon = new /icon('icons/obj/smooth_structures/catwalk.dmi', "catwalk", SOUTH) tile_icon = new /icon('icons/obj/smooth_structures/catwalk.dmi', "catwalk", SOUTH)

View File

@@ -29,7 +29,7 @@ var/datum/subsystem/persistence/SSpersistence
var/list/free_satchels = list() 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 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) 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 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 break
@@ -60,7 +60,7 @@ var/datum/subsystem/persistence/SSpersistence
F.x = text2num(chosen_satchel[1]) F.x = text2num(chosen_satchel[1])
F.y = text2num(chosen_satchel[2]) F.y = text2num(chosen_satchel[2])
F.z = ZLEVEL_STATION 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) F.hide(1)
new path(F) new path(F)
return 1 return 1

View File

@@ -82,7 +82,7 @@ var/datum/subsystem/shuttle/SSshuttle
for(var/i in block(A, B)) for(var/i in block(A, B))
var/turf/T = i var/turf/T = i
// Only dying the "pure" space, not the transit tiles // 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 continue
if((T.x == A.x) || (T.x == B.x) || (T.y == A.y) || (T.y == B.y)) if((T.x == A.x) || (T.x == B.x) || (T.y == A.y) || (T.y == B.y))
T.color = "#ffff00" T.color = "#ffff00"

View File

@@ -46,7 +46,7 @@
owner.attack_log += "\[[time_stamp()]\] <span class='brass'>Has been converted to the cult of Ratvar!</span>" owner.attack_log += "\[[time_stamp()]\] <span class='brass'>Has been converted to the cult of Ratvar!</span>"
if(issilicon(owner)) if(issilicon(owner))
var/mob/living/silicon/S = owner var/mob/living/silicon/S = owner
if(isrobot(S) && !silent_update) if(iscyborg(S) && !silent_update)
S << "<span class='boldwarning'>You have been desynced from your master AI. In addition, your onboard camera is no longer active and your safeties have been disabled.</span>" S << "<span class='boldwarning'>You have been desynced from your master AI. In addition, your onboard camera is no longer active and your safeties have been disabled.</span>"
S << "<span class='heavy_brass'>You can communicate with other servants by using the Hierophant Network action button in the upper left.</span>" S << "<span class='heavy_brass'>You can communicate with other servants by using the Hierophant Network action button in the upper left.</span>"
else if(isbrain(owner) || isclockmob(owner)) 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 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)) if(issilicon(owner))
var/mob/living/silicon/S = owner var/mob/living/silicon/S = owner
if(isrobot(S)) if(iscyborg(S))
var/mob/living/silicon/robot/R = S var/mob/living/silicon/robot/R = S
R.UnlinkSelf() R.UnlinkSelf()
R.emagged = 1 R.emagged = 1
@@ -109,7 +109,7 @@
qdel(F) qdel(F)
if(issilicon(owner)) if(issilicon(owner))
var/mob/living/silicon/S = owner var/mob/living/silicon/S = owner
if(isrobot(S)) if(iscyborg(S))
var/mob/living/silicon/robot/R = S var/mob/living/silicon/robot/R = S
R.emagged = initial(R.emagged) R.emagged = initial(R.emagged)
S.make_laws() S.make_laws()
@@ -128,6 +128,6 @@
owner.mind.memory = "" //Not sure if there's a better way to do this owner.mind.memory = "" //Not sure if there's a better way to do this
owner.mind.special_role = null owner.mind.special_role = null
owner.attack_log += "\[[time_stamp()]\] <span class='brass'>Has renounced the cult of Ratvar!</span>" owner.attack_log += "\[[time_stamp()]\] <span class='brass'>Has renounced the cult of Ratvar!</span>"
if(isrobot(owner)) if(iscyborg(owner))
owner << "<span class='warning'>Despite your freedom from Ratvar's influence, you are still irreparably damaged and no longer possess certain functions such as AI linking.</span>" owner << "<span class='warning'>Despite your freedom from Ratvar's influence, you are still irreparably damaged and no longer possess certain functions such as AI linking.</span>"
..() ..()

View File

@@ -185,7 +185,7 @@
var/z = pick(zlevels) var/z = pick(zlevels)
var/random_location = locate(x,y,z) var/random_location = locate(x,y,z)
if(!(istype(random_location, /turf/open/floor))) if(!isfloorturf(random_location))
continue continue
var/turf/open/floor/F = random_location var/turf/open/floor/F = random_location
if(!F.air) if(!F.air)

View File

@@ -484,7 +484,7 @@
else else
user.take_bodypart_damage(2*force) user.take_bodypart_damage(2*force)
return return
if(isrobot(target)) if(iscyborg(target))
return ..() return ..()
if(!isliving(target)) if(!isliving(target))
return ..() return ..()

View File

@@ -353,7 +353,7 @@
if(!T || !isturf(T)) if(!T || !isturf(T))
T = get_turf(src) T = get_turf(src)
var/area/A = get_area(T) 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 return 0
else if(A && A.has_gravity) // Areas which always has gravity else if(A && A.has_gravity) // Areas which always has gravity
return 1 return 1

View File

@@ -355,7 +355,7 @@ var/list/blood_splatter_icons = list()
return 0 return 0
/atom/proc/isinspace() /atom/proc/isinspace()
if(istype(get_turf(src), /turf/open/space)) if(isspaceturf(get_turf(src)))
return 1 return 1
else else
return 0 return 0

View File

@@ -57,13 +57,13 @@
/datum/station_state/proc/count(count_territories) /datum/station_state/proc/count(count_territories)
for(var/turf/T in block(locate(1,1,1), locate(world.maxx,world.maxy,1))) 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)) if(!(T:burnt))
src.floor += 12 src.floor += 12
else else
src.floor += 1 src.floor += 1
if(istype(T, /turf/closed/wall)) if(iswallturf(T))
if(T:intact) if(T:intact)
src.wall += 2 src.wall += 2
else else

View File

@@ -180,7 +180,7 @@
return 0 return 0
else else
var/area/A = get_area(NewLoc) 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 return 0
loc = NewLoc loc = NewLoc
return 1 return 1

View File

@@ -194,7 +194,7 @@
src << "<span class='userdanger'>You have no core and are about to die! May you rest in peace.</span>" src << "<span class='userdanger'>You have no core and are about to die! May you rest in peace.</span>"
return return
var/area/A = get_area(T) var/area/A = get_area(T)
if(istype(T, /turf/open/space) || A && !A.blob_allowed) if(isspaceturf(T) || A && !A.blob_allowed)
src << "<span class='warning'>You cannot relocate your core here!</span>" src << "<span class='warning'>You cannot relocate your core here!</span>"
return return
if(!can_buy(80)) if(!can_buy(80))

View File

@@ -143,7 +143,7 @@
/obj/structure/blob/proc/ConsumeTile() /obj/structure/blob/proc/ConsumeTile()
for(var/atom/A in loc) for(var/atom/A in loc)
A.blob_act(src) 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 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 /obj/structure/blob/proc/blob_attack_animation(atom/A = null, controller) //visually attacks an atom
@@ -174,7 +174,7 @@
return 0 return 0
var/make_blob = TRUE //can we make a blob? 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 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 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

View File

@@ -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() /datum/clockwork_scripture/create_object/check_special_requirements()
var/turf/T = get_turf(invoker) var/turf/T = get_turf(invoker)
if(!space_allowed && istype(T, /turf/open/space)) if(!space_allowed && isspaceturf(T))
invoker << "<span class='warning'>You need solid ground to place this object!</span>" invoker << "<span class='warning'>You need solid ground to place this object!</span>"
return 0 return 0
if(one_per_tile && (locate(prevent_path) in T)) if(one_per_tile && (locate(prevent_path) in T))

View File

@@ -346,10 +346,10 @@
user << "<span class='warning'>You need one brass sheet to do this!</span>" user << "<span class='warning'>You need one brass sheet to do this!</span>"
return return
var/turf/T = get_turf(src) var/turf/T = get_turf(src)
if(istype(T, /turf/closed/wall)) if(iswallturf(T))
user << "<span class='warning'>There is already a wall present!</span>" user << "<span class='warning'>There is already a wall present!</span>"
return return
if(!istype(T, /turf/open/floor)) if(!isfloorturf(T))
user << "<span class='warning'>A floor must be present to build a [anchored ? "false ":""]wall!</span>" user << "<span class='warning'>A floor must be present to build a [anchored ? "false ":""]wall!</span>"
return return
if(locate(/obj/structure/falsewall) in T.contents) if(locate(/obj/structure/falsewall) in T.contents)

View File

@@ -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 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()) if(!Adjacent(user) || !src || qdeleted(src) || user.incapacitated())
return return
if(istype(Turf, /turf/open/space)) if(isspaceturf(Turf))
user << "<span class='warning'>You cannot scribe runes in space!</span>" user << "<span class='warning'>You cannot scribe runes in space!</span>"
return return
for(var/T in typesof(/obj/effect/rune)) for(var/T in typesof(/obj/effect/rune))

View File

@@ -404,7 +404,7 @@ var/list/teleport_runes = list()
return 1 return 1
/obj/effect/rune/convert/proc/do_sacrifice(mob/living/sacrificial, list/invokers) /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) for(var/M in invokers)
M << "<span class='cultitalic'>[sacrificial] is too greatly linked to the world! You need three acolytes!</span>" M << "<span class='cultitalic'>[sacrificial] is too greatly linked to the world! You need three acolytes!</span>"
log_game("Offer rune failed - not enough acolytes and target is living or sac target") 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) if(sacrifice_fulfilled)
M << "<span class='cultlarge'>\"Yes! This is the one I desire! You have done well.\"</span>" M << "<span class='cultlarge'>\"Yes! This is the one I desire! You have done well.\"</span>"
else else
if(ishuman(sacrificial) || isrobot(sacrificial)) if(ishuman(sacrificial) || iscyborg(sacrificial))
M << "<span class='cultlarge'>\"I accept this sacrifice.\"</span>" M << "<span class='cultlarge'>\"I accept this sacrifice.\"</span>"
else else
M << "<span class='cultlarge'>\"I accept this meager sacrifice.\"</span>" M << "<span class='cultlarge'>\"I accept this meager sacrifice.\"</span>"
@@ -435,7 +435,7 @@ var/list/teleport_runes = list()
stone.invisibility = 0 stone.invisibility = 0
if(sacrificial) if(sacrificial)
if(isrobot(sacrificial)) if(iscyborg(sacrificial))
playsound(sacrificial, 'sound/magic/Disable_Tech.ogg', 100, 1) playsound(sacrificial, 'sound/magic/Disable_Tech.ogg', 100, 1)
sacrificial.dust() //To prevent the MMI from remaining sacrificial.dust() //To prevent the MMI from remaining
else else

View File

@@ -258,7 +258,7 @@
var/area/usrarea = get_area(usr.loc) var/area/usrarea = get_area(usr.loc)
var/usrturf = get_turf(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 << "<span class='warning'>You can only use this on the station!</span>" usr << "<span class='warning'>You can only use this on the station!</span>"
return return

View File

@@ -372,7 +372,7 @@
for(var/n=1;n<4,n++) for(var/n=1;n<4,n++)
var/fail var/fail
var/turf/T = turfs[n] var/turf/T = turfs[n]
if(!istype(T, /turf/open/floor)) if(!isfloorturf(T))
fail = 1 fail = 1
var/datum/camerachunk/C = cameranet.getCameraChunk(T.x, T.y, T.z) var/datum/camerachunk/C = cameranet.getCameraChunk(T.x, T.y, T.z)
if(!C.visibleTurfs[T]) if(!C.visibleTurfs[T])

View File

@@ -29,7 +29,7 @@
var/turf/pickedstart var/turf/pickedstart
var/turf/pickedgoal var/turf/pickedgoal
var/max_i = 10//number of tries to spawn meteor. var/max_i = 10//number of tries to spawn meteor.
while (!istype(pickedstart, /turf/open/space)) while(!isspaceturf(pickedstart))
var/startSide = pick(cardinal) var/startSide = pick(cardinal)
pickedstart = spaceDebrisStartLoc(startSide, 1) pickedstart = spaceDebrisStartLoc(startSide, 1)
pickedgoal = spaceDebrisFinishLoc(startSide, 1) pickedgoal = spaceDebrisFinishLoc(startSide, 1)
@@ -114,7 +114,7 @@
var/turf/T = get_turf(loc) var/turf/T = get_turf(loc)
ram_turf(T) 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() get_hit()
/obj/effect/meteor/Destroy() /obj/effect/meteor/Destroy()
@@ -292,7 +292,7 @@
/obj/effect/meteor/meaty/ram_turf(turf/T) /obj/effect/meteor/meaty/ram_turf(turf/T)
if(!istype(T, /turf/open/space)) if(!isspaceturf(T))
new /obj/effect/decal/cleanable/blood(T) new /obj/effect/decal/cleanable/blood(T)
/obj/effect/meteor/meaty/Bump(atom/A) /obj/effect/meteor/meaty/Bump(atom/A)
@@ -310,7 +310,7 @@
..() ..()
/obj/effect/meteor/meaty/xeno/ram_turf(turf/T) /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) new /obj/effect/decal/cleanable/xenoblood(T)
//Station buster Tunguska //Station buster Tunguska

View File

@@ -392,7 +392,7 @@ Congratulations! You are now trained for xenobiology research!"}
if(!isabductor(user)) if(!isabductor(user))
return return
if(isrobot(target)) if(iscyborg(target))
..() ..()
return return

View File

@@ -257,14 +257,14 @@
/turf/closed/wall/swarmer_act(mob/living/simple_animal/hostile/swarmer/S) /turf/closed/wall/swarmer_act(mob/living/simple_animal/hostile/swarmer/S)
for(var/turf/T in range(1, src)) 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 << "<span class='warning'>Destroying this object has the potential to cause a hull breach. Aborting.</span>" S << "<span class='warning'>Destroying this object has the potential to cause a hull breach. Aborting.</span>"
return return
..() ..()
/obj/structure/window/swarmer_act(mob/living/simple_animal/hostile/swarmer/S) /obj/structure/window/swarmer_act(mob/living/simple_animal/hostile/swarmer/S)
for(var/turf/T in range(1, src)) 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 << "<span class='warning'>Destroying this object has the potential to cause a hull breach. Aborting.</span>" S << "<span class='warning'>Destroying this object has the potential to cause a hull breach. Aborting.</span>"
return return
..() ..()
@@ -482,7 +482,7 @@
if(!istype(L, /mob/living/simple_animal/hostile/swarmer)) if(!istype(L, /mob/living/simple_animal/hostile/swarmer))
playsound(loc,'sound/effects/snap.ogg',50, 1, -1) playsound(loc,'sound/effects/snap.ogg',50, 1, -1)
L.electrocute_act(0, src, 1, 1) L.electrocute_act(0, src, 1, 1)
if(isrobot(L)) if(iscyborg(L))
L.Weaken(5) L.Weaken(5)
qdel(src) qdel(src)
..() ..()

View File

@@ -284,7 +284,7 @@
if(!src) if(!src)
return return
var/turf/T = get_turf(src) var/turf/T = get_turf(src)
if(istype(T, /turf/closed)) if(isclosedturf(T))
src << "<span class='revenwarning'>You cannot use abilities from inside of a wall.</span>" src << "<span class='revenwarning'>You cannot use abilities from inside of a wall.</span>"
return 0 return 0
for(var/obj/O in T) for(var/obj/O in T)

View File

@@ -248,7 +248,7 @@
if(T.flags & NOJAUNT) if(T.flags & NOJAUNT)
T.flags -= NOJAUNT T.flags -= NOJAUNT
PoolOrNew(/obj/effect/overlay/temp/revenant, T) 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 var/turf/open/floor/floor = T
if(floor.intact && floor.floor_tile) if(floor.intact && floor.floor_tile)
PoolOrNew(floor.floor_tile, floor) PoolOrNew(floor.floor_tile, floor)

View File

@@ -136,7 +136,7 @@
/proc/near_camera(mob/living/M) /proc/near_camera(mob/living/M)
if (!isturf(M.loc)) if (!isturf(M.loc))
return 0 return 0
if(isrobot(M)) if(iscyborg(M))
var/mob/living/silicon/robot/R = M var/mob/living/silicon/robot/R = M
if(!(R.camera && R.camera.can_use()) && !cameranet.checkCameraVis(M)) if(!(R.camera && R.camera.can_use()) && !cameranet.checkCameraVis(M))
return 0 return 0

View File

@@ -27,7 +27,7 @@
if(!Adjacent(user)) if(!Adjacent(user))
user.unset_machine() user.unset_machine()
return return
else if(isrobot(user)) else if(iscyborg(user))
var/list/viewing = viewers(src) var/list/viewing = viewers(src)
if(!viewing.Find(user)) if(!viewing.Find(user))
user.unset_machine() user.unset_machine()
@@ -88,7 +88,7 @@
var/camera_fail = 0 var/camera_fail = 0
if(!C.can_use() || user.machine != src || user.eye_blind || user.incapacitated()) if(!C.can_use() || user.machine != src || user.eye_blind || user.incapacitated())
camera_fail = 1 camera_fail = 1
else if(isrobot(user)) else if(iscyborg(user))
var/list/viewing = viewers(src) var/list/viewing = viewers(src)
if(!viewing.Find(user)) if(!viewing.Find(user))
camera_fail = 1 camera_fail = 1

View File

@@ -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 (hclient.client.mob && hclient.client.mob.stat == 0 && hclient.client.mob.z == text2num(z))
if (isAI(hclient.client.mob)) return TRUE 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)) return (locate(/obj/machinery/computer/crew, range(world.view, hclient.client.mob))) || (locate(/obj/item/device/sensor_device, hclient.client.mob.contents))
else else
return (locate(/obj/machinery/computer/crew, range(1, hclient.client.mob))) || (locate(/obj/item/device/sensor_device, hclient.client.mob.contents)) return (locate(/obj/machinery/computer/crew, range(1, hclient.client.mob))) || (locate(/obj/item/device/sensor_device, hclient.client.mob.contents))

View File

@@ -71,7 +71,7 @@
user << "[src.current.name] selected for law changes." user << "[src.current.name] selected for law changes."
/obj/machinery/computer/upload/borg/can_upload_to(mob/living/silicon/robot/B) /obj/machinery/computer/upload/borg/can_upload_to(mob/living/silicon/robot/B)
if(!B || !isrobot(B)) if(!B || !iscyborg(B))
return 0 return 0
if(B.scrambledcodes || B.emagged) if(B.scrambledcodes || B.emagged)
return 0 return 0

View File

@@ -56,7 +56,7 @@
var/loc_display = "Unknown" var/loc_display = "Unknown"
var/mob/living/carbon/M = T.imp_in 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) var/turf/mob_loc = get_turf(M)
loc_display = mob_loc.loc loc_display = mob_loc.loc

View File

@@ -23,7 +23,7 @@
/obj/machinery/door/poddoor/shuttledock/proc/check() /obj/machinery/door/poddoor/shuttledock/proc/check()
var/turf/T = get_step(src, checkdir) var/turf/T = get_step(src, checkdir)
if(!istype(T,/turf/open/space)) if(!isspaceturf(T))
addtimer(src, "open", 0, TRUE) addtimer(src, "open", 0, TRUE)
else else
addtimer(src, "close", 0, TRUE) addtimer(src, "close", 0, TRUE)

View File

@@ -296,7 +296,7 @@ Class Procs:
/obj/machinery/attack_ai(mob/user) /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 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. 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) return attack_hand(user)

View File

@@ -116,7 +116,7 @@
update_icon() update_icon()
for(var/turf/target_tile in range(shield_range, src)) 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)) if(!(stat & BROKEN) || prob(33))
deployed_shields += new /obj/machinery/shield(target_tile) deployed_shields += new /obj/machinery/shield(target_tile)

View File

@@ -100,7 +100,7 @@
/obj/machinery/syndicatebomb/attackby(obj/item/I, mob/user, params) /obj/machinery/syndicatebomb/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weapon/wrench)) if(istype(I, /obj/item/weapon/wrench))
if(!anchored) if(!anchored)
if(!isturf(src.loc) || istype(src.loc, /turf/open/space)) if(!isturf(loc) || isspaceturf(loc))
user << "<span class='notice'>The bomb must be placed on solid ground to attach it.</span>" user << "<span class='notice'>The bomb must be placed on solid ground to attach it.</span>"
else else
user << "<span class='notice'>You firmly wrench the bomb to the floor.</span>" user << "<span class='notice'>You firmly wrench the bomb to the floor.</span>"

View File

@@ -138,7 +138,7 @@
else if(isAI(user)) else if(isAI(user))
var/mob/living/silicon/ai/U = user var/mob/living/silicon/ai/U = user
P = U.aiMulti 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)) if(istype(user.get_active_held_item(), /obj/item/device/multitool))
P = user.get_active_held_item() P = user.get_active_held_item()
return P return P

View File

@@ -120,10 +120,10 @@
//East //East
var/turf/east = locate(T.x + 1, T.y, T.z) 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) new /obj/machinery/conveyor/auto(east, WEST)
// West // West
var/turf/west = locate(T.x - 1, T.y, T.z) 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) new /obj/machinery/conveyor/auto(west, WEST)

View File

@@ -13,7 +13,7 @@
/obj/item/mecha_parts/mecha_equipment/drill/action(atom/target) /obj/item/mecha_parts/mecha_equipment/drill/action(atom/target)
if(!action_checks(target)) if(!action_checks(target))
return return
if(istype(target, /turf/open/space)) if(isspaceturf(target))
return return
if(isobj(target)) if(isobj(target))
var/obj/target_obj = target var/obj/target_obj = target

View File

@@ -216,14 +216,14 @@
switch(mode) switch(mode)
if(0) if(0)
if (istype(target, /turf/closed/wall)) if(iswallturf(target))
var/turf/closed/wall/W = target var/turf/closed/wall/W = target
occupant_message("Deconstructing [W]...") occupant_message("Deconstructing [W]...")
if(do_after_cooldown(W)) if(do_after_cooldown(W))
chassis.spark_system.start() chassis.spark_system.start()
W.ChangeTurf(/turf/open/floor/plating) W.ChangeTurf(/turf/open/floor/plating)
playsound(W, 'sound/items/Deconstruct.ogg', 50, 1) 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 var/turf/open/floor/F = target
occupant_message("Deconstructing [F]...") occupant_message("Deconstructing [F]...")
if(do_after_cooldown(target)) if(do_after_cooldown(target))
@@ -237,14 +237,14 @@
qdel(target) qdel(target)
playsound(target, 'sound/items/Deconstruct.ogg', 50, 1) playsound(target, 'sound/items/Deconstruct.ogg', 50, 1)
if(1) if(1)
if(istype(target, /turf/open/space)) if(isspaceturf(target))
var/turf/open/space/S = target var/turf/open/space/S = target
occupant_message("Building Floor...") occupant_message("Building Floor...")
if(do_after_cooldown(S)) if(do_after_cooldown(S))
S.ChangeTurf(/turf/open/floor/plating) S.ChangeTurf(/turf/open/floor/plating)
playsound(S, 'sound/items/Deconstruct.ogg', 50, 1) playsound(S, 'sound/items/Deconstruct.ogg', 50, 1)
chassis.spark_system.start() chassis.spark_system.start()
else if(istype(target, /turf/open/floor)) else if(isfloorturf(target))
var/turf/open/floor/F = target var/turf/open/floor/F = target
occupant_message("Building Wall...") occupant_message("Building Wall...")
if(do_after_cooldown(F)) if(do_after_cooldown(F))
@@ -252,7 +252,7 @@
playsound(F, 'sound/items/Deconstruct.ogg', 50, 1) playsound(F, 'sound/items/Deconstruct.ogg', 50, 1)
chassis.spark_system.start() chassis.spark_system.start()
if(2) if(2)
if(istype(target, /turf/open/floor)) if(isfloorturf(target))
occupant_message("Building Airlock...") occupant_message("Building Airlock...")
if(do_after_cooldown(target)) if(do_after_cooldown(target))
chassis.spark_system.start() chassis.spark_system.start()
@@ -386,7 +386,7 @@
last_piece = null last_piece = null
/obj/item/mecha_parts/mecha_equipment/cable_layer/proc/dismantleFloor(var/turf/new_turf) /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 var/turf/open/floor/T = new_turf
if(!istype(T, /turf/open/floor/plating)) if(!istype(T, /turf/open/floor/plating))
if(!T.broken && !T.burnt) if(!T.broken && !T.burnt)

View File

@@ -50,15 +50,15 @@
T.dump_contents() T.dump_contents()
qdel(target) qdel(target)
if(istype(target, /turf/closed/mineral)) if(ismineralturf(target))
var/turf/closed/mineral/M = target var/turf/closed/mineral/M = target
M.ChangeTurf(M.baseturf) M.ChangeTurf(M.baseturf)
if(istype(target, /turf/open/floor)) if(isfloorturf(target))
var/turf/open/floor/F = target var/turf/open/floor/F = target
F.ChangeTurf(F.baseturf) F.ChangeTurf(F.baseturf)
if(istype(target, /turf/closed/wall)) if(iswallturf(target))
var/turf/closed/wall/W = target var/turf/closed/wall/W = target
W.dismantle_wall(1) W.dismantle_wall(1)

View File

@@ -272,7 +272,7 @@ list(name = "- Carbon Dioxide", desc = " This informational poster teaches the v
if(!D) if(!D)
return 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 << "<span class='notice'>You place the poster!</span>" user << "<span class='notice'>You place the poster!</span>"
else else
D.roll_and_drop(temp_loc,D.official) D.roll_and_drop(temp_loc,D.official)

View File

@@ -157,7 +157,7 @@
var/blast = 0 var/blast = 0
/datum/effect_system/smoke_spread/freezing/proc/Chilled(atom/A) /datum/effect_system/smoke_spread/freezing/proc/Chilled(atom/A)
if(istype(A,/turf/open)) if(isopenturf(A))
var/turf/open/T = A var/turf/open/T = A
if(T.air) if(T.air)
var/datum/gas_mixture/G = T.air var/datum/gas_mixture/G = T.air

View File

@@ -133,7 +133,7 @@
//------- TURF FIRES ------- //------- TURF FIRES -------
if(T) 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! PoolOrNew(/obj/effect/hotspot, T) //Mostly for ambience!
if(dist > 0) if(dist > 0)
T.ex_act(dist) T.ex_act(dist)

View File

@@ -284,7 +284,7 @@ var/global/image/fire_overlay = image("icon" = 'icons/effects/fire.dmi', "icon_s
/obj/item/attack_ai(mob/user) /obj/item/attack_ai(mob/user)
if(istype(src.loc, /obj/item/weapon/robot_module)) if(istype(src.loc, /obj/item/weapon/robot_module))
//If the item is part of a cyborg module, equip it //If the item is part of a cyborg module, equip it
if(!isrobot(user)) if(!iscyborg(user))
return return
var/mob/living/silicon/robot/R = user var/mob/living/silicon/robot/R = user
if(!R.low_power_mode) //can't equip modules with an empty cell. if(!R.low_power_mode) //can't equip modules with an empty cell.

View File

@@ -16,7 +16,7 @@
return return
var/turf/loc = get_turf(usr) var/turf/loc = get_turf(usr)
var/area/A = loc.loc var/area/A = loc.loc
if(!istype(loc, /turf/open/floor)) if(!isfloorturf(loc))
usr << "<span class='warning'>You cannot place [src] on this spot!</span>" usr << "<span class='warning'>You cannot place [src] on this spot!</span>"
return return
if(A.requires_power == 0 || istype(A, /area/space)) if(A.requires_power == 0 || istype(A, /area/space))
@@ -51,7 +51,7 @@
if(istype(W, /obj/item/weapon/screwdriver)) if(istype(W, /obj/item/weapon/screwdriver))
// For camera-building borgs // For camera-building borgs
var/turf/T = get_step(get_turf(user), user.dir) var/turf/T = get_step(get_turf(user), user.dir)
if(istype(T, /turf/closed/wall)) if(iswallturf(T))
T.attackby(src, user, params) T.attackby(src, user, params)
var/metal_amt = round(materials[MAT_METAL]/MINERAL_MATERIAL_AMOUNT) var/metal_amt = round(materials[MAT_METAL]/MINERAL_MATERIAL_AMOUNT)

View File

@@ -710,7 +710,7 @@
/obj/item/toy/crayon/spraycan/borg/afterattack(atom/target,mob/user,proximity) /obj/item/toy/crayon/spraycan/borg/afterattack(atom/target,mob/user,proximity)
var/diff = ..() var/diff = ..()
if(!isrobot(user)) if(!iscyborg(user))
user << "<span class='notice'>How did you get this?</span>" user << "<span class='notice'>How did you get this?</span>"
qdel(src) qdel(src)
return FALSE return FALSE

View File

@@ -115,7 +115,7 @@
master.disrupt() master.disrupt()
/obj/effect/dummy/chameleon/relaymove(mob/user, direction) /obj/effect/dummy/chameleon/relaymove(mob/user, direction)
if(istype(loc, /turf/open/space) || !direction) if(isspaceturf(loc) || !direction)
return //No magical space movement! return //No magical space movement!
if(can_move) if(can_move)

View File

@@ -106,7 +106,7 @@
outmsg = "<span class='warning'>You fail to blind [C] by shining [src] at their eyes!</span>" outmsg = "<span class='warning'>You fail to blind [C] by shining [src] at their eyes!</span>"
//robots //robots
else if(isrobot(target)) else if(iscyborg(target))
var/mob/living/silicon/S = target var/mob/living/silicon/S = target
//20% chance to actually hit the sensors //20% chance to actually hit the sensors
if(prob(effectchance * diode.rating)) if(prob(effectchance * diode.rating))

View File

@@ -277,7 +277,7 @@
jobname = "AI" jobname = "AI"
// --- Cyborg --- // --- Cyborg ---
else if(isrobot(M)) else if(iscyborg(M))
var/mob/living/silicon/robot/B = M var/mob/living/silicon/robot/B = M
jobname = "[B.designation] Cyborg" jobname = "[B.designation] Cyborg"

View File

@@ -16,7 +16,7 @@
if(H.check_shields(0, "[M]'s [name]", src, MELEE_ATTACK)) if(H.check_shields(0, "[M]'s [name]", src, MELEE_ATTACK))
playsound(M, 'sound/weapons/Genhit.ogg', 50, 1) playsound(M, 'sound/weapons/Genhit.ogg', 50, 1)
return 0 return 0
if(isrobot(user)) if(iscyborg(user))
var/mob/living/silicon/robot/R = user var/mob/living/silicon/robot/R = user
if(!R.cell.use(charge_cost)) if(!R.cell.use(charge_cost))
return return
@@ -43,7 +43,7 @@
var/shockallowed = 0//Can it be a stunarm when emagged. Only PK borgs get this by default. 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) /obj/item/borg/cyborghug/attack_self(mob/living/user)
if(isrobot(user)) if(iscyborg(user))
var/mob/living/silicon/robot/P = user var/mob/living/silicon/robot/P = user
if(P.emagged&&shockallowed == 1) if(P.emagged&&shockallowed == 1)
if(mode < 3) if(mode < 3)
@@ -107,7 +107,7 @@
"<span class='danger'>You electrocute [M] with your touch!</span>") "<span class='danger'>You electrocute [M] with your touch!</span>")
M.update_canmove() M.update_canmove()
else else
if(!isrobot(M)) if(!iscyborg(M))
M.adjustFireLoss(10) M.adjustFireLoss(10)
user.visible_message("<span class='userdanger'>[user] shocks [M]!</span>", \ user.visible_message("<span class='userdanger'>[user] shocks [M]!</span>", \
"<span class='danger'>You shock [M]!</span>") "<span class='danger'>You shock [M]!</span>")
@@ -161,7 +161,7 @@
update_icon() update_icon()
/obj/item/borg/charger/afterattack(obj/item/target, mob/living/silicon/robot/user, proximity_flag) /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 return
if(mode == "draw") if(mode == "draw")
if(is_type_in_list(target, charge_machines)) if(is_type_in_list(target, charge_machines))
@@ -282,7 +282,7 @@
user << "<font color='red'>The device is still recharging!</font>" user << "<font color='red'>The device is still recharging!</font>"
return return
if(isrobot(user)) if(iscyborg(user))
var/mob/living/silicon/robot/R = user var/mob/living/silicon/robot/R = user
if(R.cell.charge < 1200) if(R.cell.charge < 1200)
user << "<font color='red'>You don't have enough charge to do this!</font>" user << "<font color='red'>You don't have enough charge to do this!</font>"
@@ -302,7 +302,7 @@
playsound(get_turf(src), 'sound/AI/harmalarm.ogg', 70, 3) playsound(get_turf(src), 'sound/AI/harmalarm.ogg', 70, 3)
cooldown = world.time + 200 cooldown = world.time + 200
log_game("[user.ckey]([user]) used a Cyborg Harm Alarm in ([user.x],[user.y],[user.z])") 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 var/mob/living/silicon/robot/R = user
R.connected_ai << "<br><span class='notice'>NOTICE - Peacekeeping 'HARM ALARM' used by: [user]</span><br>" R.connected_ai << "<br><span class='notice'>NOTICE - Peacekeeping 'HARM ALARM' used by: [user]</span><br>"

View File

@@ -78,12 +78,6 @@
var/title as text var/title as text
var/can_build = 1 var/can_build = 1
can_build = can_build && (max_multiplier>0) 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) if (R.res_amount>1)
title+= "[R.res_amount]x [R.title]\s" title+= "[R.res_amount]x [R.title]\s"
else else
@@ -168,7 +162,7 @@
if (R.one_per_turf && (locate(R.result_type) in usr.loc)) if (R.one_per_turf && (locate(R.result_type) in usr.loc))
usr << "<span class='warning'>There is another [R.title] here!</span>" usr << "<span class='warning'>There is another [R.title] here!</span>"
return 0 return 0
if (R.on_floor && !istype(usr.loc, /turf/open/floor)) if(R.on_floor && !isfloorturf(usr.loc))
usr << "<span class='warning'>\The [R.title] must be constructed on the floor!</span>" usr << "<span class='warning'>\The [R.title] must be constructed on the floor!</span>"
return 0 return 0
return 1 return 1

View File

@@ -230,7 +230,7 @@ RCD
return ..() return ..()
/obj/item/weapon/rcd/attackby(obj/item/weapon/W, mob/user, params) /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 return
var/loaded = 0 var/loaded = 0
if(istype(W, /obj/item/weapon/rcd_ammo)) if(istype(W, /obj/item/weapon/rcd_ammo))
@@ -307,7 +307,7 @@ RCD
switch(mode) switch(mode)
if(1) if(1)
if(istype(A, /turf/open/space)) if(isspaceturf(A))
var/turf/open/space/S = A var/turf/open/space/S = A
if(useResource(floorcost, user)) if(useResource(floorcost, user))
user << "<span class='notice'>You start building floor...</span>" user << "<span class='notice'>You start building floor...</span>"
@@ -316,7 +316,7 @@ RCD
return 1 return 1
return 0 return 0
if(istype(A, /turf/open/floor)) if(isfloorturf(A))
var/turf/open/floor/F = A var/turf/open/floor/F = A
if(checkResource(wallcost, user)) if(checkResource(wallcost, user))
user << "<span class='notice'>You start building wall...</span>" user << "<span class='notice'>You start building wall...</span>"
@@ -330,7 +330,7 @@ RCD
return 0 return 0
if(2) if(2)
if(istype(A, /turf/open/floor)) if(isfloorturf(A))
if(checkResource(airlockcost, user)) if(checkResource(airlockcost, user))
var/door_check = 1 var/door_check = 1
for(var/obj/machinery/door/D in A) for(var/obj/machinery/door/D in A)
@@ -370,12 +370,12 @@ RCD
return 0 return 0
if(3) if(3)
if(istype(A, /turf/closed/wall)) if(iswallturf(A))
var/turf/closed/wall/W = A var/turf/closed/wall/W = A
if(istype(W, /turf/closed/wall/r_wall) && !canRturf) if(istype(W, /turf/closed/wall/r_wall) && !canRturf)
return 0 return 0
if(checkResource(deconwallcost, user)) if(checkResource(deconwallcost, user))
user << "<span class='notice'>You start deconstructing wall...</span>" user << "<span class='notice'>You start deconstructing [W]...</span>"
playsound(src.loc, 'sound/machines/click.ogg', 50, 1) playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
if(do_after(user, deconwalldelay, target = A)) if(do_after(user, deconwalldelay, target = A))
if(!useResource(deconwallcost, user)) return 0 if(!useResource(deconwallcost, user)) return 0
@@ -384,7 +384,7 @@ RCD
return 1 return 1
return 0 return 0
if(istype(A, /turf/open/floor)) if(isfloorturf(A))
var/turf/open/floor/F = A var/turf/open/floor/F = A
if(istype(F, /turf/open/floor/engine) && !canRturf) if(istype(F, /turf/open/floor/engine) && !canRturf)
return 0 return 0
@@ -435,7 +435,7 @@ RCD
return 0 return 0
if (4) if (4)
if(istype(A, /turf/open/floor)) if(isfloorturf(A))
if(checkResource(grillecost, user)) if(checkResource(grillecost, user))
if(locate(/obj/structure/grille) in A) if(locate(/obj/structure/grille) in A)
user << "<span class='warning'>There is already a grille there!</span>" user << "<span class='warning'>There is already a grille there!</span>"
@@ -504,7 +504,7 @@ RCD
canRturf = 1 canRturf = 1
/obj/item/weapon/rcd/borg/useResource(amount, mob/user) /obj/item/weapon/rcd/borg/useResource(amount, mob/user)
if(!isrobot(user)) if(!iscyborg(user))
return 0 return 0
var/mob/living/silicon/robot/borgy = user var/mob/living/silicon/robot/borgy = user
if(!borgy.cell) if(!borgy.cell)
@@ -517,7 +517,7 @@ RCD
return . return .
/obj/item/weapon/rcd/borg/checkResource(amount, mob/user) /obj/item/weapon/rcd/borg/checkResource(amount, mob/user)
if(!isrobot(user)) if(!iscyborg(user))
return 0 return 0
var/mob/living/silicon/robot/borgy = user var/mob/living/silicon/robot/borgy = user
if(!borgy.cell) if(!borgy.cell)

View File

@@ -64,13 +64,13 @@ RSF
/obj/item/weapon/rsf/afterattack(atom/A, mob/user, proximity) /obj/item/weapon/rsf/afterattack(atom/A, mob/user, proximity)
if(!proximity) if(!proximity)
return return
if (!(istype(A, /obj/structure/table) || istype(A, /turf/open/floor))) if (!(istype(A, /obj/structure/table) || isfloorturf(A)))
return return
if(matter < 1) if(matter < 1)
user << "<span class='warning'>\The [src] doesn't have enough matter left.</span>" user << "<span class='warning'>\The [src] doesn't have enough matter left.</span>"
return return
if(isrobot(user)) if(iscyborg(user))
var/mob/living/silicon/robot/R = user var/mob/living/silicon/robot/R = user
if(!R.cell || R.cell.charge < 200) if(!R.cell || R.cell.charge < 200)
user << "<span class='warning'>You do not have enough power to use [src].</span>" user << "<span class='warning'>You do not have enough power to use [src].</span>"
@@ -105,7 +105,7 @@ RSF
use_matter(10, user) use_matter(10, user)
/obj/item/weapon/rsf/proc/use_matter(charge, mob/user) /obj/item/weapon/rsf/proc/use_matter(charge, mob/user)
if (isrobot(user)) if (iscyborg(user))
var/mob/living/silicon/robot/R = user var/mob/living/silicon/robot/R = user
R.cell.charge -= charge R.cell.charge -= charge
else else
@@ -141,7 +141,7 @@ RSF
/obj/item/weapon/cookiesynth/attack_self(mob/user) /obj/item/weapon/cookiesynth/attack_self(mob/user)
var/mob/living/silicon/robot/P = null var/mob/living/silicon/robot/P = null
if(isrobot(user)) if(iscyborg(user))
P = user P = user
if(emagged&&!toxin) if(emagged&&!toxin)
toxin = 1 toxin = 1
@@ -162,12 +162,12 @@ RSF
return return
if(!proximity) if(!proximity)
return return
if (!(istype(A, /obj/structure/table) || istype(A, /turf/open/floor))) if (!(istype(A, /obj/structure/table) || isfloorturf(A)))
return return
if(matter < 1) if(matter < 1)
user << "<span class='warning'>The [src] doesn't have enough matter left. Wait for it to recharge!</span>" user << "<span class='warning'>The [src] doesn't have enough matter left. Wait for it to recharge!</span>"
return return
if(isrobot(user)) if(iscyborg(user))
var/mob/living/silicon/robot/R = user var/mob/living/silicon/robot/R = user
if(!R.cell || R.cell.charge < 400) if(!R.cell || R.cell.charge < 400)
user << "<span class='warning'>You do not have enough power to use [src].</span>" user << "<span class='warning'>You do not have enough power to use [src].</span>"
@@ -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) var/obj/item/weapon/reagent_containers/food/snacks/cookie/S = new /obj/item/weapon/reagent_containers/food/snacks/cookie(T)
if(toxin) if(toxin)
S.reagents.add_reagent("chloralhydrate2", 10) S.reagents.add_reagent("chloralhydrate2", 10)
if (isrobot(user)) if (iscyborg(user))
var/mob/living/silicon/robot/R = user var/mob/living/silicon/robot/R = user
R.cell.charge -= 100 R.cell.charge -= 100
else else

View File

@@ -55,7 +55,7 @@
// Find out if there is an open turf in front of us, // Find out if there is an open turf in front of us,
// and if not, pick the turf we are standing on. // and if not, pick the turf we are standing on.
var/turf/T = get_step(get_turf(src), user.dir) var/turf/T = get_step(get_turf(src), user.dir)
if(!istype(T, /turf/open)) if(!isopenturf(T))
T = get_turf(src) T = get_turf(src)
// they managed to lose their lungs between then and // they managed to lose their lungs between then and

View File

@@ -353,7 +353,7 @@
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0) playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
return return
if(!wielded) if(!wielded)
if(isrobot(user)) if(iscyborg(user))
user << "<span class='warning'>You must activate the paddles in your active module before you can use them on someone!</span>" user << "<span class='warning'>You must activate the paddles in your active module before you can use them on someone!</span>"
else else
user << "<span class='warning'>You need to wield the paddles in both hands before you can use them on someone!</span>" user << "<span class='warning'>You need to wield the paddles in both hands before you can use them on someone!</span>"

View File

@@ -172,7 +172,7 @@
reagents.clear_reagents() reagents.clear_reagents()
var/turf/T = get_turf(loc) var/turf/T = get_turf(loc)
if(istype(T, /turf/open)) if(isopenturf(T))
var/turf/open/theturf = T var/turf/open/theturf = T
theturf.MakeSlippery(min_wet_time = 10, wet_time_to_add = 5) theturf.MakeSlippery(min_wet_time = 10, wet_time_to_add = 5)

View File

@@ -43,7 +43,7 @@
playsound(loc, 'sound/effects/EMPulse.ogg', 50, 1) playsound(loc, 'sound/effects/EMPulse.ogg', 50, 1)
radiation_pulse(loc,freeze_range,freeze_range+1,rad_damage) radiation_pulse(loc,freeze_range,freeze_range+1,rad_damage)
for(var/turf/T in view(freeze_range,loc)) for(var/turf/T in view(freeze_range,loc))
if(istype(T,/turf/open/floor)) if(isfloorturf(T))
var/turf/open/floor/F = T var/turf/open/floor/F = T
F.wet = TURF_WET_PERMAFROST F.wet = TURF_WET_PERMAFROST
addtimer(F, "MakeDry", rand(3000, 3100), 0, TURF_WET_PERMAFROST) addtimer(F, "MakeDry", rand(3000, 3100), 0, TURF_WET_PERMAFROST)

View File

@@ -186,7 +186,7 @@
return ..() return ..()
/obj/item/weapon/restraints/handcuffs/cable/zipties/cyborg/attack(mob/living/carbon/C, mob/user) /obj/item/weapon/restraints/handcuffs/cable/zipties/cyborg/attack(mob/living/carbon/C, mob/user)
if(isrobot(user)) if(iscyborg(user))
if(!C.handcuffed) if(!C.handcuffed)
playsound(loc, 'sound/weapons/cablecuff.ogg', 30, 1, -2) playsound(loc, 'sound/weapons/cablecuff.ogg', 30, 1, -2)
C.visible_message("<span class='danger'>[user] is trying to put zipties on [C]!</span>", \ C.visible_message("<span class='danger'>[user] is trying to put zipties on [C]!</span>", \

View File

@@ -83,7 +83,7 @@
var/shock = 0 var/shock = 0
/obj/item/weapon/holosign_creator/cyborg/attack_self(mob/user) /obj/item/weapon/holosign_creator/cyborg/attack_self(mob/user)
if(isrobot(user)) if(iscyborg(user))
var/mob/living/silicon/robot/R = user var/mob/living/silicon/robot/R = user
if(shock) if(shock)

View File

@@ -82,7 +82,7 @@
else else
user.take_bodypart_damage(2*force) user.take_bodypart_damage(2*force)
return return
if(isrobot(target)) if(iscyborg(target))
..() ..()
return return
if(!isliving(target)) if(!isliving(target))
@@ -90,7 +90,7 @@
if (user.a_intent == "harm") if (user.a_intent == "harm")
if(!..()) if(!..())
return return
if(!isrobot(target)) if(!iscyborg(target))
return return
else else
if(cooldown <= world.time) if(cooldown <= world.time)
@@ -190,7 +190,7 @@
consume_everything(target) consume_everything(target)
else else
var/turf/T = get_turf(src) var/turf/T = get_turf(src)
if(!istype(T,/turf/open/space)) if(!isspaceturf(T))
consume_turf(T) consume_turf(T)
/obj/item/weapon/melee/supermatter_sword/afterattack(target, mob/user, proximity_flag) /obj/item/weapon/melee/supermatter_sword/afterattack(target, mob/user, proximity_flag)

View File

@@ -26,7 +26,7 @@ obj/item/weapon/mop/proc/clean(turf/A)
for(var/obj/effect/O in A) for(var/obj/effect/O in A)
if(is_cleanable(O)) if(is_cleanable(O))
qdel(O) qdel(O)
if(istype(A, /turf/closed)) if(isclosedturf(A))
var/turf/closed/C = A var/turf/closed/C = A
C.thermite = 0 C.thermite = 0
reagents.reaction(A, TOUCH, 10) //Needed for proper floor wetting. reagents.reaction(A, TOUCH, 10) //Needed for proper floor wetting.

View File

@@ -83,7 +83,7 @@
if(paintleft <= 0) if(paintleft <= 0)
icon_state = "paint_empty" icon_state = "paint_empty"
return return
if(!istype(target) || istype(target, /turf/open/space)) if(!istype(target) || isspaceturf(target))
return return
target.color = "#" + item_color target.color = "#" + item_color

View File

@@ -302,7 +302,7 @@
/obj/item/weapon/storage/backpack/satchel/flat/secret/New() /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) hide(1)
/obj/item/weapon/storage/backpack/satchel/flat/secret/hide(intact) /obj/item/weapon/storage/backpack/satchel/flat/secret/hide(intact)

View File

@@ -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) /obj/item/weapon/storage/book/bible/afterattack(atom/A, mob/user, proximity)
if(!proximity) if(!proximity)
return return
if (istype(A, /turf/open/floor)) if(isfloorturf(A))
user << "<span class='notice'>You hit the floor with the bible.</span>" user << "<span class='notice'>You hit the floor with the bible.</span>"
if(user.mind && (user.mind.assigned_role == "Chaplain")) if(user.mind && (user.mind.assigned_role == "Chaplain"))
for(var/obj/effect/rune/R in orange(2,user)) for(var/obj/effect/rune/R in orange(2,user))

View File

@@ -386,7 +386,7 @@
if(labeler.mode) if(labeler.mode)
return 0 return 0
. = 1 //no afterattack . = 1 //no afterattack
if(isrobot(user)) if(iscyborg(user))
return //Robots can't interact with storage items. return //Robots can't interact with storage items.
if(!can_be_inserted(W, 0 , user)) if(!can_be_inserted(W, 0 , user))

View File

@@ -111,7 +111,7 @@
deductcharge(hitcost) deductcharge(hitcost)
return return
if(isrobot(M)) if(iscyborg(M))
..() ..()
return return
@@ -140,7 +140,7 @@
if(H.check_shields(0, "[user]'s [name]", src, MELEE_ATTACK)) //No message; check_shields() handles that 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) playsound(L, 'sound/weapons/Genhit.ogg', 50, 1)
return 0 return 0
if(isrobot(loc)) if(iscyborg(loc))
var/mob/living/silicon/robot/R = loc var/mob/living/silicon/robot/R = loc
if(!R || !R.cell || !R.cell.use(hitcost)) if(!R || !R.cell || !R.cell.use(hitcost))
return 0 return 0

View File

@@ -41,7 +41,7 @@
else //something wrong else //something wrong
name = "[initial(name)]" name = "[initial(name)]"
update_icon() update_icon()
if(isrobot(user)) if(iscyborg(user))
user << "<span class='notice'>You free up your module.</span>" user << "<span class='notice'>You free up your module.</span>"
else if(istype(src, /obj/item/weapon/twohanded/required)) else if(istype(src, /obj/item/weapon/twohanded/required))
user << "<span class='notice'>You drop \the [name].</span>" user << "<span class='notice'>You drop \the [name].</span>"
@@ -71,7 +71,7 @@
force = force_wielded force = force_wielded
name = "[name] (Wielded)" name = "[name] (Wielded)"
update_icon() update_icon()
if(isrobot(user)) if(iscyborg(user))
user << "<span class='notice'>You dedicate your module to [name].</span>" user << "<span class='notice'>You dedicate your module to [name].</span>"
else else
user << "<span class='notice'>You grab the [name] with both hands.</span>" user << "<span class='notice'>You grab the [name] with both hands.</span>"
@@ -362,7 +362,7 @@
/obj/item/weapon/twohanded/spear/afterattack(atom/movable/AM, mob/user, proximity) /obj/item/weapon/twohanded/spear/afterattack(atom/movable/AM, mob/user, proximity)
if(!proximity) if(!proximity)
return return
if(istype(AM, /turf/open)) //So you can actually melee with it if(isopenturf(AM)) //So you can actually melee with it
return return
if(explosive && wielded) if(explosive && wielded)
user.say("[war_cry]") user.say("[war_cry]")

View File

@@ -66,7 +66,7 @@
return return
if ((!( istype(O, /obj/item/weapon) ) || user.get_active_held_item() != O)) if ((!( istype(O, /obj/item/weapon) ) || user.get_active_held_item() != O))
return return
if(isrobot(user)) if(iscyborg(user))
return return
if(!user.drop_item()) if(!user.drop_item())
return return

View File

@@ -195,7 +195,7 @@
if(3) if(3)
icon = 'icons/obj/smooth_structures/alien/weeds3.dmi' icon = 'icons/obj/smooth_structures/alien/weeds3.dmi'
linked_node = node linked_node = node
if(istype(loc, /turf/open/space)) if(isspaceturf(loc))
qdel(src) qdel(src)
return return
addtimer(src, "Life", rand(150, 200)) addtimer(src, "Life", rand(150, 200))
@@ -208,7 +208,7 @@
set background = BACKGROUND_ENABLED set background = BACKGROUND_ENABLED
var/turf/U = get_turf(src) var/turf/U = get_turf(src)
if(istype(U, /turf/open/space)) if(isspaceturf(U))
qdel(src) qdel(src)
return return
@@ -217,7 +217,7 @@
for(var/turf/T in U.GetAtmosAdjacentTurfs()) 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 continue
new /obj/structure/alien/weeds(T, linked_node) new /obj/structure/alien/weeds(T, linked_node)

View File

@@ -45,7 +45,7 @@
qdel(src) qdel(src)
return return
if(isrobot(user) || isalien(user)) if(iscyborg(user) || isalien(user))
return return
if(istype(I, /obj/item/weapon/extinguisher)) if(istype(I, /obj/item/weapon/extinguisher))
if(!has_extinguisher && opened) if(!has_extinguisher && opened)
@@ -62,7 +62,7 @@
/obj/structure/extinguisher_cabinet/attack_hand(mob/user) /obj/structure/extinguisher_cabinet/attack_hand(mob/user)
if(isrobot(user) || isalien(user)) if(iscyborg(user) || isalien(user))
return return
if(has_extinguisher) if(has_extinguisher)
user.put_in_hands(has_extinguisher) user.put_in_hands(has_extinguisher)

View File

@@ -107,7 +107,7 @@
if(T.density) if(T.density)
user << "<span class='warning'>[src] is blocked!</span>" user << "<span class='warning'>[src] is blocked!</span>"
return return
if(!istype(T, /turf/open/floor)) if(!isfloorturf(T))
user << "<span class='warning'>[src] bolts must be tightened on the floor!</span>" user << "<span class='warning'>[src] bolts must be tightened on the floor!</span>"
return return
user.visible_message("<span class='notice'>[user] tightens some bolts on the wall.</span>", "<span class='notice'>You tighten the bolts on the wall.</span>") user.visible_message("<span class='notice'>[user] tightens some bolts on the wall.</span>", "<span class='notice'>You tighten the bolts on the wall.</span>")

View File

@@ -16,7 +16,7 @@
update_icon() update_icon()
/obj/structure/fireaxecabinet/attackby(obj/item/I, mob/user, params) /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) toggle_lock(user)
return return
if(open || health <= 0) if(open || health <= 0)

View File

@@ -40,7 +40,7 @@
else if(istype(W, /obj/item/weapon/wrench)) else if(istype(W, /obj/item/weapon/wrench))
if(state == GIRDER_DISPLACED) if(state == GIRDER_DISPLACED)
if(!istype(loc, /turf/open/floor)) if(!isfloorturf(loc))
user << "<span class='warning'>A floor must be present to secure the girder!</span>" user << "<span class='warning'>A floor must be present to secure the girder!</span>"
return return
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1) playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
@@ -86,10 +86,10 @@
qdel(src) qdel(src)
else if(istype(W, /obj/item/stack)) else if(istype(W, /obj/item/stack))
if (istype(src.loc, /turf/closed/wall)) if(iswallturf(loc))
user << "<span class='warning'>There is already a wall present!</span>" user << "<span class='warning'>There is already a wall present!</span>"
return return
if (!istype(src.loc, /turf/open/floor)) if(!isfloorturf(src.loc))
user << "<span class='warning'>A floor must be present to build a false wall!</span>" user << "<span class='warning'>A floor must be present to build a false wall!</span>"
return return
if (locate(/obj/structure/falsewall) in src.loc.contents) if (locate(/obj/structure/falsewall) in src.loc.contents)

View File

@@ -35,7 +35,7 @@
add_overlay("[icon_state]_door") add_overlay("[icon_state]_door")
/obj/structure/guncase/attackby(obj/item/I, mob/user, params) /obj/structure/guncase/attackby(obj/item/I, mob/user, params)
if(isrobot(user) || isalien(user)) if(iscyborg(user) || isalien(user))
return return
if(istype(I, gun_category)) if(istype(I, gun_category))
if(contents.len < capacity && open) if(contents.len < capacity && open)
@@ -53,7 +53,7 @@
return ..() return ..()
/obj/structure/guncase/attack_hand(mob/user) /obj/structure/guncase/attack_hand(mob/user)
if(isrobot(user) || isalien(user)) if(iscyborg(user) || isalien(user))
return return
if(contents.len && open) if(contents.len && open)
ShowWindow(user) ShowWindow(user)

View File

@@ -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 /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 if(isAI(user)) //so the AI can't open it
return return
else if(isrobot(user)) //but cyborgs can else if(iscyborg(user)) //but cyborgs can
if(get_dist(user,src) <= 1) //not remotely though if(get_dist(user,src) <= 1) //not remotely though
return TryToSwitchState(user) return TryToSwitchState(user)

View File

@@ -31,7 +31,7 @@
"<span class='notice'>You loosen the [name]'s bolts!</span>") "<span class='notice'>You loosen the [name]'s bolts!</span>")
anchored = 0 anchored = 0
else else
if (!istype(src.loc, /turf/open/floor)) if(!isfloorturf(src.loc))
user.visible_message("<span class='warning'>A floor must be present to secure the [name]!</span>") user.visible_message("<span class='warning'>A floor must be present to secure the [name]!</span>")
return return
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1) playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)

View File

@@ -182,7 +182,7 @@
mob.client.Move(get_step(loc, direction), direction) mob.client.Move(get_step(loc, direction), direction)
mob.reset_perspective(null) 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. // 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? // Same direction as pod? Direcion you moved? Halfway between?

View File

@@ -208,7 +208,7 @@
else else
wash_obj(G) wash_obj(G)
else else
if(istype(loc, /turf/open)) if(isopenturf(loc))
var/turf/open/tile = loc var/turf/open/tile = loc
tile.MakeSlippery(min_wet_time = 5, wet_time_to_add = 1) tile.MakeSlippery(min_wet_time = 5, wet_time_to_add = 1)

View File

@@ -92,7 +92,7 @@
qdel(O) qdel(O)
var/obj/effect/hotspot/hotspot = (locate(/obj/effect/hotspot) in src) 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) air.temperature = max(min(air.temperature-2000,air.temperature/2),0)
qdel(hotspot) qdel(hotspot)
return 1 return 1

View File

@@ -112,10 +112,10 @@ var/list/icons_to_ignore_at_floor_init = list("damaged1","damaged2","damaged3","
/turf/open/floor/proc/make_plating() /turf/open/floor/proc/make_plating()
return ChangeTurf(/turf/open/floor/plating) return ChangeTurf(/turf/open/floor/plating)
/turf/open/floor/ChangeTurf(turf/open/floor/T) /turf/open/floor/ChangeTurf(new_path)
if(!istype(src,/turf/open/floor)) if(!isfloorturf(src))
return ..() //fucking turfs switch the fucking src of the fucking running procs 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 ..() return ..()
var/old_icon = icon_regular_floor var/old_icon = icon_regular_floor
var/old_dir = dir var/old_dir = dir

View File

@@ -71,10 +71,10 @@
for(var/F in RANGE_TURFS(1, src) - src) for(var/F in RANGE_TURFS(1, src) - src)
var/turf/T = F var/turf/T = F
var/area/new_area = get_area(T) 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 continue
if(!logged_turf_type && istype(T, /turf/closed/mineral)) if(!logged_turf_type && ismineralturf(T))
var/turf/closed/mineral/M = T var/turf/closed/mineral/M = T
logged_turf_type = M.turf_type logged_turf_type = M.turf_type
@@ -92,7 +92,7 @@
var/turf/T = F var/turf/T = F
if(!istype(T, logged_turf_type) && prob(probability) && T.ChangeTurf(type)) if(!istype(T, logged_turf_type) && prob(probability) && T.ChangeTurf(type))
T.Spread(probability - prob_loss, prob_loss, whitelisted_area) 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 var/turf/closed/mineral/M = T
M.ChangeTurf(M.turf_type) M.ChangeTurf(M.turf_type)

View File

@@ -179,7 +179,7 @@
user << "<span class='notice'>You begin slicing through the outer plating...</span>" user << "<span class='notice'>You begin slicing through the outer plating...</span>"
playsound(src, 'sound/items/Welder.ogg', 100, 1) playsound(src, 'sound/items/Welder.ogg', 100, 1)
if(do_after(user, slicing_duration/W.toolspeed, target = src)) 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 return 1
if( user.loc == T && user.get_active_held_item() == WT ) if( user.loc == T && user.get_active_held_item() == WT )
user << "<span class='notice'>You remove the outer plating.</span>" user << "<span class='notice'>You remove the outer plating.</span>"
@@ -189,7 +189,7 @@
user << "<span class='notice'>You begin slicing through the outer plating...</span>" user << "<span class='notice'>You begin slicing through the outer plating...</span>"
playsound(src, 'sound/items/Welder.ogg', 100, 1) 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(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 return 1
if( user.loc == T && user.get_active_held_item() == W ) if( user.loc == T && user.get_active_held_item() == W )
user << "<span class='notice'>You remove the outer plating.</span>" user << "<span class='notice'>You remove the outer plating.</span>"
@@ -202,7 +202,7 @@
/turf/closed/wall/proc/try_destroy(obj/item/weapon/W, mob/user, turf/T) /turf/closed/wall/proc/try_destroy(obj/item/weapon/W, mob/user, turf/T)
if(istype(W, /obj/item/weapon/pickaxe/drill/jackhammer)) if(istype(W, /obj/item/weapon/pickaxe/drill/jackhammer))
var/obj/item/weapon/pickaxe/drill/jackhammer/D = W 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 return 1
if( user.loc == T && user.get_active_held_item() == W ) if( user.loc == T && user.get_active_held_item() == W )
D.playDigSound() D.playDigSound()

View File

@@ -51,7 +51,7 @@
/turf/open/space/proc/update_starlight() /turf/open/space/proc/update_starlight()
if(config.starlight) if(config.starlight)
for(var/t in RANGE_TURFS(1,src)) //RANGE_TURFS is in code\__HELPERS\game.dm 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 //let's NOT update this that much pls
continue continue
SetLuminosity(4,1) SetLuminosity(4,1)

View File

@@ -688,7 +688,7 @@ var/global/BSACooldown = 0
ai_number++ ai_number++
if(isAI(S)) if(isAI(S))
usr << "<b>AI [key_name(S, usr)]'s laws:</b>" usr << "<b>AI [key_name(S, usr)]'s laws:</b>"
else if(isrobot(S)) else if(iscyborg(S))
var/mob/living/silicon/robot/R = S var/mob/living/silicon/robot/R = S
usr << "<b>CYBORG [key_name(S, usr)] [R.connected_ai?"(Slaved to: [R.connected_ai])":"(Independant)"]: laws:</b>" usr << "<b>CYBORG [key_name(S, usr)] [R.connected_ai?"(Slaved to: [R.connected_ai])":"(Independant)"]: laws:</b>"
else if (ispAI(S)) else if (ispAI(S))

View File

@@ -244,7 +244,7 @@
M_job = "AI" M_job = "AI"
else if(ispAI(M)) else if(ispAI(M))
M_job = "pAI" M_job = "pAI"
else if(isrobot(M)) else if(iscyborg(M))
M_job = "Cyborg" M_job = "Cyborg"
else else
M_job = "Silicon-based" M_job = "Silicon-based"

View File

@@ -1929,7 +1929,7 @@
switch(where) switch(where)
if("inhand") 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." usr << "Can only spawn in hand when you're a carbon mob or cyborg."
where = "onfloor" where = "onfloor"
target = usr target = usr
@@ -1972,7 +1972,7 @@
var/mob/living/L = usr var/mob/living/L = usr
var/obj/item/I = O var/obj/item/I = O
L.put_in_hands(I) L.put_in_hands(I)
if(isrobot(L)) if(iscyborg(L))
var/mob/living/silicon/robot/R = L var/mob/living/silicon/robot/R = L
if(R.module) if(R.module)
R.module.add_module(I) R.module.add_module(I)

View File

@@ -244,20 +244,20 @@
if(BASIC_BUILDMODE) if(BASIC_BUILDMODE)
if(istype(object,/turf) && left_click && !alt_click && !ctrl_click) if(istype(object,/turf) && left_click && !alt_click && !ctrl_click)
var/turf/T = object var/turf/T = object
if(istype(object,/turf/open/space)) if(isspaceturf(object))
T.ChangeTurf(/turf/open/floor/plasteel) T.ChangeTurf(/turf/open/floor/plasteel)
else if(istype(object,/turf/open/floor)) else if(isfloorturf(object))
T.ChangeTurf(/turf/closed/wall) T.ChangeTurf(/turf/closed/wall)
else if(istype(object,/turf/closed/wall)) else if(iswallturf(object))
T.ChangeTurf(/turf/closed/wall/r_wall) T.ChangeTurf(/turf/closed/wall/r_wall)
log_admin("Build Mode: [key_name(user)] built [T] at ([T.x],[T.y],[T.z])") log_admin("Build Mode: [key_name(user)] built [T] at ([T.x],[T.y],[T.z])")
return return
else if(right_click) else if(right_click)
log_admin("Build Mode: [key_name(user)] deleted [object] at ([object.x],[object.y],[object.z])") 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 var/turf/T = object
T.ChangeTurf(/turf/open/floor/plasteel) T.ChangeTurf(/turf/open/floor/plasteel)
else if(istype(object,/turf/open/floor)) else if(isfloorturf(object))
var/turf/T = object var/turf/T = object
T.ChangeTurf(/turf/open/space) T.ChangeTurf(/turf/open/space)
else if(istype(object,/turf/closed/wall/r_wall)) else if(istype(object,/turf/closed/wall/r_wall))

View File

@@ -8,7 +8,7 @@
var/datum/gas_mixture/GM = target.return_air() var/datum/gas_mixture/GM = target.return_air()
var/list/GM_gases var/list/GM_gases
var/burning = 0 var/burning = 0
if(istype(target, /turf/open)) if(isopenturf(target))
var/turf/open/T = target var/turf/open/T = target
if(T.active_hotspot) if(T.active_hotspot)
burning = 1 burning = 1

View File

@@ -144,7 +144,7 @@ var/pipenetwarnings = 10
var/target_temperature var/target_temperature
var/target_heat_capacity var/target_heat_capacity
if(istype(target, /turf/open)) if(isopenturf(target))
var/turf/open/modeled_location = target var/turf/open/modeled_location = target
target_temperature = modeled_location.GetTemperature() target_temperature = modeled_location.GetTemperature()

View File

@@ -38,7 +38,7 @@
ruins_wizard_loadout = 1 ruins_wizard_loadout = 1
for(var/mob/living/carbon/human/H in living_mob_list) 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 continue //#savetheminers
if(ruins_wizard_loadout && H.mind && ((H.mind in ticker.mode.wizards) || (H.mind in ticker.mode.apprentices))) if(ruins_wizard_loadout && H.mind && ((H.mind in ticker.mode.wizards) || (H.mind in ticker.mode.apprentices)))
continue continue

View File

@@ -74,7 +74,7 @@
var/trans = src.reagents.trans_to(target, amount_per_transfer_from_this) var/trans = src.reagents.trans_to(target, amount_per_transfer_from_this)
user << "<span class='notice'>You transfer [trans] units of the solution to [target].</span>" user << "<span class='notice'>You transfer [trans] units of the solution to [target].</span>"
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 var/mob/living/silicon/robot/bro = user
bro.cell.use(30) bro.cell.use(30)
addtimer(reagents, "add_reagent", 600, FALSE, refill, trans) addtimer(reagents, "add_reagent", 600, FALSE, refill, trans)

View File

@@ -29,7 +29,7 @@
for(var/obj/effect/landmark/R in landmarks_list) for(var/obj/effect/landmark/R in landmarks_list)
if(R.name != "blobspawn") if(R.name != "blobspawn")
if(prob(35)) if(prob(35))
if(istype(R.loc,/turf/open/space)) if(isspaceturf(R.loc))
new /mob/living/simple_animal/chicken/rabbit/space(R.loc) new /mob/living/simple_animal/chicken/rabbit/space(R.loc)
else else
new /mob/living/simple_animal/chicken/rabbit(R.loc) new /mob/living/simple_animal/chicken/rabbit(R.loc)

View File

@@ -76,7 +76,7 @@
continue continue
if(platingRequired) if(platingRequired)
if(istype(B, /turf/open/space)) if(isspaceturf(B))
continue continue
var/old_dir1 = T.dir var/old_dir1 = T.dir

View File

@@ -143,7 +143,7 @@
/obj/machinery/computer/holodeck/proc/floorcheck() /obj/machinery/computer/holodeck/proc/floorcheck()
for(var/turf/T in linked) for(var/turf/T in linked)
if(!T.intact || istype(T,/turf/open/space)) if(!T.intact || isspaceturf(T))
return 0 return 0
return 1 return 1

View File

@@ -66,7 +66,7 @@
return return
if(default_deconstruction_crowbar(I)) if(default_deconstruction_crowbar(I))
return return
if(isrobot(user)) if(iscyborg(user))
return return
if(istype(I, /obj/item/seeds)) if(istype(I, /obj/item/seeds))

View File

@@ -27,7 +27,7 @@
return (BRUTELOSS) return (BRUTELOSS)
/obj/item/seeds/kudzu/proc/plant(mob/user) /obj/item/seeds/kudzu/proc/plant(mob/user)
if(istype(user.loc,/turf/open/space)) if(isspaceturf(user.loc))
return return
var/turf/T = get_turf(src) var/turf/T = get_turf(src)
message_admins("Kudzu planted by [key_name_admin(user)](<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A>) (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[user]'>FLW</A>) at ([T.x],[T.y],[T.z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[T.x];Y=[T.y];Z=[T.z]'>(JMP)</a>)",0,1) message_admins("Kudzu planted by [key_name_admin(user)](<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A>) (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[user]'>FLW</A>) at ([T.x],[T.y],[T.z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[T.x];Y=[T.y];Z=[T.z]'>(JMP)</a>)",0,1)

View File

@@ -168,7 +168,7 @@
origin_tech = "biotech=4;programming=5" origin_tech = "biotech=4;programming=5"
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/walkingmushroom/attack_self(mob/user) /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 return
var/mob/living/simple_animal/hostile/mushroom/M = new /mob/living/simple_animal/hostile/mushroom(user.loc) var/mob/living/simple_animal/hostile/mushroom/M = new /mob/living/simple_animal/hostile/mushroom(user.loc)
M.maxHealth += round(seed.endurance / 4) M.maxHealth += round(seed.endurance / 4)
@@ -241,7 +241,7 @@
origin_tech = "biotech=4;plasmatech=6" origin_tech = "biotech=4;plasmatech=6"
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/glowshroom/attack_self(mob/user) /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 return
var/obj/structure/glowshroom/planted = new effect_path(user.loc) 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 planted.delay = planted.delay - seed.production * 100 //So the delay goes DOWN with better stats instead of up. :I

View File

@@ -124,7 +124,7 @@
..() ..()
/obj/item/weapon/reagent_containers/food/snacks/grown/tomato/killer/attack_self(mob/user) /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 return
user << "<span class='notice'>You begin to awaken the Killer Tomato...</span>" user << "<span class='notice'>You begin to awaken the Killer Tomato...</span>"
awakening = 1 awakening = 1

View File

@@ -134,7 +134,7 @@
/obj/structure/bonfire/proc/CheckOxygen() /obj/structure/bonfire/proc/CheckOxygen()
if(istype(loc,/turf/open)) if(isopenturf(loc))
var/turf/open/O = loc var/turf/open/O = loc
if(O.air) if(O.air)
var/G = O.air.gases var/G = O.air.gases

Some files were not shown because too many files have changed in this diff Show More