Compare commits
No commits in common. "eeff05593f04157923011e5decf22847080aca0f" and "5d432c8c62c0019a332f56a9baf422d271a235af" have entirely different histories.
eeff05593f
...
5d432c8c62
1 changed files with 1 additions and 9 deletions
|
|
@ -30,7 +30,6 @@ local order = {
|
||||||
return ticker.requestFiltered(OIL_PKG, request)
|
return ticker.requestFiltered(OIL_PKG, request)
|
||||||
end,
|
end,
|
||||||
biomass = function (amt, ticker)
|
biomass = function (amt, ticker)
|
||||||
-- TODO make order_amt calculation less naive
|
|
||||||
local order_amt = amt * 3
|
local order_amt = amt * 3
|
||||||
local request = {
|
local request = {
|
||||||
_op = "any",
|
_op = "any",
|
||||||
|
|
@ -52,12 +51,10 @@ local order = {
|
||||||
["minecraft:leaves"] = true,
|
["minecraft:leaves"] = true,
|
||||||
} },
|
} },
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return ticker.requestFiltered(BIOMASS_PKG, request)
|
return ticker.requestFiltered(BIOMASS_PKG, request)
|
||||||
end,
|
end,
|
||||||
biofuel = function (amt, ticker)
|
biofuel = function (amt, ticker)
|
||||||
-- TODO
|
-- TODO
|
||||||
amt = math.floor(amt / 125)
|
|
||||||
local request = function ()
|
local request = function ()
|
||||||
local biomass = {
|
local biomass = {
|
||||||
name = "createaddition:biomass",
|
name = "createaddition:biomass",
|
||||||
|
|
@ -73,10 +70,6 @@ local order = {
|
||||||
}
|
}
|
||||||
return biomass, sugar, cinder_flour
|
return biomass, sugar, cinder_flour
|
||||||
end
|
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)
|
local make_order = function (amt_to_make, amt_made)
|
||||||
if amt_to_make <= 0 then return amt_made end
|
if amt_to_make <= 0 then return amt_made end
|
||||||
if notEnoughMaterials() then return amt_made end
|
if notEnoughMaterials() then return amt_made end
|
||||||
|
|
@ -86,7 +79,6 @@ local order = {
|
||||||
amt_made = amt_made + count
|
amt_made = amt_made + count
|
||||||
return make_order (amt_to_make, amt_made)
|
return make_order (amt_to_make, amt_made)
|
||||||
end
|
end
|
||||||
return make_order (amt, 0)
|
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -122,7 +114,7 @@ function run (requester, ticker)
|
||||||
return run(requester, ticker)
|
return run(requester, ticker)
|
||||||
end
|
end
|
||||||
|
|
||||||
if arg ~= nil and arg[1] == "run" then
|
if arg[1] == "run" then
|
||||||
local requester = peripheral.wrap(MAIN_REQUESTER)
|
local requester = peripheral.wrap(MAIN_REQUESTER)
|
||||||
local ticker = peripheral.wrap(SUBNET_TICKER)
|
local ticker = peripheral.wrap(SUBNET_TICKER)
|
||||||
run(requester, ticker)
|
run(requester, ticker)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue