diff --git a/Programs/monitor-system/domain/multiblock/toggle-multiblock-work.lua b/Programs/monitor-system/domain/multiblock/toggle-multiblock-work.lua new file mode 100755 index 0000000..b0ce22b --- /dev/null +++ b/Programs/monitor-system/domain/multiblock/toggle-multiblock-work.lua @@ -0,0 +1,12 @@ +-- Import section +Machine = require("data.datasource.machine") +Alarm = require("api.sound.alarm") +-- + +local function exec(address, name) + local multiblock = Machine.getMachine(address, name, Machine.types.multiblock) + local workAllowed = multiblock:isWorkAllowed() + multiblock:setWorkAllowed(not workAllowed) +end + +return exec