mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-23 03:57:48 +01:00
Merge pull request #7536 from VOREStation/vplk-proper-atmos-canpass
Use can_atmos_pass to reduce proc-calls in c_airblock()
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
anchored = 1
|
||||
density = 0
|
||||
opacity = 0
|
||||
can_atmos_pass = ATMOS_PASS_PROC
|
||||
|
||||
/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.
|
||||
@@ -15,5 +16,5 @@
|
||||
if(air_master && air_master.current_cycle == 0)
|
||||
spawn(1)
|
||||
air_master.mark_for_update(get_turf(src))
|
||||
return ATMOS_PASS_NO
|
||||
return is_zone ? ATMOS_PASS_NO : ATMOS_PASS_YES // Anything except zones can pass
|
||||
return FALSE
|
||||
return is_zone ? FALSE : TRUE // Anything except zones can pass
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
desc = "A window."
|
||||
icon = 'icons/obj/structures_vr.dmi' // VOREStation Edit - New icons
|
||||
density = 1
|
||||
can_atmos_pass = ATMOS_PASS_DENSITY
|
||||
can_atmos_pass = ATMOS_PASS_PROC
|
||||
w_class = ITEMSIZE_NORMAL
|
||||
|
||||
layer = WINDOW_LAYER
|
||||
@@ -144,8 +144,8 @@
|
||||
|
||||
/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.
|
||||
return !anchored // If it's anchored, it'll block air.
|
||||
return TRUE // 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))
|
||||
|
||||
Reference in New Issue
Block a user