[MIRROR] plastic flap air wall fix (#3978)

* plastic flap air wall fix (#57455)

Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>

* plastic flap air wall fix

Co-authored-by: Ghilker <42839747+Ghilker@users.noreply.github.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
This commit is contained in:
SkyratBot
2021-03-08 01:30:00 +00:00
committed by GitHub
co-authored by Mothblocks Ghilker
parent d8fd3b6edb
commit 1a12e64888
+11 -6
View File
@@ -29,14 +29,19 @@
return TRUE
add_fingerprint(user)
var/action = anchored ? "unscrews [src] from" : "screws [src] to"
var/uraction = anchored ? "unscrew [src] from " : "screw [src] to"
var/uraction = anchored ? "unscrew [src] from" : "screw [src] to"
user.visible_message("<span class='warning'>[user] [action] the floor.</span>", "<span class='notice'>You start to [uraction] the floor...</span>", "<span class='hear'>You hear rustling noises.</span>")
if(W.use_tool(src, user, 100, volume=100, extra_checks = CALLBACK(src, .proc/check_anchored_state, anchored)))
set_anchored(!anchored)
to_chat(user, "<span class='notice'>You [anchored ? "unscrew" : "screw"] [src] from the floor.</span>")
return TRUE
else
if(!W.use_tool(src, user, 100, volume=100, extra_checks = CALLBACK(src, .proc/check_anchored_state, anchored)))
return TRUE
set_anchored(!anchored)
update_atmos_behaviour()
air_update_turf(TRUE)
to_chat(user, "<span class='notice'>You [uraction] the floor.</span>")
return TRUE
///Update the flaps behaviour to gases, if not anchored will let air pass through
/obj/structure/plasticflaps/proc/update_atmos_behaviour()
CanAtmosPass = anchored ? ATMOS_PASS_YES : ATMOS_PASS_NO
/obj/structure/plasticflaps/wirecutter_act(mob/living/user, obj/item/W)
. = ..()