diff options
author | cheapie <no-email-for-you@example.com> | 2025-04-27 00:41:25 -0500 |
---|---|---|
committer | cheapie <no-email-for-you@example.com> | 2025-04-27 00:41:25 -0500 |
commit | 8b721c04e0cacefe7bd6402f1c00406b303a1d70 (patch) | |
tree | 3e2b7b8ac50465f1b03a62aafb08e72b53cbc13f /controller.lua | |
parent | 9a06e6564cc1e0ac0f70eb19b0491ba1f00ea0eb (diff) | |
download | celevator-8b721c04e0cacefe7bd6402f1c00406b303a1d70.tar celevator-8b721c04e0cacefe7bd6402f1c00406b303a1d70.tar.gz celevator-8b721c04e0cacefe7bd6402f1c00406b303a1d70.tar.bz2 celevator-8b721c04e0cacefe7bd6402f1c00406b303a1d70.tar.xz celevator-8b721c04e0cacefe7bd6402f1c00406b303a1d70.zip |
Diffstat (limited to 'controller.lua')
-rw-r--r-- | controller.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/controller.lua b/controller.lua index 0a43eff..2921f81 100644 --- a/controller.lua +++ b/controller.lua @@ -645,7 +645,9 @@ end function celevator.controller.checkiqueue(dtime) for hash,iqueue in pairs(celevator.controller.iqueue) do local pos = minetest.get_position_from_hash(hash) + local noneleft = true for iid,time in pairs(iqueue) do + noneleft = false iqueue[iid] = time-dtime if iqueue[iid] < 0 then iqueue[iid] = nil @@ -655,6 +657,10 @@ function celevator.controller.checkiqueue(dtime) celevator.controller.run(pos,event) end end + if noneleft then + celevator.controller.iqueue[hash] = nil + celevator.storage:set_string("controller_iqueue",minetest.serialize(celevator.controller.iqueue)) + end end end |