Adding toggleMultiblockWorkUsecase

This commit is contained in:
Gabriel Moreira Minossi 2021-01-17 13:32:59 -03:00
parent 94ea75be6a
commit 590255c161

View File

@ -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