diff --git a/kai/woodfarm.lua b/kai/woodfarm.lua index 2284570..a4993c4 100644 --- a/kai/woodfarm.lua +++ b/kai/woodfarm.lua @@ -140,7 +140,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 + if not success and T.state.y < TREE_MAX_Y - 1 then -- probably reset after chopping a block T.up() end @@ -148,7 +148,7 @@ local state_machine = { while true do local success, data = turtle.inspectUp() print("inspect", success, data) - if not s or data.name ~= LOG_NAME then + if not success or data.name ~= LOG_NAME then print("chopped all the wood") -- chopped all the wood break @@ -177,7 +177,7 @@ local state_machine = { turtle.transferTo(SAP_SLOT) turtle.select(SAP_SLOT) end - + turtle.placeDown() if T.state.current_tree < MAX_TREE then -- go to the next tree in this row