Update client for lava/water

This commit is contained in:
Dominic Zimmer 2020-07-09 10:14:29 +02:00
parent 88a94caf74
commit 035ab99fcc

View File

@ -106,6 +106,13 @@ function moveSafe(moveAction, inspectAction, digAction)
if block["name"]:lower():find("turtle") then
-- turtle in front of me. lets wait for it to move
sleep(0.6)
elseif block["name"]:lower().find("water") or block["name"]:lower().find("lava") then
if moveAction() then
break
else
digAction()
updateState({ state = "I am stuck trying to walk into a liquid." })
end
else
digAction()
end
@ -414,13 +421,17 @@ function drawStatus()
print()
print(" \""..turtlestate["name"].."\"")
print()
print()
if turtlestate["job"] then
print("Current job: "..tostring(turtlestate["job"]))
else
print("Current job: ")
end
print()
if turtle["startfuel"] then
print("Starting Fuel: "..tostring(turtlestate["startfuel"]))
else
print("Starting Fuel: ")
end
if turtlestate["job"] then
print("Recent fuel usage: "..tostring(turtlestate["fuel"]))
else
@ -674,7 +685,7 @@ function turtleAI2()
local job = enqueueForJob2()
turtlestate["job"] = job
doRefuel2()
startfuel = turtle.getFuelLevel()
turtlestate["startfuel"] = turtle.getFuelLevel()
goToJob2(job)
digShaft()
goToUnloading()