From e6def19aa21d1d693fdfa28370eeb5f0438a2dbb Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Sun, 15 Oct 2017 12:32:41 -0400 Subject: [PATCH 1/2] Merge pull request #31695 from ninjanomnom/directional-windows Makes directional windows only block air if anchored --- code/game/objects/structures/window.dm | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index 38251dc3ec..02874c3d89 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -212,6 +212,7 @@ to_chat(user, "You begin to [anchored ? "unscrew the window from":"screw the window to"] the floor...") if(do_after(user, decon_speed*I.toolspeed, target = src, extra_checks = CALLBACK(src, .proc/check_anchored, anchored))) anchored = !anchored + air_update_turf(TRUE) update_nearby_icons() to_chat(user, "You [anchored ? "fasten the window to":"unfasten the window from"] the floor.") return @@ -334,7 +335,6 @@ return FALSE setDir(target_dir) - air_update_turf(1) ini_dir = dir add_fingerprint(usr) return TRUE @@ -363,11 +363,9 @@ move_update_air(T) /obj/structure/window/CanAtmosPass(turf/T) - if(get_dir(loc, T) == dir) - return !density - if(dir == FULLTILE_WINDOW_DIR) - return !density - return 1 + if(!anchored || !density) + return TRUE + return !(FULLTILE_WINDOW_DIR == dir || dir == get_dir(loc, T)) //This proc is used to update the icons of nearby windows. /obj/structure/window/proc/update_nearby_icons()