mirror of
https://github.com/S4mpsa/InfOS.git
synced 2025-09-17 19:24:59 -04:00
Merge pull request #11 from gordominossi/feature/integration
Feature/integration
This commit is contained in:
commit
eff872373c
@ -2,7 +2,6 @@ Component = require("component")
|
||||
Event = require("event")
|
||||
local uc = require("unicode")
|
||||
local utility = {}
|
||||
local modem = Component.modem
|
||||
|
||||
function utility.machine(address)
|
||||
local machineAddress = Component.get(address)
|
||||
@ -71,7 +70,7 @@ end
|
||||
|
||||
function utility.componentChange(broadcastPort)
|
||||
local function sendAddress(event, address, type)
|
||||
modem.broadcast(broadcastPort, event, address, type)
|
||||
Component.modem.broadcast(broadcastPort, event, address, type)
|
||||
end
|
||||
Event.listen("component_added", sendAddress)
|
||||
end
|
||||
|
@ -17,7 +17,7 @@ local function exec(address, name)
|
||||
|
||||
local state = {}
|
||||
if (currentEnergy == maximumEnergy) then
|
||||
state = {name = changeRate .. " EU/s", color = Colors.workingColor}
|
||||
state = {name = (changeRate > 0 and "+" or "") .. changeRate .. " EU/s", color = Colors.workingColor}
|
||||
elseif currentEnergy == 0 then
|
||||
state = {name = changeRate .. " EU/s", color = Colors.errorColor}
|
||||
elseif changeRate > 0 then
|
||||
|
@ -66,7 +66,7 @@ Page.setup(energyBufferAddresses.batteryBuffer1)
|
||||
|
||||
while true do
|
||||
Page.update()
|
||||
os.sleep(0.2)
|
||||
os.sleep(0)
|
||||
end
|
||||
|
||||
--[[
|
||||
|
Loading…
x
Reference in New Issue
Block a user