mirror of
https://github.com/S4mpsa/InfOS.git
synced 2025-08-03 09:56:01 -04:00
22 lines
480 B
Lua
Executable File
22 lines
480 B
Lua
Executable File
-- Import section
|
|
Alarm = require("api.sound.alarm")
|
|
--
|
|
|
|
local function exec(multiblocks)
|
|
local statuses = {}
|
|
for _, multiblock in ipairs(multiblocks) do
|
|
local problems = multiblock:getNumberOfProblems()
|
|
if problems > 0 then
|
|
Alarm()
|
|
end
|
|
|
|
statuses[multiblock.name] = {
|
|
problems = problems,
|
|
efficiencyPercentage = multiblock:getEfficiencyPercentage()
|
|
}
|
|
end
|
|
return statuses
|
|
end
|
|
|
|
return exec
|