diff --git a/mine/client.lua b/mine/client.lua index e95d578..562bd15 100644 --- a/mine/client.lua +++ b/mine/client.lua @@ -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()