Add car call security options to mesecons input modules
This commit is contained in:
parent
90e7f15112
commit
dfcf5f322d
@ -761,6 +761,10 @@ elseif event.type == "remotemsg" then
|
||||
mem.groupdncalls[event.msg] = nil
|
||||
elseif event.channel == "carcall" and mem.carstate == "normal" then
|
||||
mem.carcalls[event.msg] = true
|
||||
elseif event.channel == "security" and type(event.msg.floor) == "number" then
|
||||
if mem.params.floornames[event.msg.floor] and event.msg.floor ~= (mem.params.mainlanding or 1) then
|
||||
mem.params.carcallsecurity[event.msg.floor] = event.msg.mode
|
||||
end
|
||||
end
|
||||
elseif event.type == "lightcurtain" and not mem.nudging then
|
||||
if mem.carstate == "normal" or mem.carstate == "indep" then
|
||||
|
45
mesecons.lua
45
mesecons.lua
@ -348,6 +348,51 @@ local inputoptions = {
|
||||
end,
|
||||
needsfloor = false,
|
||||
},
|
||||
{
|
||||
id = "secdeny",
|
||||
desc = "Lock Car Calls at Landing:",
|
||||
func_on = function(controllerpos,floor)
|
||||
celevator.controller.run(controllerpos,{
|
||||
type = "remotemsg",
|
||||
channel = "security",
|
||||
msg = {
|
||||
floor = floor,
|
||||
mode = "deny",
|
||||
},
|
||||
})
|
||||
end,
|
||||
needsfloor = true,
|
||||
},
|
||||
{
|
||||
id = "secauth",
|
||||
desc = "Require Auth for Car Calls at Landing:",
|
||||
func_on = function(controllerpos,floor)
|
||||
celevator.controller.run(controllerpos,{
|
||||
type = "remotemsg",
|
||||
channel = "security",
|
||||
msg = {
|
||||
floor = floor,
|
||||
mode = "auth",
|
||||
},
|
||||
})
|
||||
end,
|
||||
needsfloor = true,
|
||||
},
|
||||
{
|
||||
id = "secallow",
|
||||
desc = "Unlock Car Calls at Landing:",
|
||||
func_on = function(controllerpos,floor)
|
||||
celevator.controller.run(controllerpos,{
|
||||
type = "remotemsg",
|
||||
channel = "security",
|
||||
msg = {
|
||||
floor = floor,
|
||||
mode = nil,
|
||||
},
|
||||
})
|
||||
end,
|
||||
needsfloor = true,
|
||||
},
|
||||
}
|
||||
|
||||
local dinputoptions = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user