local stop_coal_when = function(amt) return amt > 8000 end
local rs_coal_side = "back"
-local wood_to_keep_in_blaster = 10000
+local wood_to_keep_in_blaster = 1000
-- peripherals
local move_wood = function(wood_amount, farm_amount, farm_slot)
local wood_amount, farm_amount = wood_amount, farm_amount
local to_move = wood_to_keep_in_blaster - wood_amount
- if to_move > 0 and to_move <= farm_amount then
- local moved = farm_barrel.pushItems(peripheral.getName(wood_drawer), farm_slot, to_move)
+ print("move_wood pre:")
+ print(" in farm: "..tostring(farm_amount))
+ print(" in blst: "..tostring(wood_amount))
+ print(" to move: "..tostring(to_move))
+ if to_move > 0 then
+ local moved = farm_barrel.pushItems(peripheral.getName(wood_drawer), farm_slot, math.min(to_move, farm_amount))
end
if moved then
wood_amount = wood_amount + moved
farm_amount = farm_amount - moved
end
+ print("move_wood post:")
+ print(" in farm: "..tostring(farm_amount))
+ print(" in blst: "..tostring(wood_amount))
+ print(" moved: "..tostring(moved))
+ print("")
return wood_amount, farm_amount
end
end
local ok, e = f()
if not ok then
- print("Could not feed "..deployer_addr.."\n"..e)
+-- print("Could not feed "..deployer_addr.."\n"..e)
end
end
end