Update client

This commit is contained in:
Dominic Zimmer 2020-07-07 16:51:49 +02:00
parent c8be939ce7
commit aa31b4523e

View File

@ -181,10 +181,11 @@ function selectFuel()
end
function digShaft()
turtle.digDown()
selectCobble()
turtle.placeUp()
turtle.down()
--turtle.digDown()
--selectCobble()
--turtle.placeUp()
moveSafe(turtle.down, turtle.inspectDown, turtle.digDown)
--turtle.down()
depth = digDeep(turtle.down, turtle.digDown, turtle.inspectDown, -1)
turtle.turnLeft()
digDeep(turtle.up, noop, noop, depth)
@ -193,10 +194,10 @@ function digShaft()
turtle.turnLeft()
digDeep(turtle.up, noop, noop, depth)
selectCobble()
turtle.up()
turtle.placeDown()
turtle.up()
turtle.digUp()
turtle.up()
--turtle.digUp()
--turtle.up()
end
function digTo(x, z)
@ -418,6 +419,12 @@ function drawStatus()
print()
print("Status:")
print(" "..turtlestate["state"])
if turtlestate["morestate"] then
print(" "..turtlestate["morestate"])
else
print()
end
print(" "..turtlestate["state"])
print()
end
@ -568,14 +575,18 @@ function goToJob2(job)
digSafe(turtle.inspectUp, turtle.digUp)
end
goToCoordXZ2(jobX, jobZ, extraaction)
moveSafe(turtle.down, turtle.inspectDown, turtle.digDown)
moveSafe(turtle.up, turtle.inspectUp, turtle.digUp)
--moveSafe(turtle.down, turtle.inspectDown, turtle.digDown)
--moveSafe(turtle.up, turtle.inspectUp, turtle.digUp)
--moveSafe(turtle.up, turtle.inspectUp, turtle.digUp)
end
slots = { {7,-6}, {7, -7}, {7, -8}, {7,-5}, {7,-4} }
function goToUnloading()
updateState({ state = "Going to unload resources..." })
moveSafe(turtle.up, turtle.inspectUp, turtle.digUp)
goToCoordXZ2(7, -6, noop)
moveSafe(turtle.up, turtle.inspectUp, turtle.digUp)
slot = math.ceil(math.random()*5)
slots = { {7,-6}, {7, -7}, {7, -8}, {7,-5}, {7,-4} }
storageX, storageZ = slots[slot][1], slots[slot][2]
goToCoordXZ2(storageX, storageZ, noop)
moveSafe(turtle.up, turtle.inspectUp, turtle.digUp)
@ -588,9 +599,13 @@ function turtleAI2()
while true do
local job = enqueueForJob2()
goToJob2(job)
digShaft()
goToUnloading()
updateState({ state = "Now unloading..." })
-- returnToQueue()
break
end
end
-- turtleAI()
turtleAI2()