Debug
This commit is contained in:
parent
15e280a1f3
commit
56ab1255e2
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user