From: Olav Bakke Svendsen Date: Wed, 15 May 2024 19:37:00 +0000 (+0200) Subject: fixes X-Git-Tag: skystone~7 X-Git-Url: http://git.olavbs.no/?a=commitdiff_plain;h=943f7dc7ae47f84d85c1fa7a827e8d9d59212e1f;p=cc.git fixes --- diff --git a/lib/turtle-utils.lua b/lib/turtle-utils.lua index 2d79f54..ab9f375 100644 --- a/lib/turtle-utils.lua +++ b/lib/turtle-utils.lua @@ -89,9 +89,9 @@ lib.transferAndSelect = function(i, t) return true end local msg = "Could not transfer and select: " - local i_tmp, e = findEmpty() + local i_tmp, e = lib.findEmpty() if not i_tmp then return false, msg .. e end - local i_from, e = find(t) + local i_from, e = lib.findItem(t) if not i_from then return false, msg .. e end -- if the i'th slot is free, skip the unnecessary item shuffle if not turtle.getItemDetail(i) then @@ -135,7 +135,7 @@ lib.runStringCommand = function(str, map) for i = 1, n do map[c]() end -- print(cmd, tostring(i).."/"..tostring(n)) -- end - return lib.runStringCommand(rest) + return lib.runStringCommand(rest, map) end -- rep : number of repeats -> string -> string | nil diff --git a/vineyard/turtle/harvest.lua b/vineyard/turtle/harvest.lua index c5bbea1..81ab487 100644 --- a/vineyard/turtle/harvest.lua +++ b/vineyard/turtle/harvest.lua @@ -55,7 +55,7 @@ local sequence = function() .. harvest_ns .. "l" .. harvest_ew .. "l" .. harvest_ns .. "l" .. harvest_ew .. go_to_dropoff - return runStringCommand(seq, map) + return tu.runStringCommand(seq, map) end while true do