diff --git a/kai/gitgud.lua b/kai/gitgud.lua index 2aa2d0f..a08da1f 100644 --- a/kai/gitgud.lua +++ b/kai/gitgud.lua @@ -42,7 +42,7 @@ local function ensure_dotlua(path) end local function gitea_url(path) - return "https://gitea.leafbla.de/dominic/turtles/raw/branch/master/".. path + return "https://git.leafbla.de/dominic/turtles/raw/branch/master/".. path end local function download_file(repo_path, local_path) diff --git a/kai/lib.lua b/kai/lib.lua index 40ec963..2c9d42e 100644 --- a/kai/lib.lua +++ b/kai/lib.lua @@ -57,7 +57,7 @@ end local function move(raw_move, position_update) return function() - success, err = raw_move() + local success, err = raw_move() if not success then return false, err end diff --git a/kai/woodfarm.lua b/kai/woodfarm.lua index 1ed32f4..61949c0 100644 --- a/kai/woodfarm.lua +++ b/kai/woodfarm.lua @@ -43,12 +43,6 @@ local BACKUP_SAP_SLOT_TARGET_COUNT = 20 -- Should be enough even if every tree is fully grown local FUEL_LEVEL_TARGET = 1000 -local function breakpoint() - write("Enter to step ") - repeat e, d = os.pullEvent() until e == "key" and d == 257 - print("(OK)") -end - local function calculate_tree_position(row_index, tree_index) local x = (row_index - 1) * 5 @@ -72,7 +66,9 @@ local function greedy_move(x, z, o) T.rotateTowards("-z") end for _ = 1, math.abs(z - T.state.z) do - T.fwd() + while not T.fwd() do + sleep(1) + end end end @@ -83,7 +79,9 @@ local function greedy_move(x, z, o) T.rotateTowards("-x") end for _ = 1, math.abs(x - T.state.x) do - T.fwd() + while not T.fwd() do + sleep(1) + end end end