diff --git a/code/game/objects/structures/plasticflaps.dm b/code/game/objects/structures/plasticflaps.dm index 878daae16b8..f06223536ca 100644 --- a/code/game/objects/structures/plasticflaps.dm +++ b/code/game/objects/structures/plasticflaps.dm @@ -8,6 +8,9 @@ layer = 4 explosion_resistance = 5 build_amt = 4 + + atmos_canpass = CANPASS_PROC + var/manipulating = FALSE //Prevents queueing up a ton of deconstructs var/list/mobs_can_pass = list( /mob/living/carbon/slime, @@ -15,10 +18,34 @@ /mob/living/silicon/robot/drone ) + var/airtight = FALSE + /obj/structure/plasticflaps/Initialize() . = ..() material = SSmaterials.get_material_by_name(MATERIAL_PLASTIC) +/obj/structure/plasticflaps/Destroy() + if(airtight) + clear_airtight() + . = ..() + +/obj/structure/plasticflaps/proc/become_airtight() + airtight = TRUE + var/turf/simulated/floor/T = get_turf(loc) + if(istype(T)) + update_nearby_tiles() + +/obj/structure/plasticflaps/proc/clear_airtight() + airtight = FALSE + var/turf/simulated/floor/T = get_turf(loc) + if(istype(T)) + update_nearby_tiles() + +/obj/structure/plasticflaps/c_airblock() + if(airtight) + return AIR_BLOCKED + return FALSE + /obj/structure/plasticflaps/CanPass(atom/A, turf/T) if(istype(A) && A.checkpass(PASSGLASS)) return prob(60) @@ -67,40 +94,22 @@ /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." + airtight = TRUE -/obj/structure/plasticflaps/mining/Initialize() //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) - if(istype(T, /turf/simulated/floor)) - T.blocks_air = 0 - return ..() - +/obj/structure/plasticflaps/mining/Initialize() + . = ..() + update_nearby_tiles() //Airtight plastic flaps made for the kitchen freezer, blocks atmos but not movement /obj/structure/plasticflaps/airtight name = "airtight plastic flaps" desc = "Heavy duty, airtight, plastic flaps." layer = 3 + airtight = TRUE -/obj/structure/plasticflaps/airtight/Initialize() //set the turf below the flaps to block air - ..() - var/turf/T = get_turf(loc) - if(T) - T.blocks_air = 1 - -/obj/structure/plasticflaps/airtight/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) - if(istype(T, /turf/simulated/floor)) - T.blocks_air = 0 - return ..() +/obj/structure/plasticflaps/airtight/Initialize() + . = ..() + update_nearby_tiles() /obj/structure/plasticflaps/airtight/CanPass(atom/A, turf/T) return 1//Blocks nothing except air \ No newline at end of file diff --git a/html/changelogs/alberyk-aritght.yml b/html/changelogs/alberyk-aritght.yml new file mode 100644 index 00000000000..e3892589164 --- /dev/null +++ b/html/changelogs/alberyk-aritght.yml @@ -0,0 +1,6 @@ +author: Alberyk + +delete-after: True + +changes: + - bugfix: "Fixed airtight plastic flaps stopping working after shuttles moves."