Update 'Turtle/Wheat.lua'

This commit is contained in:
manuel 2023-01-08 18:47:01 +00:00
parent e158a6b060
commit d1922fa99d

View File

@ -158,4 +158,27 @@ function Wheat:clearInv(goBack)
self:log("moving to goBack")
self:moveTo(goBack)
end
end
function Wheat:fillSeeds(goBack)
if (goBack == nil) then goBack = true end
if(goBack == true) then
goBack = {self.x, self.y, self.z, self.dir}
end
self:clearInv("seedChest")
end
function Wheat:calculateSeeds()
local seeds = 0
for i = 1, #self.cropMatrix do
local line = self.cropMatrix[i]
for j = 1, #line do
if line[j] == -2 then
seeds = seeds + 1
end
end
end
return seeds
end