From f3611c29ae1d85272cac59f494c468e0d3b9a3a9 Mon Sep 17 00:00:00 2001 From: Emerson Rosen-Jones Date: Sat, 20 Dec 2025 22:21:19 -0500 Subject: [PATCH 1/3] fix: removes unused variable --- biofuel-manager.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/biofuel-manager.lua b/biofuel-manager.lua index 0f4b2bb..af3c6c8 100644 --- a/biofuel-manager.lua +++ b/biofuel-manager.lua @@ -5,7 +5,6 @@ local STORAGE = "" local OIL_TANK = "" local FUEL_TANK = "" -local FACTORY_ADDRESS = "" local SPEEDOMETER = "" local SUBNET_TICKER = "" From 5dcfcdf77f26c49dc1419c33f15559ba48981e84 Mon Sep 17 00:00:00 2001 From: Emerson Rosen-Jones Date: Sat, 20 Dec 2025 22:21:35 -0500 Subject: [PATCH 2/3] fix: adds required constants --- biofuel-manager.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/biofuel-manager.lua b/biofuel-manager.lua index af3c6c8..bc3211d 100644 --- a/biofuel-manager.lua +++ b/biofuel-manager.lua @@ -5,6 +5,9 @@ local STORAGE = "" local OIL_TANK = "" local FUEL_TANK = "" +local OIL_SETPOINT = 64000 +local BIOMASS_SETPOINT = 4 * 64 +local BIOFUEL_SETPOINT = 128000 local SPEEDOMETER = "" local SUBNET_TICKER = "" From da0344ecb58d2c4f18c3c3bc847345514b43a8c4 Mon Sep 17 00:00:00 2001 From: Emerson Rosen-Jones Date: Sat, 20 Dec 2025 22:22:38 -0500 Subject: [PATCH 3/3] fix: fixes fluid tank handling Forgot to unpack the table --- biofuel-manager.lua | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/biofuel-manager.lua b/biofuel-manager.lua index bc3211d..ff08bfd 100644 --- a/biofuel-manager.lua +++ b/biofuel-manager.lua @@ -124,7 +124,11 @@ function getOrders () local orders = {} -- Oil local oil_amt = table.remove(peripheral.call(OIL_TANK, "tanks")) - if oil_amt == nil then oil_amt = 0 end + if oil_amt == nil then + oil_amt = 0 + else + oil_amt = oil_amt.amount + end local oil_needed = OIL_SETPOINT - oil_amt if oil_needed > 0 then orders.oil = oil_needed end -- Biomass @@ -136,7 +140,11 @@ function getOrders () -- Biofuel -- TODO use up excess material? local biofuel_amt = table.remove(peripheral.call(FUEL_TANK, "tanks")) - if biofuel_amt == nil then biofuel_amt = 0 end + if biofuel_amt == nil then + biofuel_amt = 0 + else + biofuel_amt = biofuel_amt.amount + end local biofuel_needed = BIOFUEL_SETPOINT - biofuel_amt if biofuel_needed > 0 then orders.biofuel = biofuel_needed end return orders