-- program
local take_stock = function()
- local coal_item_detail = coal_drawer.getItemDetail(1)
+ local coal_item_detail = coal_drawer.getItemDetail(2)
local coal_amount = coal_item_detail and coal_item_detail.count or 0
- local wood_item_detail = wood_drawer.getItemDetail(1)
+ local wood_item_detail = wood_drawer.getItemDetail(2)
local wood_amount = wood_item_detail and wood_item_detail.count or 0
local farm_amount = 0
local f = function() return false, "No coal available" end
if coal_amount >= refill_amt then
coal_amount = coal_amount - refill_amt
- f = function() return deployer.pullItems(peripheral.getName(coal_drawer), 1, refill_amt, 1) end
+ f = function() return deployer.pullItems(peripheral.getName(coal_drawer), 2, refill_amt, 1) end
end
local ok, e = f()
if not ok then
print("coal: "..tostring(coal_amount))
print("wood: "..tostring(wood_amount))
print("farm: "..tostring(farm_amount))
--- wood_amount, farm_amount, farm_slot = move_wood(wood_amount, farm_amount, farm_slot)
+ print("")
+ wood_amount, farm_amount, farm_slot = move_wood(wood_amount, farm_amount, farm_slot)
local coal_online, wood_online = manage_farms(coal_amount, wood_amount, farm_amount)
print_spinner(main_monitor, 29,12, "*")
coal_amount = feed(coal_amount)