diff --git a/Turtle/Wheat.lua b/Turtle/Wheat.lua index e6d99c4..9759d75 100644 --- a/Turtle/Wheat.lua +++ b/Turtle/Wheat.lua @@ -1,11 +1,5 @@ -Wheat = {} - -function Wheat:new(t) - t = t or {} - setmetatable(t, self) - self.__index = self - return t -end +require("Turtle") +Wheat = Turtle:new() function Wheat:getStatusDown() local bd, data = turtle.inspectDown() @@ -19,25 +13,5 @@ end function Wheat:isPlantable(slot, update) self:assertInvUpdate(update) - -end -function Wood:updateInv() - self.inv = {} - for slot = 1, 16 do - self.inv[slot] = turtle.getItemDetail(slot, true) - end -end - -function Wood:assertInvUpdate(update) - if (update ~= false) then update = true end - - if self.inv == nil then - update = true - end - - assert(type(update) == "boolean","update must be of the type boolean") - if update == true then - self:updateInv() - end end \ No newline at end of file