Fix client
This commit is contained in:
parent
7f29b499ff
commit
286625904b
@ -1,5 +1,6 @@
|
||||
args = {...}
|
||||
x, z, direction = 0, 0, 0
|
||||
startfuel = nil
|
||||
turtlestate = {
|
||||
name = os.getComputerLabel(),
|
||||
id = os.getComputerID(),
|
||||
@ -644,7 +645,8 @@ function reportDuty2()
|
||||
end
|
||||
rednet.open("top")
|
||||
id = turtlestate["job"]
|
||||
fuelconsumed = turtlestate["fuel"]
|
||||
fuelconsumed = turtle.getFuelLevel() - startfuel
|
||||
turtlestate["fuel"] = fuelconsumed
|
||||
rednet.broadcast(tostring(id), "jobs")
|
||||
sleep(0.6)
|
||||
--print("Proto: Sending fuel status")
|
||||
@ -666,7 +668,9 @@ end
|
||||
function turtleAI2()
|
||||
while true do
|
||||
local job = enqueueForJob2()
|
||||
turtlestate["job"] = job
|
||||
doRefuel2()
|
||||
startfuel = turtle.getFuelLevel()
|
||||
goToJob2(job)
|
||||
digShaft()
|
||||
goToUnloading()
|
||||
|
Loading…
Reference in New Issue
Block a user