chore: prepare for further fixes
Tested order.oil and order.biomass
This commit is contained in:
parent
f688bdadf7
commit
eeff05593f
1 changed files with 6 additions and 0 deletions
|
|
@ -30,6 +30,7 @@ local order = {
|
|||
return ticker.requestFiltered(OIL_PKG, request)
|
||||
end,
|
||||
biomass = function (amt, ticker)
|
||||
-- TODO make order_amt calculation less naive
|
||||
local order_amt = amt * 3
|
||||
local request = {
|
||||
_op = "any",
|
||||
|
|
@ -56,6 +57,7 @@ local order = {
|
|||
end,
|
||||
biofuel = function (amt, ticker)
|
||||
-- TODO
|
||||
amt = math.floor(amt / 125)
|
||||
local request = function ()
|
||||
local biomass = {
|
||||
name = "createaddition:biomass",
|
||||
|
|
@ -71,6 +73,10 @@ local order = {
|
|||
}
|
||||
return biomass, sugar, cinder_flour
|
||||
end
|
||||
local notEnoughMaterials = function ()
|
||||
-- TODO
|
||||
-- use ticker to test ( biomass >= 32, sugar >= 16, and cinder flour >= 16
|
||||
end
|
||||
local make_order = function (amt_to_make, amt_made)
|
||||
if amt_to_make <= 0 then return amt_made end
|
||||
if notEnoughMaterials() then return amt_made end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue