Update 'Controller/CropController.lua'
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
CropController = {}
|
||||
CropController.interval = 900
|
||||
|
||||
function CropController:new(t)
|
||||
t = t or {}
|
||||
@@ -143,4 +144,16 @@ end
|
||||
|
||||
function CropController:setSlaveID(id)
|
||||
self.slaveID = id
|
||||
end
|
||||
|
||||
function CropController:harvest()
|
||||
self:doAction(self.slaveID, "harvest")
|
||||
local s, duration = self:doAction(self.slaveID, "getLastHarvestDuration")
|
||||
if s == true then
|
||||
self.lastHarvestDuration = duration
|
||||
end
|
||||
local s, yield = self:doAction(self.slaveID, "getLastYield")
|
||||
if s == true then
|
||||
self.lastYield = yield
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user