Update 'Turtle/Wheat.lua'

This commit is contained in:
manuel 2023-01-08 16:37:35 +00:00
parent 7006e03461
commit 71f2947b7b

View File

@ -83,4 +83,22 @@ function Wheat:readConfig(path)
self.homePos = {config[1], config[2], config[3], config[4]} self.homePos = {config[1], config[2], config[3], config[4]}
self.length = config[5] self.length = config[5]
self.width = config[6] self.width = config[6]
end
function Wheat:resolveTarget(target)
if target == "home" then
target = self.homePos
elseif target == "seedChest" then
target = self.homePos
target = self:offset(target, target[4] - 1, 1)
elseif target == "coalChest" then
target = self.homePos
target = self:offset(target, target[4] -1, 2)
elseif target == "outputChest" then
target = self.homePos
end
self:assertPositionFormat(target)
self:log("target resolved")
return target
end end