diff options
author | cheapie <no-email-for-you@example.com> | 2024-04-23 20:01:11 -0500 |
---|---|---|
committer | cheapie <no-email-for-you@example.com> | 2024-04-23 20:01:11 -0500 |
commit | 29bd099067f339b6227e4d839b0df92a34e62be2 (patch) | |
tree | b3b2db1a5c9a9c828a07b5f3a20da8a4ec103b50 /controllerfw.lua | |
parent | 877ec7e69408c742fd5a4b505246438870622aaa (diff) | |
download | celevator-29bd099067f339b6227e4d839b0df92a34e62be2.tar celevator-29bd099067f339b6227e4d839b0df92a34e62be2.tar.gz celevator-29bd099067f339b6227e4d839b0df92a34e62be2.tar.bz2 celevator-29bd099067f339b6227e4d839b0df92a34e62be2.tar.xz celevator-29bd099067f339b6227e4d839b0df92a34e62be2.zip |
Initial work on remote monitoring software for the laptop mod
No scrolling yet (so you can only see 10 floors) and also no dispatcher UI yet (only the controller)
Diffstat (limited to 'controllerfw.lua')
-rw-r--r-- | controllerfw.lua | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/controllerfw.lua b/controllerfw.lua index 62ae939..979df8a 100644 --- a/controllerfw.lua +++ b/controllerfw.lua @@ -655,6 +655,26 @@ elseif event.type == "dispatchermsg" then mem.fs1switch = event.msg mem.fs1led = event.msg end +elseif event.type == "remotemsg" then + if event.channel == "groupupcall" and mem.carstate == "normal" then + mem.groupupcalls[event.msg] = true + elseif event.channel == "groupdncall" and mem.carstate == "normal" then + mem.groupdncalls[event.msg] = true + elseif event.channel == "swingupcall" and mem.carstate == "normal" then + mem.swingupcalls[event.msg] = true + elseif event.channel == "swingdncall" and mem.carstate == "normal" then + mem.swingdncalls[event.msg] = true + elseif event.channel == "upcall" and mem.carstate == "normal" then + mem.upcalls[event.msg] = true + elseif event.channel == "dncall" and mem.carstate == "normal" then + mem.dncalls[event.msg] = true + elseif event.channel == "groupupcancel" then + mem.groupupcalls[event.msg] = nil + elseif event.channel == "groupdncancel" then + mem.groupdncalls[event.msg] = nil + elseif event.channel == "carcall" and mem.carstate == "normal" then + mem.carcalls[event.msg] = true + end end local oldstate = mem.carstate @@ -1025,7 +1045,7 @@ elseif mem.screenstate == "status" then local ypos = 11-(i*0.9) local floornum = bottom+i if floornum > maxfloor then break end - fs(string.format("label[11.25,%f;%s]",ypos,mem.params.floornames[floornum])) + fs(string.format("label[11.25,%f;%s]",ypos,minetest.formspec_escape(mem.params.floornames[floornum]))) local ccdot = mem.carcalls[floornum] and "*" or "" if getpos() == floornum then local cargraphics = { |