mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-13 19:22:20 +00:00
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:
@@ -4,9 +4,28 @@
|
||||
|
||||
#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))
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
owner.attack_log += "\[[time_stamp()]\] <span class='brass'>Has been converted to the cult of Ratvar!</span>"
|
||||
if(issilicon(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='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))
|
||||
@@ -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()]\] <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>"
|
||||
..()
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -484,7 +484,7 @@
|
||||
else
|
||||
user.take_bodypart_damage(2*force)
|
||||
return
|
||||
if(isrobot(target))
|
||||
if(iscyborg(target))
|
||||
return ..()
|
||||
if(!isliving(target))
|
||||
return ..()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -194,7 +194,7 @@
|
||||
src << "<span class='userdanger'>You have no core and are about to die! May you rest in peace.</span>"
|
||||
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 << "<span class='warning'>You cannot relocate your core here!</span>"
|
||||
return
|
||||
if(!can_buy(80))
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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 << "<span class='warning'>You need solid ground to place this object!</span>"
|
||||
return 0
|
||||
if(one_per_tile && (locate(prevent_path) in T))
|
||||
|
||||
@@ -346,10 +346,10 @@
|
||||
user << "<span class='warning'>You need one brass sheet to do this!</span>"
|
||||
return
|
||||
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>"
|
||||
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>"
|
||||
return
|
||||
if(locate(/obj/structure/falsewall) in T.contents)
|
||||
|
||||
@@ -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 << "<span class='warning'>You cannot scribe runes in space!</span>"
|
||||
return
|
||||
for(var/T in typesof(/obj/effect/rune))
|
||||
|
||||
@@ -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 << "<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")
|
||||
@@ -423,7 +423,7 @@ var/list/teleport_runes = list()
|
||||
if(sacrifice_fulfilled)
|
||||
M << "<span class='cultlarge'>\"Yes! This is the one I desire! You have done well.\"</span>"
|
||||
else
|
||||
if(ishuman(sacrificial) || isrobot(sacrificial))
|
||||
if(ishuman(sacrificial) || iscyborg(sacrificial))
|
||||
M << "<span class='cultlarge'>\"I accept this sacrifice.\"</span>"
|
||||
else
|
||||
M << "<span class='cultlarge'>\"I accept this meager sacrifice.\"</span>"
|
||||
@@ -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
|
||||
|
||||
@@ -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 << "<span class='warning'>You can only use this on the station!</span>"
|
||||
return
|
||||
|
||||
|
||||
@@ -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])
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -392,7 +392,7 @@ Congratulations! You are now trained for xenobiology research!"}
|
||||
if(!isabductor(user))
|
||||
return
|
||||
|
||||
if(isrobot(target))
|
||||
if(iscyborg(target))
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
@@ -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 << "<span class='warning'>Destroying this object has the potential to cause a hull breach. Aborting.</span>"
|
||||
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 << "<span class='warning'>Destroying this object has the potential to cause a hull breach. Aborting.</span>"
|
||||
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)
|
||||
..()
|
||||
|
||||
@@ -284,7 +284,7 @@
|
||||
if(!src)
|
||||
return
|
||||
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>"
|
||||
return 0
|
||||
for(var/obj/O in T)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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 << "<span class='notice'>The bomb must be placed on solid ground to attach it.</span>"
|
||||
else
|
||||
user << "<span class='notice'>You firmly wrench the bomb to the floor.</span>"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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 << "<span class='notice'>You place the poster!</span>"
|
||||
else
|
||||
D.roll_and_drop(temp_loc,D.official)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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 << "<span class='warning'>You cannot place [src] on this spot!</span>"
|
||||
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)
|
||||
|
||||
@@ -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 << "<span class='notice'>How did you get this?</span>"
|
||||
qdel(src)
|
||||
return FALSE
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -106,7 +106,7 @@
|
||||
outmsg = "<span class='warning'>You fail to blind [C] by shining [src] at their eyes!</span>"
|
||||
|
||||
//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))
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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 @@
|
||||
"<span class='danger'>You electrocute [M] with your touch!</span>")
|
||||
M.update_canmove()
|
||||
else
|
||||
if(!isrobot(M))
|
||||
if(!iscyborg(M))
|
||||
M.adjustFireLoss(10)
|
||||
user.visible_message("<span class='userdanger'>[user] shocks [M]!</span>", \
|
||||
"<span class='danger'>You shock [M]!</span>")
|
||||
@@ -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 << "<font color='red'>The device is still recharging!</font>"
|
||||
return
|
||||
|
||||
if(isrobot(user))
|
||||
if(iscyborg(user))
|
||||
var/mob/living/silicon/robot/R = user
|
||||
if(R.cell.charge < 1200)
|
||||
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)
|
||||
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 << "<br><span class='notice'>NOTICE - Peacekeeping 'HARM ALARM' used by: [user]</span><br>"
|
||||
|
||||
|
||||
@@ -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 << "<span class='warning'>There is another [R.title] here!</span>"
|
||||
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>"
|
||||
return 0
|
||||
return 1
|
||||
|
||||
@@ -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 << "<span class='notice'>You start building floor...</span>"
|
||||
@@ -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 << "<span class='notice'>You start building wall...</span>"
|
||||
@@ -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 << "<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)
|
||||
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 << "<span class='warning'>There is already a grille there!</span>"
|
||||
@@ -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)
|
||||
|
||||
@@ -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 << "<span class='warning'>\The [src] doesn't have enough matter left.</span>"
|
||||
return
|
||||
if(isrobot(user))
|
||||
if(iscyborg(user))
|
||||
var/mob/living/silicon/robot/R = user
|
||||
if(!R.cell || R.cell.charge < 200)
|
||||
user << "<span class='warning'>You do not have enough power to use [src].</span>"
|
||||
@@ -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 << "<span class='warning'>The [src] doesn't have enough matter left. Wait for it to recharge!</span>"
|
||||
return
|
||||
if(isrobot(user))
|
||||
if(iscyborg(user))
|
||||
var/mob/living/silicon/robot/R = user
|
||||
if(!R.cell || R.cell.charge < 400)
|
||||
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)
|
||||
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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 << "<span class='warning'>You must activate the paddles in your active module before you can use them on someone!</span>"
|
||||
else
|
||||
user << "<span class='warning'>You need to wield the paddles in both hands before you can use them on someone!</span>"
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
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))
|
||||
if(isfloorturf(T))
|
||||
var/turf/open/floor/F = T
|
||||
F.wet = TURF_WET_PERMAFROST
|
||||
addtimer(F, "MakeDry", rand(3000, 3100), 0, TURF_WET_PERMAFROST)
|
||||
|
||||
@@ -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("<span class='danger'>[user] is trying to put zipties on [C]!</span>", \
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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 << "<span class='notice'>You hit the floor with the bible.</span>"
|
||||
if(user.mind && (user.mind.assigned_role == "Chaplain"))
|
||||
for(var/obj/effect/rune/R in orange(2,user))
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
else //something wrong
|
||||
name = "[initial(name)]"
|
||||
update_icon()
|
||||
if(isrobot(user))
|
||||
if(iscyborg(user))
|
||||
user << "<span class='notice'>You free up your module.</span>"
|
||||
else if(istype(src, /obj/item/weapon/twohanded/required))
|
||||
user << "<span class='notice'>You drop \the [name].</span>"
|
||||
@@ -71,7 +71,7 @@
|
||||
force = force_wielded
|
||||
name = "[name] (Wielded)"
|
||||
update_icon()
|
||||
if(isrobot(user))
|
||||
if(iscyborg(user))
|
||||
user << "<span class='notice'>You dedicate your module to [name].</span>"
|
||||
else
|
||||
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)
|
||||
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]")
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
if(T.density)
|
||||
user << "<span class='warning'>[src] is blocked!</span>"
|
||||
return
|
||||
if(!istype(T, /turf/open/floor))
|
||||
if(!isfloorturf(T))
|
||||
user << "<span class='warning'>[src] bolts must be tightened on the floor!</span>"
|
||||
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>")
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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 << "<span class='warning'>A floor must be present to secure the girder!</span>"
|
||||
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 << "<span class='warning'>There is already a wall present!</span>"
|
||||
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>"
|
||||
return
|
||||
if (locate(/obj/structure/falsewall) in src.loc.contents)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
"<span class='notice'>You loosen the [name]'s bolts!</span>")
|
||||
anchored = 0
|
||||
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>")
|
||||
return
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
|
||||
|
||||
@@ -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?
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -179,7 +179,7 @@
|
||||
user << "<span class='notice'>You begin slicing through the outer plating...</span>"
|
||||
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 << "<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>"
|
||||
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 << "<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)
|
||||
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()
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -688,7 +688,7 @@ var/global/BSACooldown = 0
|
||||
ai_number++
|
||||
if(isAI(S))
|
||||
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
|
||||
usr << "<b>CYBORG [key_name(S, usr)] [R.connected_ai?"(Slaved to: [R.connected_ai])":"(Independant)"]: laws:</b>"
|
||||
else if (ispAI(S))
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
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>"
|
||||
|
||||
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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
continue
|
||||
|
||||
if(platingRequired)
|
||||
if(istype(B, /turf/open/space))
|
||||
if(isspaceturf(B))
|
||||
continue
|
||||
|
||||
var/old_dir1 = T.dir
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
return
|
||||
if(default_deconstruction_crowbar(I))
|
||||
return
|
||||
if(isrobot(user))
|
||||
if(iscyborg(user))
|
||||
return
|
||||
|
||||
if(istype(I, /obj/item/seeds))
|
||||
|
||||
@@ -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)](<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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 << "<span class='notice'>You begin to awaken the Killer Tomato...</span>"
|
||||
awakening = 1
|
||||
|
||||
@@ -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
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user