Update 'Controller/CropController.lua'
This commit is contained in:
parent
da932012e0
commit
74cea2d6da
@ -1,4 +1,5 @@
|
|||||||
CropController = {}
|
CropController = {}
|
||||||
|
CropController.interval = 900
|
||||||
|
|
||||||
function CropController:new(t)
|
function CropController:new(t)
|
||||||
t = t or {}
|
t = t or {}
|
||||||
@ -144,3 +145,15 @@ end
|
|||||||
function CropController:setSlaveID(id)
|
function CropController:setSlaveID(id)
|
||||||
self.slaveID = id
|
self.slaveID = id
|
||||||
end
|
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
|
Loading…
x
Reference in New Issue
Block a user