diff --git a/code/game/machinery/embedded_controller/airlock_program.dm b/code/game/machinery/embedded_controller/airlock_program.dm index fabf499dc99..418f3db2c1e 100644 --- a/code/game/machinery/embedded_controller/airlock_program.dm +++ b/code/game/machinery/embedded_controller/airlock_program.dm @@ -109,13 +109,18 @@ var/shutdown_pump = 0 switch(command) if("cycle_ext") + //If airlock is already cycled in this direction, just toggle the doors. + if(!memory["purge"] && IsInRange(memory["external_sensor_pressure"], memory["chamber_sensor_pressure"] * 0.95, memory["chamber_sensor_pressure"] * 1.05)) + toggleDoor(memory["exterior_status"], tag_exterior_door, memory["secure"], "toggle") //only respond to these commands if the airlock isn't already doing something //prevents the controller from getting confused and doing strange things - if(state == target_state) + else if(state == target_state) begin_cycle_out() if("cycle_int") - if(state == target_state) + if(!memory["purge"] && IsInRange(memory["internal_sensor_pressure"], memory["chamber_sensor_pressure"] * 0.95, memory["chamber_sensor_pressure"] * 1.05)) + toggleDoor(memory["interior_status"], tag_interior_door, memory["secure"], "toggle") + else if(state == target_state) begin_cycle_in() if("cycle_ext_door") @@ -216,7 +221,7 @@ memory["target_pressure"] = memory["internal_sensor_pressure"] state = STATE_PREPARE target_state = TARGET_NONE - + else if(memory["pump_status"] != "off") signalPump(tag_airpump, 0) else diff --git a/html/changelogs/Hubblenaut - airlocks.yml b/html/changelogs/Hubblenaut - airlocks.yml new file mode 100644 index 00000000000..2091ab65964 --- /dev/null +++ b/html/changelogs/Hubblenaut - airlocks.yml @@ -0,0 +1,36 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +################################# + +# Your name. +author: Hubblenaut + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - tweak: "If a cycling airlock is already near the target pressure, pressing the buttons will toggle the doors instead of making it reenter the cycle process."