Debug
This commit is contained in:
parent
15e280a1f3
commit
56ab1255e2
@ -139,6 +139,7 @@ local state_machine = {
|
|||||||
|
|
||||||
["ASCEND_TREE"] = function()
|
["ASCEND_TREE"] = function()
|
||||||
local success, data = turtle.inspectUp()
|
local success, data = turtle.inspectUp()
|
||||||
|
print("inspect", success, data)
|
||||||
if not s and T.state.y < TREE_MAX_Y - 1 then
|
if not s and T.state.y < TREE_MAX_Y - 1 then
|
||||||
-- probably reset after chopping a block
|
-- probably reset after chopping a block
|
||||||
T.up()
|
T.up()
|
||||||
@ -146,12 +147,15 @@ local state_machine = {
|
|||||||
|
|
||||||
while true do
|
while true do
|
||||||
local success, data = turtle.inspectUp()
|
local success, data = turtle.inspectUp()
|
||||||
|
print("inspect", success, data)
|
||||||
if not s or data.name ~= LOG_NAME then
|
if not s or data.name ~= LOG_NAME then
|
||||||
|
print("chopped all the wood")
|
||||||
-- chopped all the wood
|
-- chopped all the wood
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
turtle.digUp()
|
turtle.digUp()
|
||||||
if T.state.y == TREE_MAX_Y - 1 then
|
if T.state.y == TREE_MAX_Y - 1 then
|
||||||
|
print("below last log")
|
||||||
-- we are below the last log, no need to move up
|
-- we are below the last log, no need to move up
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user