diff options
author | cheapie <no-email-for-you@example.com> | 2024-04-16 20:32:53 -0500 |
---|---|---|
committer | cheapie <no-email-for-you@example.com> | 2024-04-16 20:32:53 -0500 |
commit | c8660628100dbc8746a6b789e365c69f1a85d74c (patch) | |
tree | 46ace194e0482ad09b3004f3c06450238486488f /controllerfw.lua | |
parent | ec35f3c66fbdb60fb27f9f2ebf109f56b97f831d (diff) | |
download | celevator-c8660628100dbc8746a6b789e365c69f1a85d74c.tar celevator-c8660628100dbc8746a6b789e365c69f1a85d74c.tar.gz celevator-c8660628100dbc8746a6b789e365c69f1a85d74c.tar.bz2 celevator-c8660628100dbc8746a6b789e365c69f1a85d74c.tar.xz celevator-c8660628100dbc8746a6b789e365c69f1a85d74c.zip |
Allow reversing a closing door
Diffstat (limited to 'controllerfw.lua')
-rw-r--r-- | controllerfw.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/controllerfw.lua b/controllerfw.lua index bfe7485..3065db2 100644 --- a/controllerfw.lua +++ b/controllerfw.lua @@ -180,6 +180,7 @@ local function open() drivecmd({command = "open"}) interrupt(0.2,"checkopen") interrupt(10,"opentimeout") + interrupt(nil,"closetimeout") end local function close() @@ -187,6 +188,7 @@ local function close() drivecmd({command = "close"}) interrupt(0.2,"checkclosed") interrupt(10,"closetimeout") + interrupt(nil,"opentimeout") end mem.formspec = "" @@ -469,7 +471,7 @@ elseif event.type == "cop" then end if fields.close and mem.doorstate == "open" then interrupt(0,"close") - elseif fields.open and mem.doorstate == "closed" and not (mem.carmotion or juststarted) then + elseif fields.open and (mem.doorstate == "closed" or mem.doorstate == "closing") and not (mem.carmotion or juststarted) then open() elseif fields.callcancel and (mem.carstate == "indep" or mem.carstate == "fs2") then mem.carcalls = {} |