feat: implements main storage stock requests
This commit is contained in:
parent
9fe8b3f78c
commit
2867cb434e
1 changed files with 7 additions and 2 deletions
|
|
@ -5,6 +5,8 @@ local STORAGE = ""
|
|||
local OIL_TANK = ""
|
||||
local FUEL_TANK = ""
|
||||
|
||||
local FACTORY_ADDRESS = ""
|
||||
|
||||
local MAIN_SEED_REQUEST = "minecraft:melon_seeds"
|
||||
local MAIN_PLANT_REQUEST = "minecraft:bamboo"
|
||||
|
||||
|
|
@ -103,10 +105,12 @@ local order = {
|
|||
|
||||
local stock = {
|
||||
seeds = function (amt, requester)
|
||||
-- TODO
|
||||
requester.setRequest({ name = MAIN_SEED_REQUEST, count = amt })
|
||||
requester.request()
|
||||
end,
|
||||
plants = function (amt, requester)
|
||||
-- TODO
|
||||
requester.setRequest({ name = MAIN_PLANT_REQUEST, count = amt })
|
||||
requester.request()
|
||||
end,
|
||||
}
|
||||
|
||||
|
|
@ -135,6 +139,7 @@ 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)
|
||||
run(requester, ticker)
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue