Update client
This commit is contained in:
parent
c8be939ce7
commit
aa31b4523e
@ -181,10 +181,11 @@ function selectFuel()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function digShaft()
|
function digShaft()
|
||||||
turtle.digDown()
|
--turtle.digDown()
|
||||||
selectCobble()
|
--selectCobble()
|
||||||
turtle.placeUp()
|
--turtle.placeUp()
|
||||||
turtle.down()
|
moveSafe(turtle.down, turtle.inspectDown, turtle.digDown)
|
||||||
|
--turtle.down()
|
||||||
depth = digDeep(turtle.down, turtle.digDown, turtle.inspectDown, -1)
|
depth = digDeep(turtle.down, turtle.digDown, turtle.inspectDown, -1)
|
||||||
turtle.turnLeft()
|
turtle.turnLeft()
|
||||||
digDeep(turtle.up, noop, noop, depth)
|
digDeep(turtle.up, noop, noop, depth)
|
||||||
@ -193,10 +194,10 @@ function digShaft()
|
|||||||
turtle.turnLeft()
|
turtle.turnLeft()
|
||||||
digDeep(turtle.up, noop, noop, depth)
|
digDeep(turtle.up, noop, noop, depth)
|
||||||
selectCobble()
|
selectCobble()
|
||||||
|
turtle.up()
|
||||||
turtle.placeDown()
|
turtle.placeDown()
|
||||||
turtle.up()
|
--turtle.digUp()
|
||||||
turtle.digUp()
|
--turtle.up()
|
||||||
turtle.up()
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function digTo(x, z)
|
function digTo(x, z)
|
||||||
@ -418,6 +419,12 @@ function drawStatus()
|
|||||||
print()
|
print()
|
||||||
print("Status:")
|
print("Status:")
|
||||||
print(" "..turtlestate["state"])
|
print(" "..turtlestate["state"])
|
||||||
|
if turtlestate["morestate"] then
|
||||||
|
print(" "..turtlestate["morestate"])
|
||||||
|
else
|
||||||
|
print()
|
||||||
|
end
|
||||||
|
print(" "..turtlestate["state"])
|
||||||
print()
|
print()
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -568,14 +575,18 @@ function goToJob2(job)
|
|||||||
digSafe(turtle.inspectUp, turtle.digUp)
|
digSafe(turtle.inspectUp, turtle.digUp)
|
||||||
end
|
end
|
||||||
goToCoordXZ2(jobX, jobZ, extraaction)
|
goToCoordXZ2(jobX, jobZ, extraaction)
|
||||||
moveSafe(turtle.down, turtle.inspectDown, turtle.digDown)
|
--moveSafe(turtle.down, turtle.inspectDown, turtle.digDown)
|
||||||
moveSafe(turtle.up, turtle.inspectUp, turtle.digUp)
|
--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)
|
moveSafe(turtle.up, turtle.inspectUp, turtle.digUp)
|
||||||
goToCoordXZ2(7, -6, noop)
|
goToCoordXZ2(7, -6, noop)
|
||||||
|
|
||||||
moveSafe(turtle.up, turtle.inspectUp, turtle.digUp)
|
moveSafe(turtle.up, turtle.inspectUp, turtle.digUp)
|
||||||
slot = math.ceil(math.random()*5)
|
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]
|
storageX, storageZ = slots[slot][1], slots[slot][2]
|
||||||
goToCoordXZ2(storageX, storageZ, noop)
|
goToCoordXZ2(storageX, storageZ, noop)
|
||||||
moveSafe(turtle.up, turtle.inspectUp, turtle.digUp)
|
moveSafe(turtle.up, turtle.inspectUp, turtle.digUp)
|
||||||
@ -588,9 +599,13 @@ function turtleAI2()
|
|||||||
while true do
|
while true do
|
||||||
local job = enqueueForJob2()
|
local job = enqueueForJob2()
|
||||||
goToJob2(job)
|
goToJob2(job)
|
||||||
|
digShaft()
|
||||||
|
goToUnloading()
|
||||||
|
updateState({ state = "Now unloading..." })
|
||||||
-- returnToQueue()
|
-- returnToQueue()
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
-- turtleAI()
|
||||||
|
|
||||||
turtleAI2()
|
turtleAI2()
|
||||||
|
Loading…
Reference in New Issue
Block a user