diff options
Diffstat (limited to 'controller.lua')
-rw-r--r-- | controller.lua | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/controller.lua b/controller.lua index 0912776..d60e2be 100644 --- a/controller.lua +++ b/controller.lua @@ -517,6 +517,12 @@ function celevator.controller.finish(pos,mem,changedinterrupts) celevator.fs1switch.setled(fs1switch.pos,newfs1led) end end + local oldcartopinsp = oldmem.cartopinspectsw + local newcartopinsp = mem.cartopinspectsw + if oldcartopinsp ~= newcartopinsp then + carinfodirty = true + carinfo.cartopinspect = newcartopinsp + end meta:set_string("copformspec",mem.copformspec) meta:set_string("switchformspec",mem.switchformspec) if (mem.copformspec ~= oldmem.copformspec or mem.switchformspec ~= oldmem.switchformspec) and drivetype then @@ -601,6 +607,14 @@ function celevator.controller.handlefs1switch(controllerpos,on) celevator.controller.run(controllerpos,event) end +function celevator.controller.handlecartopbox(controllerpos,control) + local event = { + type = "cartopbox", + control = control, + } + celevator.controller.run(controllerpos,event) +end + function celevator.controller.checkiqueue(dtime) for hash,iqueue in pairs(celevator.controller.iqueue) do local pos = minetest.get_position_from_hash(hash) |