mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-15 20:52:07 +00:00
Finishes seperating ZAS logic from CanPass().
This commit is contained in:
@@ -3,64 +3,33 @@
|
|||||||
/atom/var/pressure_resistance = ONE_ATMOSPHERE
|
/atom/var/pressure_resistance = ONE_ATMOSPHERE
|
||||||
/atom/var/can_atmos_pass = ATMOS_PASS_YES
|
/atom/var/can_atmos_pass = ATMOS_PASS_YES
|
||||||
|
|
||||||
// Used to determine if airflow/zones can pass this atom.
|
// Purpose: Determines if the object can pass this atom.
|
||||||
|
// Called by: Movement.
|
||||||
|
// Inputs: The moving atom, target turf.
|
||||||
|
// Outputs: Boolean if can pass.
|
||||||
|
// Airflow and ZAS zones now uses CanZASPass() instead of this proc.
|
||||||
|
/atom/proc/CanPass(atom/movable/mover, turf/target)
|
||||||
|
return !density
|
||||||
|
|
||||||
|
// Purpose: Determines if airflow is allowed between T and loc.
|
||||||
|
// Called by: Airflow.
|
||||||
|
// Inputs: The turf the airflow is from, which may not be the same as loc. is_zone is for conditionally disallowing merging.
|
||||||
|
// Outputs: Boolean if airflow can pass.
|
||||||
/atom/proc/CanZASPass(turf/T, is_zone)
|
/atom/proc/CanZASPass(turf/T, is_zone)
|
||||||
switch(can_atmos_pass)
|
switch(can_atmos_pass)
|
||||||
if(ATMOS_PASS_PROC)
|
|
||||||
return ATMOS_PASS_YES
|
|
||||||
if(ATMOS_PASS_DENSITY)
|
if(ATMOS_PASS_DENSITY)
|
||||||
return !density
|
return !density
|
||||||
else
|
else
|
||||||
return can_atmos_pass
|
return can_atmos_pass
|
||||||
// return (!density || is_zone)
|
|
||||||
|
|
||||||
/*
|
|
||||||
/atom/proc/CanAtmosPass(turf/T)
|
|
||||||
switch (CanAtmosPass)
|
|
||||||
if (ATMOS_PASS_PROC)
|
|
||||||
return ATMOS_PASS_YES
|
|
||||||
if (ATMOS_PASS_DENSITY)
|
|
||||||
return !density
|
|
||||||
else
|
|
||||||
return CanAtmosPass
|
|
||||||
|
|
||||||
/atom/proc/CanPass(atom/movable/mover, turf/target, height=1.5, air_group = 0)
|
|
||||||
//Purpose: Determines if the object (or airflow) can pass this atom.
|
|
||||||
//Called by: Movement, airflow.
|
|
||||||
//Inputs: The moving atom (optional), target turf, "height" and air group
|
|
||||||
//Outputs: Boolean if can pass.
|
|
||||||
|
|
||||||
return (!density || !height || air_group)
|
|
||||||
*/
|
|
||||||
// Used to see if objects can freely move past this atom.
|
|
||||||
// Airflow and ZAS zones now uses CanZASPass() instead.
|
|
||||||
/atom/proc/CanPass(atom/movable/mover, turf/target, height=1.5, air_group = 0)
|
|
||||||
return !density
|
|
||||||
|
|
||||||
/turf/can_atmos_pass = ATMOS_PASS_NO
|
/turf/can_atmos_pass = ATMOS_PASS_NO
|
||||||
|
|
||||||
/turf/CanPass(atom/movable/mover, turf/target, height=1.5,air_group=0)
|
/turf/CanPass(atom/movable/mover, turf/target)
|
||||||
if(!target) return FALSE
|
if(!target) return FALSE
|
||||||
|
|
||||||
if(istype(mover)) // turf/Enter(...) will perform more advanced checks
|
if(istype(mover)) // turf/Enter(...) will perform more advanced checks
|
||||||
return !density
|
return !density
|
||||||
|
|
||||||
/*
|
|
||||||
else // Now, doing more detailed checks for air movement and air group formation
|
|
||||||
if(target.blocks_air||blocks_air)
|
|
||||||
return 0
|
|
||||||
|
|
||||||
for(var/obj/obstacle in src)
|
|
||||||
if(!obstacle.CanPass(mover, target, height, air_group))
|
|
||||||
return 0
|
|
||||||
if(target != src)
|
|
||||||
for(var/obj/obstacle in target)
|
|
||||||
if(!obstacle.CanPass(mover, src, height, air_group))
|
|
||||||
return 0
|
|
||||||
|
|
||||||
return 1
|
|
||||||
*/
|
|
||||||
|
|
||||||
/turf/CanZASPass(turf/T, is_zone)
|
/turf/CanZASPass(turf/T, is_zone)
|
||||||
if(T.blocks_air || src.blocks_air)
|
if(T.blocks_air || src.blocks_air)
|
||||||
return FALSE
|
return FALSE
|
||||||
@@ -89,13 +58,6 @@
|
|||||||
// AIR_BLOCKED - Blocked
|
// AIR_BLOCKED - Blocked
|
||||||
// ZONE_BLOCKED - Not blocked, but zone boundaries will not cross.
|
// ZONE_BLOCKED - Not blocked, but zone boundaries will not cross.
|
||||||
// BLOCKED - Blocked, zone boundaries will not cross even if opened.
|
// BLOCKED - Blocked, zone boundaries will not cross even if opened.
|
||||||
/*
|
|
||||||
atom/proc/c_airblock(turf/other)
|
|
||||||
#ifdef ZASDBG
|
|
||||||
ASSERT(isturf(other))
|
|
||||||
#endif
|
|
||||||
return (AIR_BLOCKED*!CanPass(null, other, 0, 0))|(ZONE_BLOCKED*!CanPass(null, other, 1.5, 1))
|
|
||||||
*/
|
|
||||||
atom/proc/c_airblock(turf/other)
|
atom/proc/c_airblock(turf/other)
|
||||||
#ifdef ZASDBG
|
#ifdef ZASDBG
|
||||||
ASSERT(isturf(other))
|
ASSERT(isturf(other))
|
||||||
|
|||||||
@@ -95,8 +95,7 @@
|
|||||||
#define ATMOSTANK_NITROUSOXIDE 10000 // N2O doesn't have a real useful use, i guess it's on station just to allow refilling of sec's riot control canisters?
|
#define ATMOSTANK_NITROUSOXIDE 10000 // N2O doesn't have a real useful use, i guess it's on station just to allow refilling of sec's riot control canisters?
|
||||||
|
|
||||||
// Used for quickly making certain things allow airflow or not.
|
// Used for quickly making certain things allow airflow or not.
|
||||||
// More complicated, conditional abilities for airflow should use ATMOS_PASS_PROC and override CanZASPass().
|
// More complicated, conditional airflow should override CanZASPass().
|
||||||
#define ATMOS_PASS_YES 1
|
#define ATMOS_PASS_YES 1
|
||||||
#define ATMOS_PASS_NO 0
|
#define ATMOS_PASS_NO 0
|
||||||
#define ATMOS_PASS_PROC -1 // Asks CanZASPass()
|
#define ATMOS_PASS_DENSITY -1 // Just checks density.
|
||||||
#define ATMOS_PASS_DENSITY -2 // Just checks density.
|
|
||||||
@@ -147,7 +147,7 @@
|
|||||||
else
|
else
|
||||||
die(0)
|
die(0)
|
||||||
|
|
||||||
/obj/effect/meteor/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
/obj/effect/meteor/CanPass(atom/movable/mover, turf/target)
|
||||||
return istype(mover, /obj/effect/meteor) ? 1 : ..()
|
return istype(mover, /obj/effect/meteor) ? 1 : ..()
|
||||||
|
|
||||||
/obj/effect/meteor/proc/ram_turf(var/turf/T)
|
/obj/effect/meteor/proc/ram_turf(var/turf/T)
|
||||||
|
|||||||
@@ -128,13 +128,10 @@ for reference:
|
|||||||
dismantle()
|
dismantle()
|
||||||
return
|
return
|
||||||
|
|
||||||
/obj/structure/barricade/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)//So bullets will fly over and stuff.
|
/obj/structure/barricade/CanPass(atom/movable/mover, turf/target)//So bullets will fly over and stuff.
|
||||||
if(air_group || (height==0))
|
|
||||||
return 1
|
|
||||||
if(istype(mover) && mover.checkpass(PASSTABLE))
|
if(istype(mover) && mover.checkpass(PASSTABLE))
|
||||||
return 1
|
return TRUE
|
||||||
else
|
return FALSE
|
||||||
return 0
|
|
||||||
|
|
||||||
//Actual Deployable machinery stuff
|
//Actual Deployable machinery stuff
|
||||||
/obj/machinery/deployable
|
/obj/machinery/deployable
|
||||||
@@ -223,13 +220,10 @@ for reference:
|
|||||||
anchored = !anchored
|
anchored = !anchored
|
||||||
icon_state = "barrier[locked]"
|
icon_state = "barrier[locked]"
|
||||||
|
|
||||||
/obj/machinery/deployable/barrier/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)//So bullets will fly over and stuff.
|
/obj/machinery/deployable/barrier/CanPass(atom/movable/mover, turf/target)//So bullets will fly over and stuff.
|
||||||
if(air_group || (height==0))
|
|
||||||
return 1
|
|
||||||
if(istype(mover) && mover.checkpass(PASSTABLE))
|
if(istype(mover) && mover.checkpass(PASSTABLE))
|
||||||
return 1
|
return TRUE
|
||||||
else
|
return FALSE
|
||||||
return 0
|
|
||||||
|
|
||||||
/obj/machinery/deployable/barrier/proc/explode()
|
/obj/machinery/deployable/barrier/proc/explode()
|
||||||
|
|
||||||
|
|||||||
@@ -264,7 +264,7 @@
|
|||||||
// If for some reason this is actually needed for something important, uncomment this.
|
// If for some reason this is actually needed for something important, uncomment this.
|
||||||
/obj/machinery/door/blast/CanZASPass(turf/T, is_zone)
|
/obj/machinery/door/blast/CanZASPass(turf/T, is_zone)
|
||||||
if(is_zone)
|
if(is_zone)
|
||||||
return TRUE
|
return ATMOS_PASS_YES
|
||||||
return ..()
|
return ..()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -140,12 +140,12 @@
|
|||||||
if(istype(mover) && mover.checkpass(PASSGLASS))
|
if(istype(mover) && mover.checkpass(PASSGLASS))
|
||||||
return !opacity
|
return !opacity
|
||||||
return !density
|
return !density
|
||||||
/*
|
|
||||||
/obj/machinery/door/CanZASPass(turf/T, is_zone)
|
/obj/machinery/door/CanZASPass(turf/T, is_zone)
|
||||||
if(is_zone)
|
if(is_zone)
|
||||||
return !block_air_zones
|
return block_air_zones ? ATMOS_PASS_NO : ATMOS_PASS_YES
|
||||||
return ..()
|
return ..()
|
||||||
*/
|
|
||||||
/obj/machinery/door/proc/bumpopen(mob/user as mob)
|
/obj/machinery/door/proc/bumpopen(mob/user as mob)
|
||||||
if(operating) return
|
if(operating) return
|
||||||
if(user.last_airflow > world.time - vsc.airflow_delay) //Fakkit
|
if(user.last_airflow > world.time - vsc.airflow_delay) //Fakkit
|
||||||
|
|||||||
@@ -471,11 +471,10 @@
|
|||||||
heat_proof = 1
|
heat_proof = 1
|
||||||
air_properties_vary_with_direction = 1
|
air_properties_vary_with_direction = 1
|
||||||
|
|
||||||
CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
CanPass(atom/movable/mover, turf/target)
|
||||||
if(istype(mover) && mover.checkpass(PASSGLASS))
|
if(istype(mover) && mover.checkpass(PASSGLASS))
|
||||||
return 1
|
return 1
|
||||||
if(get_dir(loc, target) == dir) //Make sure looking at appropriate border
|
if(get_dir(loc, target) == dir) //Make sure looking at appropriate border
|
||||||
if(air_group) return 0
|
|
||||||
return !density
|
return !density
|
||||||
else
|
else
|
||||||
return 1
|
return 1
|
||||||
|
|||||||
@@ -84,14 +84,19 @@
|
|||||||
open()
|
open()
|
||||||
addtimer(CALLBACK(src, .proc/close), check_access(null)? 50 : 20)
|
addtimer(CALLBACK(src, .proc/close), check_access(null)? 50 : 20)
|
||||||
|
|
||||||
/obj/machinery/door/window/CanPass(atom/movable/mover, turf/target, height, air_group)
|
/obj/machinery/door/window/CanPass(atom/movable/mover, turf/target)
|
||||||
if(istype(mover) && mover.checkpass(PASSGLASS))
|
if(istype(mover) && mover.checkpass(PASSGLASS))
|
||||||
return 1
|
return TRUE
|
||||||
if(get_dir(mover, loc) == turn(dir, 180)) //Make sure looking at appropriate border
|
if(get_dir(mover, loc) == turn(dir, 180)) //Make sure looking at appropriate border
|
||||||
if(air_group) return 0
|
|
||||||
return !density
|
return !density
|
||||||
else
|
return TRUE
|
||||||
return 1
|
|
||||||
|
/obj/machinery/door/window/CanZASPass(turf/T, is_zone)
|
||||||
|
if(get_dir(T, loc) == turn(dir, 180))
|
||||||
|
if(is_zone) // No merging allowed.
|
||||||
|
return ATMOS_PASS_NO
|
||||||
|
return ..() // Air can flow if open (density == FALSE).
|
||||||
|
return ATMOS_PASS_YES // Windoors don't block if not facing the right way.
|
||||||
|
|
||||||
/obj/machinery/door/window/CheckExit(atom/movable/mover as mob|obj, turf/target as turf)
|
/obj/machinery/door/window/CheckExit(atom/movable/mover as mob|obj, turf/target as turf)
|
||||||
if(istype(mover) && mover.checkpass(PASSGLASS))
|
if(istype(mover) && mover.checkpass(PASSGLASS))
|
||||||
|
|||||||
@@ -180,7 +180,7 @@
|
|||||||
|
|
||||||
to_chat(user, "<span class='notice'>[attached ? attached : "No one"] is attached.</span>")
|
to_chat(user, "<span class='notice'>[attached ? attached : "No one"] is attached.</span>")
|
||||||
|
|
||||||
/obj/machinery/iv_drip/CanPass(atom/movable/mover, turf/target, height = 0, air_group = 0)
|
/obj/machinery/iv_drip/CanPass(atom/movable/mover, turf/target)
|
||||||
if(height && istype(mover) && mover.checkpass(PASSTABLE)) //allow bullets, beams, thrown objects, mice, drones, and the like through.
|
if(istype(mover) && mover.checkpass(PASSTABLE)) //allow bullets, beams, thrown objects, mice, drones, and the like through.
|
||||||
return 1
|
return TRUE
|
||||||
return ..()
|
return ..()
|
||||||
|
|||||||
@@ -15,14 +15,14 @@
|
|||||||
var/frequency = 1379
|
var/frequency = 1379
|
||||||
var/datum/radio_frequency/radio_connection
|
var/datum/radio_frequency/radio_connection
|
||||||
|
|
||||||
/obj/machinery/mech_sensor/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
/obj/machinery/mech_sensor/CanPass(atom/movable/mover, turf/target)
|
||||||
if(!src.enabled()) return 1
|
if(!enabled())
|
||||||
if(air_group || (height==0)) return 1
|
return TRUE
|
||||||
|
|
||||||
if ((get_dir(loc, target) & dir) && src.is_blocked(mover))
|
if((get_dir(loc, target) & dir) && src.is_blocked(mover))
|
||||||
src.give_feedback(mover)
|
src.give_feedback(mover)
|
||||||
return 0
|
return FALSE
|
||||||
return 1
|
return TRUE
|
||||||
|
|
||||||
/obj/machinery/mech_sensor/proc/is_blocked(O as obj)
|
/obj/machinery/mech_sensor/proc/is_blocked(O as obj)
|
||||||
if(istype(O, /obj/mecha/medical/odysseus))
|
if(istype(O, /obj/mecha/medical/odysseus))
|
||||||
|
|||||||
@@ -26,6 +26,7 @@
|
|||||||
density = 1
|
density = 1
|
||||||
opacity = 1
|
opacity = 1
|
||||||
anchored = 1
|
anchored = 1
|
||||||
|
can_atmos_pass = ATMOS_PASS_NO
|
||||||
var/health = 200
|
var/health = 200
|
||||||
//var/mob/living/affecting = null
|
//var/mob/living/affecting = null
|
||||||
|
|
||||||
@@ -128,8 +129,7 @@
|
|||||||
..()
|
..()
|
||||||
return
|
return
|
||||||
|
|
||||||
/obj/effect/alien/resin/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
/obj/effect/alien/resin/CanPass(atom/movable/mover, turf/target)
|
||||||
if(air_group) return 0
|
|
||||||
if(istype(mover) && mover.checkpass(PASSGLASS))
|
if(istype(mover) && mover.checkpass(PASSGLASS))
|
||||||
return !opacity
|
return !opacity
|
||||||
return !density
|
return !density
|
||||||
|
|||||||
@@ -130,6 +130,7 @@
|
|||||||
anchored = 1
|
anchored = 1
|
||||||
name = "foamed metal"
|
name = "foamed metal"
|
||||||
desc = "A lightweight foamed metal wall."
|
desc = "A lightweight foamed metal wall."
|
||||||
|
can_atmos_pass = ATMOS_PASS_NO
|
||||||
var/metal = 1 // 1 = aluminum, 2 = iron
|
var/metal = 1 // 1 = aluminum, 2 = iron
|
||||||
|
|
||||||
/obj/structure/foamedmetal/New()
|
/obj/structure/foamedmetal/New()
|
||||||
@@ -178,8 +179,3 @@
|
|||||||
qdel(src)
|
qdel(src)
|
||||||
else
|
else
|
||||||
user << "<span class='notice'>You hit the metal foam to no effect.</span>"
|
user << "<span class='notice'>You hit the metal foam to no effect.</span>"
|
||||||
|
|
||||||
/obj/structure/foamedmetal/CanPass(atom/movable/mover, turf/target, height=1.5, air_group = 0)
|
|
||||||
if(air_group)
|
|
||||||
return 0
|
|
||||||
return !density
|
|
||||||
@@ -62,17 +62,16 @@
|
|||||||
icon_state = "stickyweb2"
|
icon_state = "stickyweb2"
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
/obj/effect/spider/stickyweb/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
/obj/effect/spider/stickyweb/CanPass(atom/movable/mover, turf/target)
|
||||||
if(air_group || (height==0)) return 1
|
|
||||||
if(istype(mover, /mob/living/simple_mob/animal/giant_spider))
|
if(istype(mover, /mob/living/simple_mob/animal/giant_spider))
|
||||||
return 1
|
return TRUE
|
||||||
else if(istype(mover, /mob/living))
|
else if(istype(mover, /mob/living))
|
||||||
if(prob(50))
|
if(prob(50))
|
||||||
mover << "<span class='warning'>You get stuck in \the [src] for a moment.</span>"
|
to_chat(mover, span("warning", "You get stuck in \the [src] for a moment."))
|
||||||
return 0
|
return FALSE
|
||||||
else if(istype(mover, /obj/item/projectile))
|
else if(istype(mover, /obj/item/projectile))
|
||||||
return prob(30)
|
return prob(30)
|
||||||
return 1
|
return TRUE
|
||||||
|
|
||||||
/obj/effect/spider/eggcluster
|
/obj/effect/spider/eggcluster
|
||||||
name = "egg cluster"
|
name = "egg cluster"
|
||||||
|
|||||||
@@ -8,13 +8,12 @@
|
|||||||
density = 0
|
density = 0
|
||||||
opacity = 0
|
opacity = 0
|
||||||
|
|
||||||
/obj/effect/zone_divider/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
/obj/effect/zone_divider/CanZASPass(turf/T, is_zone)
|
||||||
// Special case to prevent us from being part of a zone during the first air master tick.
|
// Special case to prevent us from being part of a zone during the first air master tick.
|
||||||
// We must merge ourselves into a zone on next tick. This will cause a bit of lag on
|
// We must merge ourselves into a zone on next tick. This will cause a bit of lag on
|
||||||
// startup, but it can't really be helped you know?
|
// startup, but it can't really be helped you know?
|
||||||
if(air_master && air_master.current_cycle == 0)
|
if(air_master && air_master.current_cycle == 0)
|
||||||
spawn(1)
|
spawn(1)
|
||||||
air_master.mark_for_update(get_turf(src))
|
air_master.mark_for_update(get_turf(src))
|
||||||
return 0
|
return ATMOS_PASS_NO
|
||||||
return !air_group // Anything except zones can pass
|
return is_zone ? ATMOS_PASS_NO : ATMOS_PASS_YES // Anything except zones can pass
|
||||||
|
|
||||||
|
|||||||
@@ -286,16 +286,16 @@ var/list/tape_roll_applications = list()
|
|||||||
update_icon()
|
update_icon()
|
||||||
name = "crumpled [name]"
|
name = "crumpled [name]"
|
||||||
|
|
||||||
/obj/item/tape/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
/obj/item/tape/CanPass(atom/movable/mover, turf/target)
|
||||||
if(!lifted && ismob(mover))
|
if(!lifted && ismob(mover))
|
||||||
var/mob/M = mover
|
var/mob/M = mover
|
||||||
add_fingerprint(M)
|
add_fingerprint(M)
|
||||||
if (!allowed(M)) //only select few learn art of not crumpling the tape
|
if(!allowed(M)) //only select few learn art of not crumpling the tape
|
||||||
M << "<span class='warning'>You are not supposed to go past [src]...</span>"
|
to_chat(M, span("warning", "You are not supposed to go past \the [src]..."))
|
||||||
if(M.a_intent == I_HELP && !(istype(M, /mob/living/simple_mob)))
|
if(M.a_intent == I_HELP && !(istype(M, /mob/living/simple_mob)))
|
||||||
return 0
|
return FALSE
|
||||||
crumple()
|
crumple()
|
||||||
return ..(mover)
|
return ..()
|
||||||
|
|
||||||
/obj/item/tape/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
/obj/item/tape/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||||
breaktape(user)
|
breaktape(user)
|
||||||
|
|||||||
@@ -132,11 +132,8 @@ two tiles on initialization, and which way a cliff is facing may change during m
|
|||||||
|
|
||||||
// Movement-related code.
|
// Movement-related code.
|
||||||
|
|
||||||
/obj/structure/cliff/CanPass(atom/movable/mover, turf/target, height = 0, air_group = 0)
|
/obj/structure/cliff/CanPass(atom/movable/mover, turf/target)
|
||||||
if(air_group || height == 0)
|
if(isliving(mover))
|
||||||
return TRUE // Airflow can always pass.
|
|
||||||
|
|
||||||
else if(isliving(mover))
|
|
||||||
var/mob/living/L = mover
|
var/mob/living/L = mover
|
||||||
if(L.hovering) // Flying mobs can always pass.
|
if(L.hovering) // Flying mobs can always pass.
|
||||||
return TRUE
|
return TRUE
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
user << "<span class='notice'>You cannot hang [W] on [src]</span>"
|
user << "<span class='notice'>You cannot hang [W] on [src]</span>"
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
/obj/structure/coatrack/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
/obj/structure/coatrack/CanPass(atom/movable/mover, turf/target)
|
||||||
var/can_hang = 0
|
var/can_hang = 0
|
||||||
for (var/T in allowed)
|
for (var/T in allowed)
|
||||||
if(istype(mover,T))
|
if(istype(mover,T))
|
||||||
|
|||||||
@@ -68,7 +68,7 @@
|
|||||||
else
|
else
|
||||||
to_chat(user, "It is full.")
|
to_chat(user, "It is full.")
|
||||||
|
|
||||||
/obj/structure/closet/CanPass(atom/movable/mover, turf/target, height, air_group)
|
/obj/structure/closet/CanPass(atom/movable/mover, turf/target)
|
||||||
if(wall_mounted)
|
if(wall_mounted)
|
||||||
return TRUE
|
return TRUE
|
||||||
return ..()
|
return ..()
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
"<span class='notice'>You stop climbing into \the [src.name].</span>")
|
"<span class='notice'>You stop climbing into \the [src.name].</span>")
|
||||||
return
|
return
|
||||||
|
|
||||||
/obj/structure/closet/grave/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
/obj/structure/closet/grave/CanPass(atom/movable/mover, turf/target)
|
||||||
if(opened && ismob(mover))
|
if(opened && ismob(mover))
|
||||||
var/mob/M = mover
|
var/mob/M = mover
|
||||||
add_fingerprint(M)
|
add_fingerprint(M)
|
||||||
|
|||||||
@@ -63,7 +63,7 @@
|
|||||||
hole_size = LARGE_HOLE
|
hole_size = LARGE_HOLE
|
||||||
|
|
||||||
// Projectiles can pass through fences.
|
// Projectiles can pass through fences.
|
||||||
/obj/structure/fence/CanPass(atom/movable/mover, turf/target, height = 0, air_group = 0)
|
/obj/structure/fence/CanPass(atom/movable/mover, turf/target)
|
||||||
if(istype(mover, /obj/item/projectile))
|
if(istype(mover, /obj/item/projectile))
|
||||||
return TRUE
|
return TRUE
|
||||||
return ..()
|
return ..()
|
||||||
|
|||||||
@@ -38,15 +38,12 @@
|
|||||||
if(epitaph)
|
if(epitaph)
|
||||||
to_chat(user, epitaph)
|
to_chat(user, epitaph)
|
||||||
|
|
||||||
/obj/structure/gravemarker/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
/obj/structure/gravemarker/CanPass(atom/movable/mover, turf/target)
|
||||||
if(!mover)
|
|
||||||
return 1
|
|
||||||
if(istype(mover) && mover.checkpass(PASSTABLE))
|
if(istype(mover) && mover.checkpass(PASSTABLE))
|
||||||
return 1
|
return TRUE
|
||||||
if(get_dir(loc, target) & dir)
|
if(get_dir(loc, target) & dir)
|
||||||
return !density
|
return !density
|
||||||
else
|
return TRUE
|
||||||
return 1
|
|
||||||
|
|
||||||
/obj/structure/gravemarker/CheckExit(atom/movable/O as mob|obj, target as turf)
|
/obj/structure/gravemarker/CheckExit(atom/movable/O as mob|obj, target as turf)
|
||||||
if(istype(O) && O.checkpass(PASSTABLE))
|
if(istype(O) && O.checkpass(PASSTABLE))
|
||||||
|
|||||||
@@ -49,15 +49,12 @@
|
|||||||
|
|
||||||
attack_generic(user,damage_dealt,attack_message)
|
attack_generic(user,damage_dealt,attack_message)
|
||||||
|
|
||||||
/obj/structure/grille/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
/obj/structure/grille/CanPass(atom/movable/mover, turf/target)
|
||||||
if(air_group || (height==0)) return 1
|
|
||||||
if(istype(mover) && mover.checkpass(PASSGRILLE))
|
if(istype(mover) && mover.checkpass(PASSGRILLE))
|
||||||
return 1
|
return TRUE
|
||||||
else
|
if(istype(mover, /obj/item/projectile))
|
||||||
if(istype(mover, /obj/item/projectile))
|
return prob(30)
|
||||||
return prob(30)
|
return !density
|
||||||
else
|
|
||||||
return !density
|
|
||||||
|
|
||||||
/obj/structure/grille/bullet_act(var/obj/item/projectile/Proj)
|
/obj/structure/grille/bullet_act(var/obj/item/projectile/Proj)
|
||||||
if(!Proj) return
|
if(!Proj) return
|
||||||
@@ -235,14 +232,10 @@
|
|||||||
|
|
||||||
/obj/structure/grille/cult
|
/obj/structure/grille/cult
|
||||||
name = "cult grille"
|
name = "cult grille"
|
||||||
desc = "A matrice built out of an unknown material, with some sort of force field blocking air around it"
|
desc = "A matrice built out of an unknown material, with some sort of force field blocking air around it."
|
||||||
icon_state = "grillecult"
|
icon_state = "grillecult"
|
||||||
health = 40 //Make it strong enough to avoid people breaking in too easily
|
health = 40 // Make it strong enough to avoid people breaking in too easily.
|
||||||
|
can_atmos_pass = ATMOS_PASS_NO // Make sure air doesn't drain.
|
||||||
/obj/structure/grille/cult/CanPass(atom/movable/mover, turf/target, height = 1.5, air_group = 0)
|
|
||||||
if(air_group)
|
|
||||||
return 0 //Make sure air doesn't drain
|
|
||||||
..()
|
|
||||||
|
|
||||||
/obj/structure/grille/broken/cult
|
/obj/structure/grille/broken/cult
|
||||||
icon_state = "grillecult-b"
|
icon_state = "grillecult-b"
|
||||||
|
|||||||
@@ -64,15 +64,4 @@
|
|||||||
/obj/structure/plasticflaps/mining //A specific type for mining that doesn't allow airflow because of them damn crates
|
/obj/structure/plasticflaps/mining //A specific type for mining that doesn't allow airflow because of them damn crates
|
||||||
name = "airtight plastic flaps"
|
name = "airtight plastic flaps"
|
||||||
desc = "Heavy duty, airtight, plastic flaps."
|
desc = "Heavy duty, airtight, plastic flaps."
|
||||||
|
can_atmos_pass = ATMOS_PASS_NO
|
||||||
/obj/structure/plasticflaps/mining/New() //set the turf below the flaps to block air
|
|
||||||
var/turf/T = get_turf(loc)
|
|
||||||
if(T)
|
|
||||||
T.blocks_air = 1
|
|
||||||
..()
|
|
||||||
|
|
||||||
/obj/structure/plasticflaps/mining/Destroy() //lazy hack to set the turf to allow air to pass if it's a simulated floor
|
|
||||||
var/turf/T = get_turf(loc)
|
|
||||||
if(T && istype(T, /turf/simulated/floor))
|
|
||||||
T.blocks_air = 0
|
|
||||||
..()
|
|
||||||
|
|||||||
@@ -34,15 +34,12 @@
|
|||||||
for(var/obj/structure/railing/R in orange(location, 1))
|
for(var/obj/structure/railing/R in orange(location, 1))
|
||||||
R.update_icon()
|
R.update_icon()
|
||||||
|
|
||||||
/obj/structure/railing/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
/obj/structure/railing/CanPass(atom/movable/mover, turf/target)
|
||||||
if(!mover)
|
|
||||||
return 1
|
|
||||||
if(istype(mover) && mover.checkpass(PASSTABLE))
|
if(istype(mover) && mover.checkpass(PASSTABLE))
|
||||||
return 1
|
return TRUE
|
||||||
if(get_dir(loc, target) == dir)
|
if(get_dir(mover, target) == turn(dir, 180))
|
||||||
return !density
|
return !density
|
||||||
else
|
return TRUE
|
||||||
return 1
|
|
||||||
|
|
||||||
/obj/structure/railing/examine(mob/user)
|
/obj/structure/railing/examine(mob/user)
|
||||||
. = ..()
|
. = ..()
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
name = "door"
|
name = "door"
|
||||||
density = 1
|
density = 1
|
||||||
anchored = 1
|
anchored = 1
|
||||||
|
can_atmos_pass = ATMOS_PASS_DENSITY
|
||||||
|
|
||||||
icon = 'icons/obj/doors/material_doors.dmi'
|
icon = 'icons/obj/doors/material_doors.dmi'
|
||||||
icon_state = "metal"
|
icon_state = "metal"
|
||||||
@@ -36,7 +37,7 @@
|
|||||||
else
|
else
|
||||||
set_opacity(1)
|
set_opacity(1)
|
||||||
if(material.products_need_process())
|
if(material.products_need_process())
|
||||||
START_PROCESSING(SSobj, src)
|
START_PROCESSING(SSobj, src)
|
||||||
update_nearby_tiles(need_rebuild=1)
|
update_nearby_tiles(need_rebuild=1)
|
||||||
|
|
||||||
/obj/structure/simple_door/Destroy()
|
/obj/structure/simple_door/Destroy()
|
||||||
@@ -63,8 +64,7 @@
|
|||||||
/obj/structure/simple_door/attack_hand(mob/user as mob)
|
/obj/structure/simple_door/attack_hand(mob/user as mob)
|
||||||
return TryToSwitchState(user)
|
return TryToSwitchState(user)
|
||||||
|
|
||||||
/obj/structure/simple_door/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
/obj/structure/simple_door/CanPass(atom/movable/mover, turf/target)
|
||||||
if(air_group) return 0
|
|
||||||
if(istype(mover, /obj/effect/beam))
|
if(istype(mover, /obj/effect/beam))
|
||||||
return !opacity
|
return !opacity
|
||||||
return !density
|
return !density
|
||||||
|
|||||||
@@ -68,11 +68,10 @@
|
|||||||
name = "[material.display_name] [initial(name)]"
|
name = "[material.display_name] [initial(name)]"
|
||||||
desc += " It's made of [material.use_name]."
|
desc += " It's made of [material.use_name]."
|
||||||
|
|
||||||
/obj/structure/bed/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
/obj/structure/bed/CanPass(atom/movable/mover, turf/target)
|
||||||
if(istype(mover) && mover.checkpass(PASSTABLE))
|
if(istype(mover) && mover.checkpass(PASSTABLE))
|
||||||
return 1
|
return TRUE
|
||||||
else
|
return ..()
|
||||||
return ..()
|
|
||||||
|
|
||||||
/obj/structure/bed/ex_act(severity)
|
/obj/structure/bed/ex_act(severity)
|
||||||
switch(severity)
|
switch(severity)
|
||||||
|
|||||||
@@ -54,14 +54,12 @@ obj/structure/windoor_assembly/Destroy()
|
|||||||
/obj/structure/windoor_assembly/update_icon()
|
/obj/structure/windoor_assembly/update_icon()
|
||||||
icon_state = "[facing]_[secure]windoor_assembly[state]"
|
icon_state = "[facing]_[secure]windoor_assembly[state]"
|
||||||
|
|
||||||
/obj/structure/windoor_assembly/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
/obj/structure/windoor_assembly/CanPass(atom/movable/mover, turf/target)
|
||||||
if(istype(mover) && mover.checkpass(PASSGLASS))
|
if(istype(mover) && mover.checkpass(PASSGLASS))
|
||||||
return 1
|
return TRUE
|
||||||
if(get_dir(loc, target) == dir) //Make sure looking at appropriate border
|
if(get_dir(loc, target) == dir) //Make sure looking at appropriate border
|
||||||
if(air_group) return 0
|
|
||||||
return !density
|
return !density
|
||||||
else
|
return TRUE
|
||||||
return 1
|
|
||||||
|
|
||||||
/obj/structure/windoor_assembly/CheckExit(atom/movable/mover as mob|obj, turf/target as turf)
|
/obj/structure/windoor_assembly/CheckExit(atom/movable/mover as mob|obj, turf/target as turf)
|
||||||
if(istype(mover) && mover.checkpass(PASSGLASS))
|
if(istype(mover) && mover.checkpass(PASSGLASS))
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
desc = "A window."
|
desc = "A window."
|
||||||
icon = 'icons/obj/structures.dmi'
|
icon = 'icons/obj/structures.dmi'
|
||||||
density = 1
|
density = 1
|
||||||
|
can_atmos_pass = ATMOS_PASS_DENSITY
|
||||||
w_class = ITEMSIZE_NORMAL
|
w_class = ITEMSIZE_NORMAL
|
||||||
|
|
||||||
layer = WINDOW_LAYER
|
layer = WINDOW_LAYER
|
||||||
@@ -129,7 +130,7 @@
|
|||||||
/obj/structure/window/blob_act()
|
/obj/structure/window/blob_act()
|
||||||
take_damage(50)
|
take_damage(50)
|
||||||
|
|
||||||
/obj/structure/window/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
/obj/structure/window/CanPass(atom/movable/mover, turf/target)
|
||||||
if(istype(mover) && mover.checkpass(PASSGLASS))
|
if(istype(mover) && mover.checkpass(PASSGLASS))
|
||||||
return TRUE
|
return TRUE
|
||||||
if(is_fulltile())
|
if(is_fulltile())
|
||||||
@@ -139,6 +140,11 @@
|
|||||||
else
|
else
|
||||||
return TRUE
|
return TRUE
|
||||||
|
|
||||||
|
/obj/structure/window/CanZASPass(turf/T, is_zone)
|
||||||
|
if(is_fulltile() || get_dir(T, loc) == turn(dir, 180)) // Make sure we're handling the border correctly.
|
||||||
|
return anchored ? ATMOS_PASS_NO : ATMOS_PASS_YES // If it's anchored, it'll block air.
|
||||||
|
return ATMOS_PASS_YES // Don't stop airflow from the other sides.
|
||||||
|
|
||||||
/obj/structure/window/CheckExit(atom/movable/O as mob|obj, target as turf)
|
/obj/structure/window/CheckExit(atom/movable/O as mob|obj, target as turf)
|
||||||
if(istype(O) && O.checkpass(PASSGLASS))
|
if(istype(O) && O.checkpass(PASSGLASS))
|
||||||
return 1
|
return 1
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
density = 1
|
density = 1
|
||||||
anchored = 1.0
|
anchored = 1.0
|
||||||
pressure_resistance = 4*ONE_ATMOSPHERE
|
pressure_resistance = 4*ONE_ATMOSPHERE
|
||||||
|
can_atmos_pass = ATMOS_PASS_NO
|
||||||
var/win_path = /obj/structure/window/basic
|
var/win_path = /obj/structure/window/basic
|
||||||
var/activated
|
var/activated
|
||||||
|
|
||||||
@@ -22,7 +23,7 @@
|
|||||||
/obj/effect/wingrille_spawn/attack_generic()
|
/obj/effect/wingrille_spawn/attack_generic()
|
||||||
activate()
|
activate()
|
||||||
|
|
||||||
/obj/effect/wingrille_spawn/CanPass(atom/movable/mover, turf/target, height=1.5, air_group = 0)
|
/obj/effect/wingrille_spawn/CanPass(atom/movable/mover, turf/target)
|
||||||
return FALSE
|
return FALSE
|
||||||
|
|
||||||
/obj/effect/wingrille_spawn/Initialize()
|
/obj/effect/wingrille_spawn/Initialize()
|
||||||
|
|||||||
@@ -9,13 +9,15 @@
|
|||||||
density = 1
|
density = 1
|
||||||
opacity = 0
|
opacity = 0
|
||||||
anchored = 1
|
anchored = 1
|
||||||
|
can_atmos_pass = ATMOS_PASS_NO
|
||||||
|
|
||||||
var/window_flags = 0 // Bitflags to indicate connected windows
|
var/window_flags = 0 // Bitflags to indicate connected windows
|
||||||
var/wall_flags = 0 // Bitflags to indicate connected walls
|
var/wall_flags = 0 // Bitflags to indicate connected walls
|
||||||
|
|
||||||
/obj/structure/shuttle/window/CanPass(atom/movable/mover, turf/target, height, air_group)
|
/obj/structure/shuttle/window/CanPass(atom/movable/mover, turf/target)
|
||||||
if(!height || air_group) return 0
|
if(istype(mover) && mover.checkpass(PASSGLASS))
|
||||||
else return ..()
|
return TRUE
|
||||||
|
return ..()
|
||||||
|
|
||||||
/obj/structure/shuttle/window/Initialize()
|
/obj/structure/shuttle/window/Initialize()
|
||||||
. = ..()
|
. = ..()
|
||||||
|
|||||||
@@ -22,10 +22,8 @@
|
|||||||
update_icon()
|
update_icon()
|
||||||
return ..(loc)
|
return ..(loc)
|
||||||
|
|
||||||
/obj/effect/blob/CanPass(var/atom/movable/mover, vra/turf/target, var/height = 0, var/air_group = 0)
|
/obj/effect/blob/CanPass(var/atom/movable/mover, vra/turf/target)
|
||||||
if(air_group || height == 0)
|
return FALSE
|
||||||
return 1
|
|
||||||
return 0
|
|
||||||
|
|
||||||
/obj/effect/blob/ex_act(var/severity)
|
/obj/effect/blob/ex_act(var/severity)
|
||||||
switch(severity)
|
switch(severity)
|
||||||
@@ -207,5 +205,5 @@
|
|||||||
else
|
else
|
||||||
icon_state = "blob_damaged"
|
icon_state = "blob_damaged"
|
||||||
|
|
||||||
/obj/effect/blob/shield/CanPass(var/atom/movable/mover, var/turf/target, var/height = 0, var/air_group = 0)
|
/obj/effect/blob/shield/CanPass(var/atom/movable/mover, var/turf/target)
|
||||||
return !density
|
return !density
|
||||||
|
|||||||
@@ -46,30 +46,19 @@ var/list/blobs = list()
|
|||||||
color = null
|
color = null
|
||||||
set_light(0)
|
set_light(0)
|
||||||
|
|
||||||
/obj/structure/blob/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
// Blob tiles are not actually dense so we need Special Code(tm).
|
||||||
world << "/obj/structure/blob/CanPass(mover=[mover], target=[target], height=[height], air_group=[air_group]) called on [src]."
|
/obj/structure/blob/CanPass(atom/movable/mover, turf/target)
|
||||||
if(air_group || (height==0))
|
|
||||||
world << "Returned true due to being air group or having height=0"
|
|
||||||
return TRUE
|
|
||||||
if(istype(mover) && mover.checkpass(PASSBLOB))
|
if(istype(mover) && mover.checkpass(PASSBLOB))
|
||||||
world << "Returned true due to having PASSBLOB."
|
|
||||||
return TRUE
|
return TRUE
|
||||||
else if(istype(mover, /mob/living))
|
else if(istype(mover, /mob/living))
|
||||||
var/mob/living/L = mover
|
var/mob/living/L = mover
|
||||||
if(L.faction == "blob")
|
if(L.faction == "blob")
|
||||||
world << "Returned true due to being in blob faction."
|
|
||||||
return TRUE
|
return TRUE
|
||||||
else if(istype(mover, /obj/item/projectile))
|
else if(istype(mover, /obj/item/projectile))
|
||||||
var/obj/item/projectile/P = mover
|
var/obj/item/projectile/P = mover
|
||||||
if(P.firer && P.firer.faction == "blob")
|
if(istype(P.firer) && P.firer.faction == "blob")
|
||||||
world << "Returned true due to being a projectile fired by someone in blob faction."
|
|
||||||
return TRUE
|
return TRUE
|
||||||
world << "Returned false due to being a projectile, with firer not in faction."
|
return FALSE
|
||||||
return FALSE
|
|
||||||
else
|
|
||||||
world << "Returned false."
|
|
||||||
return FALSE
|
|
||||||
// return ..()
|
|
||||||
|
|
||||||
/obj/structure/blob/examine(mob/user)
|
/obj/structure/blob/examine(mob/user)
|
||||||
..()
|
..()
|
||||||
@@ -264,7 +253,7 @@ var/list/blobs = list()
|
|||||||
if(!P)
|
if(!P)
|
||||||
return
|
return
|
||||||
|
|
||||||
if(P.firer && P.firer.faction == "blob")
|
if(istype(P.firer) && P.firer.faction == "blob")
|
||||||
return
|
return
|
||||||
|
|
||||||
var/damage = P.get_structure_damage() // So tasers don't hurt the blob.
|
var/damage = P.get_structure_damage() // So tasers don't hurt the blob.
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
desc = "A solid wall of slightly twitching tendrils."
|
desc = "A solid wall of slightly twitching tendrils."
|
||||||
max_integrity = 100
|
max_integrity = 100
|
||||||
point_return = 4
|
point_return = 4
|
||||||
|
can_atmos_pass = ATMOS_PASS_NO
|
||||||
|
|
||||||
/obj/structure/blob/shield/core
|
/obj/structure/blob/shield/core
|
||||||
point_return = 0
|
point_return = 0
|
||||||
|
|||||||
@@ -320,19 +320,18 @@
|
|||||||
visible_message("<span class='notice'>[user] dunks [W] into the [src]!</span>", 3)
|
visible_message("<span class='notice'>[user] dunks [W] into the [src]!</span>", 3)
|
||||||
return
|
return
|
||||||
|
|
||||||
/obj/structure/holohoop/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
/obj/structure/holohoop/CanPass(atom/movable/mover, turf/target)
|
||||||
if (istype(mover,/obj/item) && mover.throwing)
|
if (istype(mover,/obj/item) && mover.throwing)
|
||||||
var/obj/item/I = mover
|
var/obj/item/I = mover
|
||||||
if(istype(I, /obj/item/projectile))
|
if(istype(I, /obj/item/projectile))
|
||||||
return
|
return TRUE
|
||||||
if(prob(50))
|
if(prob(50))
|
||||||
I.loc = src.loc
|
I.forceMove(loc)
|
||||||
visible_message("<span class='notice'>Swish! \the [I] lands in \the [src].</span>", 3)
|
visible_message(span("notice", "Swish! \the [I] lands in \the [src]."), 3)
|
||||||
else
|
else
|
||||||
visible_message("<span class='warning'>\The [I] bounces off of \the [src]'s rim!</span>", 3)
|
visible_message(span("warning", "\The [I] bounces off of \the [src]'s rim!"), 3)
|
||||||
return 0
|
return FALSE
|
||||||
else
|
return ..()
|
||||||
return ..(mover, target, height, air_group)
|
|
||||||
|
|
||||||
|
|
||||||
/obj/machinery/readybutton
|
/obj/machinery/readybutton
|
||||||
|
|||||||
@@ -217,13 +217,10 @@
|
|||||||
|
|
||||||
..()
|
..()
|
||||||
|
|
||||||
/obj/machinery/portable_atmospherics/hydroponics/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
/obj/machinery/portable_atmospherics/hydroponics/CanPass(atom/movable/mover, turf/target)
|
||||||
if(air_group || (height==0)) return 1
|
|
||||||
|
|
||||||
if(istype(mover) && mover.checkpass(PASSTABLE))
|
if(istype(mover) && mover.checkpass(PASSTABLE))
|
||||||
return 1
|
return TRUE
|
||||||
else
|
return FALSE
|
||||||
return 0
|
|
||||||
|
|
||||||
/obj/machinery/portable_atmospherics/hydroponics/proc/check_health()
|
/obj/machinery/portable_atmospherics/hydroponics/proc/check_health()
|
||||||
if(seed && !dead && health <= 0)
|
if(seed && !dead && health <= 0)
|
||||||
|
|||||||
@@ -143,8 +143,8 @@
|
|||||||
var/mob/observer/dead/M = src
|
var/mob/observer/dead/M = src
|
||||||
M.manifest(user)
|
M.manifest(user)
|
||||||
|
|
||||||
/mob/observer/dead/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
/mob/observer/dead/CanPass(atom/movable/mover, turf/target)
|
||||||
return 1
|
return TRUE
|
||||||
/*
|
/*
|
||||||
Transfer_mind is there to check if mob is being deleted/not going to have a body.
|
Transfer_mind is there to check if mob is being deleted/not going to have a body.
|
||||||
Works together with spawning an observer, noted above.
|
Works together with spawning an observer, noted above.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/mob/CanPass(atom/movable/mover, turf/target, height, air_group)
|
/mob/CanPass(atom/movable/mover, turf/target)
|
||||||
if(ismob(mover))
|
if(ismob(mover))
|
||||||
var/mob/moving_mob = mover
|
var/mob/moving_mob = mover
|
||||||
if ((other_mobs && moving_mob.other_mobs))
|
if ((other_mobs && moving_mob.other_mobs))
|
||||||
@@ -9,4 +9,4 @@
|
|||||||
return (!mover.density || !density || lying)
|
return (!mover.density || !density || lying)
|
||||||
|
|
||||||
/mob/CanZASPass(turf/T, is_zone)
|
/mob/CanZASPass(turf/T, is_zone)
|
||||||
return TRUE
|
return ATMOS_PASS_YES
|
||||||
@@ -74,9 +74,8 @@ proc/cardinalrange(var/center)
|
|||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
/obj/machinery/am_shielding/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
/obj/machinery/am_shielding/CanPass(atom/movable/mover, turf/target)
|
||||||
if(air_group || (height==0)) return 1
|
return FALSE
|
||||||
return 0
|
|
||||||
|
|
||||||
|
|
||||||
/obj/machinery/am_shielding/process()
|
/obj/machinery/am_shielding/process()
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
update_icon()
|
update_icon()
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
/obj/effect/fusion_particle_catcher/CanPass(var/atom/movable/mover, var/turf/target, var/height=0, var/air_group=0)
|
/obj/effect/fusion_particle_catcher/CanPass(atom/movable/mover, turf/target)
|
||||||
if(istype(mover, /obj/effect/accelerated_particle) || istype(mover, /obj/item/projectile/beam))
|
if(istype(mover, /obj/effect/accelerated_particle) || istype(mover, /obj/item/projectile/beam))
|
||||||
return !density
|
return !density
|
||||||
return 1
|
return TRUE
|
||||||
|
|||||||
@@ -95,10 +95,8 @@
|
|||||||
stat |= BROKEN
|
stat |= BROKEN
|
||||||
|
|
||||||
// When anchored, don't let air past us.
|
// When anchored, don't let air past us.
|
||||||
/obj/machinery/compressor/CanPass(atom/movable/mover, turf/target, height=1.5, air_group = 0)
|
/obj/machinery/compressor/CanZASPass(turf/T, is_zone)
|
||||||
if(!height || air_group)
|
return anchored ? ATMOS_PASS_NO : ATMOS_PASS_YES
|
||||||
return !anchored
|
|
||||||
return !density
|
|
||||||
|
|
||||||
/obj/machinery/compressor/proc/locate_machinery()
|
/obj/machinery/compressor/proc/locate_machinery()
|
||||||
if(turbine)
|
if(turbine)
|
||||||
|
|||||||
@@ -467,7 +467,7 @@
|
|||||||
H.vent_gas(loc)
|
H.vent_gas(loc)
|
||||||
qdel(H)
|
qdel(H)
|
||||||
|
|
||||||
/obj/machinery/disposal/CanPass(atom/movable/mover, turf/target, height, air_group)
|
/obj/machinery/disposal/CanPass(atom/movable/mover, turf/target)
|
||||||
if(istype(mover, /obj/item/projectile))
|
if(istype(mover, /obj/item/projectile))
|
||||||
return 1
|
return 1
|
||||||
if (istype(mover,/obj/item) && mover.throwing)
|
if (istype(mover,/obj/item) && mover.throwing)
|
||||||
@@ -483,7 +483,7 @@
|
|||||||
M.show_message("\The [I] bounces off of \the [src]'s rim!", 3)
|
M.show_message("\The [I] bounces off of \the [src]'s rim!", 3)
|
||||||
return 0
|
return 0
|
||||||
else
|
else
|
||||||
return ..(mover, target, height, air_group)
|
return ..(mover, target)
|
||||||
|
|
||||||
// virtual disposal object
|
// virtual disposal object
|
||||||
// travels through pipes in lieu of actual items
|
// travels through pipes in lieu of actual items
|
||||||
|
|||||||
@@ -53,10 +53,8 @@
|
|||||||
projector = null
|
projector = null
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
/obj/effect/directional_shield/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
/obj/effect/directional_shield/CanPass(atom/movable/mover, turf/target)
|
||||||
if(air_group || (height==0))
|
if(istype(mover, /obj/item/projectile))
|
||||||
return TRUE
|
|
||||||
else if(istype(mover, /obj/item/projectile))
|
|
||||||
var/obj/item/projectile/P = mover
|
var/obj/item/projectile/P = mover
|
||||||
if(istype(P, /obj/item/projectile/test)) // Turrets need to try to kill the shield and so their test bullet needs to penetrate.
|
if(istype(P, /obj/item/projectile/test)) // Turrets need to try to kill the shield and so their test bullet needs to penetrate.
|
||||||
return TRUE
|
return TRUE
|
||||||
@@ -64,8 +62,6 @@
|
|||||||
var/bad_arc = reverse_direction(dir) // Arc of directions from which we cannot block.
|
var/bad_arc = reverse_direction(dir) // Arc of directions from which we cannot block.
|
||||||
if(check_shield_arc(src, bad_arc, P)) // This is actually for mobs but it will work for our purposes as well.
|
if(check_shield_arc(src, bad_arc, P)) // This is actually for mobs but it will work for our purposes as well.
|
||||||
return FALSE
|
return FALSE
|
||||||
else
|
|
||||||
return TRUE
|
|
||||||
return TRUE
|
return TRUE
|
||||||
|
|
||||||
/obj/effect/directional_shield/bullet_act(var/obj/item/projectile/P)
|
/obj/effect/directional_shield/bullet_act(var/obj/item/projectile/P)
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
opacity = 0
|
opacity = 0
|
||||||
anchored = 1
|
anchored = 1
|
||||||
unacidable = 1
|
unacidable = 1
|
||||||
|
can_atmos_pass = ATMOS_PASS_NO
|
||||||
var/const/max_health = 200
|
var/const/max_health = 200
|
||||||
var/health = max_health //The shield can only take so much beating (prevents perma-prisons)
|
var/health = max_health //The shield can only take so much beating (prevents perma-prisons)
|
||||||
var/shield_generate_power = 7500 //how much power we use when regenerating
|
var/shield_generate_power = 7500 //how much power we use when regenerating
|
||||||
@@ -38,10 +39,6 @@
|
|||||||
update_nearby_tiles()
|
update_nearby_tiles()
|
||||||
..()
|
..()
|
||||||
|
|
||||||
/obj/machinery/shield/CanPass(atom/movable/mover, turf/target, height, air_group)
|
|
||||||
if(!height || air_group) return 0
|
|
||||||
else return ..()
|
|
||||||
|
|
||||||
/obj/machinery/shield/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
/obj/machinery/shield/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||||
if(!istype(W)) return
|
if(!istype(W)) return
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
plane = MOB_PLANE
|
plane = MOB_PLANE
|
||||||
layer = ABOVE_MOB_LAYER
|
layer = ABOVE_MOB_LAYER
|
||||||
density = 0
|
density = 0
|
||||||
|
can_atmos_pass = ATMOS_PASS_DENSITY
|
||||||
var/obj/machinery/shield_gen/my_gen = null
|
var/obj/machinery/shield_gen/my_gen = null
|
||||||
var/strength = 0 // in Renwicks
|
var/strength = 0 // in Renwicks
|
||||||
var/ticks_recovering = 10
|
var/ticks_recovering = 10
|
||||||
@@ -103,15 +104,6 @@
|
|||||||
update_icon()
|
update_icon()
|
||||||
update_nearby_tiles()
|
update_nearby_tiles()
|
||||||
|
|
||||||
/obj/effect/energy_field/CanPass(atom/movable/mover, turf/target, height=1.5, air_group = 0)
|
|
||||||
//Purpose: Determines if the object (or airflow) can pass this atom.
|
|
||||||
//Called by: Movement, airflow.
|
|
||||||
//Inputs: The moving atom (optional), target turf, "height" and air group
|
|
||||||
//Outputs: Boolean if can pass.
|
|
||||||
|
|
||||||
//return (!density || !height || air_group)
|
|
||||||
return !density
|
|
||||||
|
|
||||||
/obj/effect/energy_field/update_icon(var/update_neightbors = 0)
|
/obj/effect/energy_field/update_icon(var/update_neightbors = 0)
|
||||||
overlays.Cut()
|
overlays.Cut()
|
||||||
var/list/adjacent_shields_dir = list()
|
var/list/adjacent_shields_dir = list()
|
||||||
|
|||||||
@@ -317,13 +317,9 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
/obj/machinery/shieldwall/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
/obj/machinery/shieldwall/CanPass(atom/movable/mover, turf/target)
|
||||||
if(air_group || (height==0)) return 1
|
|
||||||
|
|
||||||
if(istype(mover) && mover.checkpass(PASSGLASS))
|
if(istype(mover) && mover.checkpass(PASSGLASS))
|
||||||
return prob(20)
|
return prob(20)
|
||||||
else
|
if(istype(mover, /obj/item/projectile))
|
||||||
if (istype(mover, /obj/item/projectile))
|
return prob(10)
|
||||||
return prob(10)
|
return !density
|
||||||
else
|
|
||||||
return !src.density
|
|
||||||
|
|||||||
@@ -1,21 +1,20 @@
|
|||||||
|
|
||||||
/obj/structure/table/CanPass(atom/movable/mover, turf/target, height, air_group)
|
/obj/structure/table/CanPass(atom/movable/mover, turf/target)
|
||||||
if(air_group || (height==0)) return 1
|
|
||||||
if(istype(mover,/obj/item/projectile))
|
if(istype(mover,/obj/item/projectile))
|
||||||
return (check_cover(mover,target))
|
return (check_cover(mover,target))
|
||||||
if (flipped == 1)
|
if (flipped == 1)
|
||||||
if (get_dir(loc, target) == dir)
|
if (get_dir(loc, target) == dir)
|
||||||
return !density
|
return !density
|
||||||
else
|
else
|
||||||
return 1
|
return TRUE
|
||||||
if(istype(mover) && mover.checkpass(PASSTABLE))
|
if(istype(mover) && mover.checkpass(PASSTABLE))
|
||||||
return 1
|
return TRUE
|
||||||
if(locate(/obj/structure/table/bench) in get_turf(mover))
|
if(locate(/obj/structure/table/bench) in get_turf(mover))
|
||||||
return 0
|
return FALSE
|
||||||
var/obj/structure/table/table = locate(/obj/structure/table) in get_turf(mover)
|
var/obj/structure/table/table = locate(/obj/structure/table) in get_turf(mover)
|
||||||
if(table && !table.flipped)
|
if(table && !table.flipped)
|
||||||
return 1
|
return TRUE
|
||||||
return 0
|
return FALSE
|
||||||
|
|
||||||
//checks if projectile 'P' from turf 'from' can hit whatever is behind the table. Returns 1 if it can, 0 if bullet stops.
|
//checks if projectile 'P' from turf 'from' can hit whatever is behind the table. Returns 1 if it can, 0 if bullet stops.
|
||||||
/obj/structure/table/proc/check_cover(obj/item/projectile/P, turf/from)
|
/obj/structure/table/proc/check_cover(obj/item/projectile/P, turf/from)
|
||||||
|
|||||||
@@ -2629,7 +2629,7 @@
|
|||||||
#include "code\ZAS\Zone.dm"
|
#include "code\ZAS\Zone.dm"
|
||||||
#include "interface\interface.dm"
|
#include "interface\interface.dm"
|
||||||
#include "interface\skin.dmf"
|
#include "interface\skin.dmf"
|
||||||
#include "maps\example\example.dm"
|
#include "maps\southern_cross\southern_cross.dm"
|
||||||
#include "maps\submaps\space_submaps\space.dm"
|
#include "maps\submaps\space_submaps\space.dm"
|
||||||
#include "maps\submaps\surface_submaps\mountains\mountains.dm"
|
#include "maps\submaps\surface_submaps\mountains\mountains.dm"
|
||||||
#include "maps\submaps\surface_submaps\mountains\mountains_areas.dm"
|
#include "maps\submaps\surface_submaps\mountains\mountains_areas.dm"
|
||||||
|
|||||||
Reference in New Issue
Block a user