did stuff
This commit is contained in:
parent
08935bc26b
commit
2dad33cd6d
@ -50,7 +50,7 @@ local function getNtfyAddress()
|
||||
end
|
||||
|
||||
function ntfy(msg)
|
||||
http.post(getNtfyAddress(), msg)
|
||||
http.post(getNtfyAddress(), "[" .. os.getComputerLabel() .. "] " .. msg)
|
||||
end
|
||||
|
||||
function splitStringToArray(inputStr)
|
||||
|
@ -81,7 +81,7 @@ local function savePos(prefix)
|
||||
local pos = tutel.getPos()
|
||||
|
||||
basic.appendToFileNl("/brulijam/files/chests-turtle-miner-fibo.txt", prefix .. pos["x"] .. ", " .. pos["y"]+1 .. ", " .. pos["z"])
|
||||
basic.ntfy("[" .. os.getComputerLabel() .. "](Mining) " .. prefix .. pos["x"] .. ", " .. pos["y"]+1 .. ", " .. pos["z"])
|
||||
basic.ntfy("(Mining) " .. prefix .. pos["x"] .. ", " .. pos["y"]+1 .. ", " .. pos["z"])
|
||||
end
|
||||
|
||||
local function inventoryRework()
|
||||
@ -144,7 +144,9 @@ local function inventoryRework()
|
||||
end
|
||||
|
||||
if not spaceAvailable and not chestAvailable then
|
||||
savePos("Turtle stopped")
|
||||
--savePos("Turtle stopped")
|
||||
local pos = tutel.getPos()
|
||||
basic.ntfy("(Mining) " .. "Turtle stopped mining at " .. pos["x"] .. ", " .. pos["y"] .. ", " .. pos["z"])
|
||||
shell.run("delete /brulijam/task.lua")
|
||||
shell.run("reboot")
|
||||
end
|
||||
@ -202,6 +204,14 @@ local function mineRow()
|
||||
for i=state["dataCurrentPathProgress"], state["dataGoalPathProgress"]-2 do
|
||||
print("row: " .. state["dataCurrentRow"]+1 .. "/" .. state["dataGoalRows"] .. ", pathProgress: " .. state["dataCurrentPathProgress"]+1 .. "/" .. state["dataGoalPathProgress"])
|
||||
|
||||
-- check fuel level
|
||||
if turtle.getFuelLevel() == 0 then
|
||||
local pos = tutel.getPos()
|
||||
basic.ntfy("(Mining) " .. "Turtle has no fuel at " .. pos["x"] .. ", " .. pos["y"] .. ", " .. pos["z"])
|
||||
shell.run("delete /brulijam/task.lua")
|
||||
shell.run("reboot")
|
||||
end
|
||||
|
||||
tutel.secureDig()
|
||||
--turtle.forward()
|
||||
tutel.forward()
|
||||
|
Loading…
Reference in New Issue
Block a user