diff options
author | cheapie <no-email-for-you@example.com> | 2024-04-27 20:07:46 -0500 |
---|---|---|
committer | cheapie <no-email-for-you@example.com> | 2024-04-27 20:07:46 -0500 |
commit | 59faed0a54fd0e9e23bd79851b72f04cae6270c1 (patch) | |
tree | 5d57f247d84d91224a51fc236c618c1c80edf8aa | |
parent | 6c00ce6f56c1ab4a9a3f111a3e26175a2f46c691 (diff) | |
download | celevator-59faed0a54fd0e9e23bd79851b72f04cae6270c1.tar celevator-59faed0a54fd0e9e23bd79851b72f04cae6270c1.tar.gz celevator-59faed0a54fd0e9e23bd79851b72f04cae6270c1.tar.bz2 celevator-59faed0a54fd0e9e23bd79851b72f04cae6270c1.tar.xz celevator-59faed0a54fd0e9e23bd79851b72f04cae6270c1.zip |
Fix hall calls being ignored if a car is already there but out of service
-rw-r--r-- | dispatcherfw.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/dispatcherfw.lua b/dispatcherfw.lua index 3fc2036..aac7e07 100644 --- a/dispatcherfw.lua +++ b/dispatcherfw.lua @@ -629,7 +629,7 @@ elseif event.type == "abm" or (event.iid == "run" and mem.powerstate ~= "asleep" local eligiblecars = {} local permanent = false for _,carid in pairs(mem.params.carids) do - if getdpos(carid) == i and mem.carstatus[carid].direction == "up" then permanent = true end + if getdpos(carid) == i and mem.carstatus[carid].direction == "up" and mem.carstatus[carid].state == "normal" then permanent = true end if mem.carstatus[carid].state == "normal" and mem.params.floorsserved[carid][i] then local serveshigher = false for floor,served in pairs(mem.params.floorsserved[carid]) do @@ -668,7 +668,7 @@ elseif event.type == "abm" or (event.iid == "run" and mem.powerstate ~= "asleep" local eligiblecars = {} local permanent = false for _,carid in pairs(mem.params.carids) do - if getdpos(carid) == i and mem.carstatus[carid].direction == "down" then permanent = true end + if getdpos(carid) == i and mem.carstatus[carid].direction == "down" and mem.carstatus[carid].state == "normal" then permanent = true end if mem.carstatus[carid].state == "normal" and mem.params.floorsserved[carid][i] then local serveslower = false for floor,served in pairs(mem.params.floorsserved[carid]) do |