Fix constructed directional windows leaking atmos, wrap setting of the anchored var on objects (#38934)
* Wrap setting anchored for structures, fix atmos bug * forgot this * Add a signal for setanchored * move setanchored to obj * machinery, also some structure stuff * tabbing
This commit is contained in:
committed by
letterjay
parent
981743a170
commit
417496aa6e
@@ -207,15 +207,12 @@
|
||||
else if(state == WINDOW_OUT_OF_FRAME)
|
||||
to_chat(user, "<span class='notice'>You begin to [anchored ? "unscrew the frame from":"screw the frame to"] the floor...</span>")
|
||||
if(I.use_tool(src, user, decon_speed, extra_checks = CALLBACK(src, .proc/check_state_and_anchored, state, anchored)))
|
||||
anchored = !anchored
|
||||
update_nearby_icons()
|
||||
setAnchored(!anchored)
|
||||
to_chat(user, "<span class='notice'>You [anchored ? "fasten the frame to":"unfasten the frame from"] the floor.</span>")
|
||||
else //if we're not reinforced, we don't need to check or update state
|
||||
to_chat(user, "<span class='notice'>You begin to [anchored ? "unscrew the window from":"screw the window to"] the floor...</span>")
|
||||
if(I.use_tool(src, user, decon_speed, extra_checks = CALLBACK(src, .proc/check_anchored, anchored)))
|
||||
anchored = !anchored
|
||||
air_update_turf(TRUE)
|
||||
update_nearby_icons()
|
||||
setAnchored(!anchored)
|
||||
to_chat(user, "<span class='notice'>You [anchored ? "fasten the window to":"unfasten the window from"] the floor.</span>")
|
||||
return
|
||||
|
||||
@@ -240,6 +237,11 @@
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/structure/window/setAnchored(anchorvalue)
|
||||
..()
|
||||
air_update_turf(TRUE)
|
||||
update_nearby_icons()
|
||||
|
||||
/obj/structure/window/proc/check_state(checked_state)
|
||||
if(state == checked_state)
|
||||
return TRUE
|
||||
|
||||
Reference in New Issue
Block a user