diff --git a/kai/woodfarm.lua b/kai/woodfarm.lua index c7e5445..2284570 100644 --- a/kai/woodfarm.lua +++ b/kai/woodfarm.lua @@ -139,6 +139,7 @@ local state_machine = { ["ASCEND_TREE"] = function() local success, data = turtle.inspectUp() + print("inspect", success, data) if not s and T.state.y < TREE_MAX_Y - 1 then -- probably reset after chopping a block T.up() @@ -146,12 +147,15 @@ local state_machine = { while true do local success, data = turtle.inspectUp() + print("inspect", success, data) if not s or data.name ~= LOG_NAME then + print("chopped all the wood") -- chopped all the wood break end turtle.digUp() if T.state.y == TREE_MAX_Y - 1 then + print("below last log") -- we are below the last log, no need to move up break end