From 1be1a52a773d8b60060023aac49904028b98fce5 Mon Sep 17 00:00:00 2001 From: Emerson Rosen-Jones Date: Sat, 20 Dec 2025 22:05:22 -0500 Subject: [PATCH] feat: removes stocking storage from requirements --- biofuel-manager.lua | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/biofuel-manager.lua b/biofuel-manager.lua index a39c873..2a899e5 100644 --- a/biofuel-manager.lua +++ b/biofuel-manager.lua @@ -1,5 +1,5 @@ -- program to manage a biofuel factory with create and some addons + tweaks --- NOTE: this design does not handle stocking cinder flour or sugar +-- NOTE: this design does not handle stocking the system local STORAGE = "" local OIL_TANK = "" @@ -7,11 +7,7 @@ local FUEL_TANK = "" local FACTORY_ADDRESS = "" -local MAIN_SEED_REQUEST = "minecraft:melon_seeds" -local MAIN_PLANT_REQUEST = "minecraft:bamboo" - local SPEEDOMETER = "" -local MAIN_REQUESTER = "" local SUBNET_TICKER = "" local SLEEP_T = 10 @@ -114,36 +110,27 @@ local stock = { end, } -function getStockRequirements () - -- TODO -end function getOrders () -- TODO end -function run (requester, ticker) +function run (ticker) if peripheral.call(SPEEDOMETER, "getSpeed") ~= 0 then - local need_to_stock = getStockRequirements() local need_to_create = getOrders() - for type, amt in pairs(need_to_stock) do - stock[type](amt, requester) - end for type, amt in pairs(need_to_create) do order[type](amt, ticker) end end os.sleep(SLEEP_T) - return run(requester, ticker) + return run(ticker) end if arg ~= nil and arg[1] == "run" then - local requester = peripheral.wrap(MAIN_REQUESTER) - requester.setAddress(FACTORY_ADDRESS) local ticker = peripheral.wrap(SUBNET_TICKER) local ran = false while not ran do - ran, result = run(ticker, requester) + ran, result = run(ticker) if not ran then print(result) end os.sleep(SLEEP_T) end