fixes
authorOlav Bakke Svendsen <mail@olavbs.no>
Wed, 15 May 2024 19:37:00 +0000 (21:37 +0200)
committerOlav Bakke Svendsen <mail@olavbs.no>
Wed, 15 May 2024 19:37:00 +0000 (21:37 +0200)
lib/turtle-utils.lua
vineyard/turtle/harvest.lua

index 2d79f54fe4c290f02d2d681246b0ca61076848bb..ab9f3759f31e78836f94d92ffb1d647747622e17 100644 (file)
@@ -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
index c5bbea12f735d30bc20a0cc0ecfd3c9ac705e829..81ab4877280ad4413131c52a7930c1748455b1b0 100644 (file)
@@ -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