This commit is contained in:
2025-06-14 15:14:03 -04:00
parent 84eb3bd588
commit 5ca8c6d222

View File

@@ -33,25 +33,16 @@ local function runDisplay()
monitor.clear()
end
monitor.setCursorPos(1, 1)
local reactorDrivers = {
{ Label = "Status", driver = statusDriver },
{ Label = "Temperature", driver = tempDriver },
{ Label = "Coolant", driver = coolantDriver },
local drivers = {
{ Label = "Status", driver = statusDriver, peripheral = reactor },
{ Label = "Temperature", driver = tempDriver, peripheral = reactor },
{ Label = "Coolant", driver = coolantDriver, peripheral = reactor },
{ Label = "Turbine", driver = turbineDriver, peripheral = turbine }
}
for i, item in ipairs(reactorDrivers) do
for i, item in ipairs(drivers) do
monitor.setCursorPos(1, i)
item.driver.report(reactor, monitor)
monitor.setCursorPos(1, i + 1)
end
local turbineDrivers = {
{ Label = "Turbine", driver = turbineDriver }
}
for i, item in ipairs(turbineDrivers) do
monitor.setCursorPos(1, i)
item.driver.report(turbine, monitor)
item.driver.report(item.peripheral, monitor)
monitor.setCursorPos(1, i + 1)
end