From 8bcc67d11d94f7c1aead670d66498e3b6db6cfa4 Mon Sep 17 00:00:00 2001 From: Kyle Spier-Swenson Date: Fri, 8 Jul 2016 13:49:34 -0700 Subject: [PATCH 1/3] air tight plastic flaps now properly set atmos state. blocks_air is getting phased out, this is the last thing that uses it that isn't a closed turf In another pr when I have more time, i'll remove the var flat out. --- code/game/objects/structures/plasticflaps.dm | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/code/game/objects/structures/plasticflaps.dm b/code/game/objects/structures/plasticflaps.dm index 116f782e9da..f24a4b803b5 100644 --- a/code/game/objects/structures/plasticflaps.dm +++ b/code/game/objects/structures/plasticflaps.dm @@ -57,15 +57,11 @@ 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/New() + air_update_turf(1) + +/obj/structure/plasticflaps/mining/CanAtmosPass() + return FALSE -/obj/structure/plasticflaps/mining/Destroy() //lazy hack to set the turf to allow air to pass if it's a simulated floor //wow this is terrible - var/turf/T = get_turf(loc) - if(T) - if(istype(T, /turf/open/floor)) - T.blocks_air = 0 - return ..() +/obj/structure/plasticflaps/mining/Destroy() + air_update_turf(1) From 77749840b3194c17fae83b145f20f8614e9ebc35 Mon Sep 17 00:00:00 2001 From: Kyle Spier-Swenson Date: Fri, 8 Jul 2016 14:47:56 -0700 Subject: [PATCH 2/3] Update plasticflaps.dm --- code/game/objects/structures/plasticflaps.dm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/code/game/objects/structures/plasticflaps.dm b/code/game/objects/structures/plasticflaps.dm index f24a4b803b5..125666ae25c 100644 --- a/code/game/objects/structures/plasticflaps.dm +++ b/code/game/objects/structures/plasticflaps.dm @@ -59,9 +59,13 @@ /obj/structure/plasticflaps/mining/New() air_update_turf(1) + . = ..() /obj/structure/plasticflaps/mining/CanAtmosPass() return FALSE /obj/structure/plasticflaps/mining/Destroy() - air_update_turf(1) + var/oldloc = loc + . = ..() + if (oldloc) + oldloc.air_update_turf(1) From de5d6d29a8cacf830cf0b8fea8863bc10d9cb6ea Mon Sep 17 00:00:00 2001 From: Kyle Spier-Swenson Date: Fri, 8 Jul 2016 14:53:47 -0700 Subject: [PATCH 3/3] Update plasticflaps.dm --- code/game/objects/structures/plasticflaps.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/objects/structures/plasticflaps.dm b/code/game/objects/structures/plasticflaps.dm index 125666ae25c..12fba0267cf 100644 --- a/code/game/objects/structures/plasticflaps.dm +++ b/code/game/objects/structures/plasticflaps.dm @@ -65,7 +65,7 @@ return FALSE /obj/structure/plasticflaps/mining/Destroy() - var/oldloc = loc + var/atom/oldloc = loc . = ..() if (oldloc) oldloc.air_update_turf(1)