From 5ca8c6d2224df58311cb607ac4148a7ae45cecc8 Mon Sep 17 00:00:00 2001 From: itzmarkoni Date: Sat, 14 Jun 2025 15:14:03 -0400 Subject: [PATCH] updated --- main.lua | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/main.lua b/main.lua index efad1c1..b49218b 100644 --- a/main.lua +++ b/main.lua @@ -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