mirror of
https://github.com/S4mpsa/InfOS.git
synced 2025-08-03 18:06:04 -04:00
Adding toggleMultiblockWorkUsecase
This commit is contained in:
parent
94ea75be6a
commit
590255c161
12
Programs/monitor-system/domain/multiblock/toggle-multiblock-work.lua
Executable file
12
Programs/monitor-system/domain/multiblock/toggle-multiblock-work.lua
Executable 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
|
Loading…
x
Reference in New Issue
Block a user