Compare commits
No commits in common. "da0344ecb58d2c4f18c3c3bc847345514b43a8c4" and "a9c31a3d3700ac241c14b82c7d2f875db1cab306" have entirely different histories.
da0344ecb5
...
a9c31a3d37
1 changed files with 3 additions and 13 deletions
|
|
@ -5,9 +5,7 @@ local STORAGE = ""
|
||||||
local OIL_TANK = ""
|
local OIL_TANK = ""
|
||||||
local FUEL_TANK = ""
|
local FUEL_TANK = ""
|
||||||
|
|
||||||
local OIL_SETPOINT = 64000
|
local FACTORY_ADDRESS = ""
|
||||||
local BIOMASS_SETPOINT = 4 * 64
|
|
||||||
local BIOFUEL_SETPOINT = 128000
|
|
||||||
|
|
||||||
local SPEEDOMETER = ""
|
local SPEEDOMETER = ""
|
||||||
local SUBNET_TICKER = ""
|
local SUBNET_TICKER = ""
|
||||||
|
|
@ -124,11 +122,7 @@ function getOrders ()
|
||||||
local orders = {}
|
local orders = {}
|
||||||
-- Oil
|
-- Oil
|
||||||
local oil_amt = table.remove(peripheral.call(OIL_TANK, "tanks"))
|
local oil_amt = table.remove(peripheral.call(OIL_TANK, "tanks"))
|
||||||
if oil_amt == nil then
|
if oil_amt == nil then oil_amt = 0 end
|
||||||
oil_amt = 0
|
|
||||||
else
|
|
||||||
oil_amt = oil_amt.amount
|
|
||||||
end
|
|
||||||
local oil_needed = OIL_SETPOINT - oil_amt
|
local oil_needed = OIL_SETPOINT - oil_amt
|
||||||
if oil_needed > 0 then orders.oil = oil_needed end
|
if oil_needed > 0 then orders.oil = oil_needed end
|
||||||
-- Biomass
|
-- Biomass
|
||||||
|
|
@ -140,11 +134,7 @@ function getOrders ()
|
||||||
-- Biofuel
|
-- Biofuel
|
||||||
-- TODO use up excess material?
|
-- TODO use up excess material?
|
||||||
local biofuel_amt = table.remove(peripheral.call(FUEL_TANK, "tanks"))
|
local biofuel_amt = table.remove(peripheral.call(FUEL_TANK, "tanks"))
|
||||||
if biofuel_amt == nil then
|
if biofuel_amt == nil then biofuel_amt = 0 end
|
||||||
biofuel_amt = 0
|
|
||||||
else
|
|
||||||
biofuel_amt = biofuel_amt.amount
|
|
||||||
end
|
|
||||||
local biofuel_needed = BIOFUEL_SETPOINT - biofuel_amt
|
local biofuel_needed = BIOFUEL_SETPOINT - biofuel_amt
|
||||||
if biofuel_needed > 0 then orders.biofuel = biofuel_needed end
|
if biofuel_needed > 0 then orders.biofuel = biofuel_needed end
|
||||||
return orders
|
return orders
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue