Update 'Turtle/Wheat.lua'
This commit is contained in:
		@@ -159,3 +159,26 @@ function Wheat:clearInv(goBack)
 | 
				
			|||||||
        self:moveTo(goBack)
 | 
					        self:moveTo(goBack)
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
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
 | 
				
			||||||
		Reference in New Issue
	
	Block a user