mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-22 16:12:36 +00:00
Finishes seperating ZAS logic from CanPass().
This commit is contained in:
@@ -132,11 +132,8 @@ two tiles on initialization, and which way a cliff is facing may change during m
|
||||
|
||||
// Movement-related code.
|
||||
|
||||
/obj/structure/cliff/CanPass(atom/movable/mover, turf/target, height = 0, air_group = 0)
|
||||
if(air_group || height == 0)
|
||||
return TRUE // Airflow can always pass.
|
||||
|
||||
else if(isliving(mover))
|
||||
/obj/structure/cliff/CanPass(atom/movable/mover, turf/target)
|
||||
if(isliving(mover))
|
||||
var/mob/living/L = mover
|
||||
if(L.hovering) // Flying mobs can always pass.
|
||||
return TRUE
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
user << "<span class='notice'>You cannot hang [W] on [src]</span>"
|
||||
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
|
||||
for (var/T in allowed)
|
||||
if(istype(mover,T))
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
else
|
||||
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)
|
||||
return TRUE
|
||||
return ..()
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
"<span class='notice'>You stop climbing into \the [src.name].</span>")
|
||||
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))
|
||||
var/mob/M = mover
|
||||
add_fingerprint(M)
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
hole_size = LARGE_HOLE
|
||||
|
||||
// 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))
|
||||
return TRUE
|
||||
return ..()
|
||||
|
||||
@@ -38,15 +38,12 @@
|
||||
if(epitaph)
|
||||
to_chat(user, epitaph)
|
||||
|
||||
/obj/structure/gravemarker/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(!mover)
|
||||
return 1
|
||||
/obj/structure/gravemarker/CanPass(atom/movable/mover, turf/target)
|
||||
if(istype(mover) && mover.checkpass(PASSTABLE))
|
||||
return 1
|
||||
return TRUE
|
||||
if(get_dir(loc, target) & dir)
|
||||
return !density
|
||||
else
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/obj/structure/gravemarker/CheckExit(atom/movable/O as mob|obj, target as turf)
|
||||
if(istype(O) && O.checkpass(PASSTABLE))
|
||||
|
||||
@@ -49,15 +49,12 @@
|
||||
|
||||
attack_generic(user,damage_dealt,attack_message)
|
||||
|
||||
/obj/structure/grille/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(air_group || (height==0)) return 1
|
||||
/obj/structure/grille/CanPass(atom/movable/mover, turf/target)
|
||||
if(istype(mover) && mover.checkpass(PASSGRILLE))
|
||||
return 1
|
||||
else
|
||||
if(istype(mover, /obj/item/projectile))
|
||||
return prob(30)
|
||||
else
|
||||
return !density
|
||||
return TRUE
|
||||
if(istype(mover, /obj/item/projectile))
|
||||
return prob(30)
|
||||
return !density
|
||||
|
||||
/obj/structure/grille/bullet_act(var/obj/item/projectile/Proj)
|
||||
if(!Proj) return
|
||||
@@ -235,14 +232,10 @@
|
||||
|
||||
/obj/structure/grille/cult
|
||||
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"
|
||||
health = 40 //Make it strong enough to avoid people breaking in too easily
|
||||
|
||||
/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
|
||||
..()
|
||||
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/broken/cult
|
||||
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
|
||||
name = "airtight plastic flaps"
|
||||
desc = "Heavy duty, airtight, plastic flaps."
|
||||
|
||||
/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
|
||||
..()
|
||||
can_atmos_pass = ATMOS_PASS_NO
|
||||
|
||||
@@ -34,15 +34,12 @@
|
||||
for(var/obj/structure/railing/R in orange(location, 1))
|
||||
R.update_icon()
|
||||
|
||||
/obj/structure/railing/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(!mover)
|
||||
return 1
|
||||
/obj/structure/railing/CanPass(atom/movable/mover, turf/target)
|
||||
if(istype(mover) && mover.checkpass(PASSTABLE))
|
||||
return 1
|
||||
if(get_dir(loc, target) == dir)
|
||||
return TRUE
|
||||
if(get_dir(mover, target) == turn(dir, 180))
|
||||
return !density
|
||||
else
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/obj/structure/railing/examine(mob/user)
|
||||
. = ..()
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
name = "door"
|
||||
density = 1
|
||||
anchored = 1
|
||||
can_atmos_pass = ATMOS_PASS_DENSITY
|
||||
|
||||
icon = 'icons/obj/doors/material_doors.dmi'
|
||||
icon_state = "metal"
|
||||
@@ -36,7 +37,7 @@
|
||||
else
|
||||
set_opacity(1)
|
||||
if(material.products_need_process())
|
||||
START_PROCESSING(SSobj, src)
|
||||
START_PROCESSING(SSobj, src)
|
||||
update_nearby_tiles(need_rebuild=1)
|
||||
|
||||
/obj/structure/simple_door/Destroy()
|
||||
@@ -63,8 +64,7 @@
|
||||
/obj/structure/simple_door/attack_hand(mob/user as mob)
|
||||
return TryToSwitchState(user)
|
||||
|
||||
/obj/structure/simple_door/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(air_group) return 0
|
||||
/obj/structure/simple_door/CanPass(atom/movable/mover, turf/target)
|
||||
if(istype(mover, /obj/effect/beam))
|
||||
return !opacity
|
||||
return !density
|
||||
|
||||
@@ -68,11 +68,10 @@
|
||||
name = "[material.display_name] [initial(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))
|
||||
return 1
|
||||
else
|
||||
return ..()
|
||||
return TRUE
|
||||
return ..()
|
||||
|
||||
/obj/structure/bed/ex_act(severity)
|
||||
switch(severity)
|
||||
|
||||
@@ -54,14 +54,12 @@ obj/structure/windoor_assembly/Destroy()
|
||||
/obj/structure/windoor_assembly/update_icon()
|
||||
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))
|
||||
return 1
|
||||
return TRUE
|
||||
if(get_dir(loc, target) == dir) //Make sure looking at appropriate border
|
||||
if(air_group) return 0
|
||||
return !density
|
||||
else
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/obj/structure/windoor_assembly/CheckExit(atom/movable/mover as mob|obj, turf/target as turf)
|
||||
if(istype(mover) && mover.checkpass(PASSGLASS))
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
desc = "A window."
|
||||
icon = 'icons/obj/structures.dmi'
|
||||
density = 1
|
||||
can_atmos_pass = ATMOS_PASS_DENSITY
|
||||
w_class = ITEMSIZE_NORMAL
|
||||
|
||||
layer = WINDOW_LAYER
|
||||
@@ -129,7 +130,7 @@
|
||||
/obj/structure/window/blob_act()
|
||||
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))
|
||||
return TRUE
|
||||
if(is_fulltile())
|
||||
@@ -139,6 +140,11 @@
|
||||
else
|
||||
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)
|
||||
if(istype(O) && O.checkpass(PASSGLASS))
|
||||
return 1
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
density = 1
|
||||
anchored = 1.0
|
||||
pressure_resistance = 4*ONE_ATMOSPHERE
|
||||
can_atmos_pass = ATMOS_PASS_NO
|
||||
var/win_path = /obj/structure/window/basic
|
||||
var/activated
|
||||
|
||||
@@ -22,7 +23,7 @@
|
||||
/obj/effect/wingrille_spawn/attack_generic()
|
||||
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
|
||||
|
||||
/obj/effect/wingrille_spawn/Initialize()
|
||||
|
||||
Reference in New Issue
Block a user