Update 'Controller/CropController.lua'
This commit is contained in:
parent
070f33ac80
commit
326814c092
@ -1,12 +1,11 @@
|
|||||||
CropController = {}
|
CropController = {}
|
||||||
CropController.interval = 900
|
|
||||||
|
|
||||||
function CropController:new(t)
|
function CropController:new(t)
|
||||||
t = t or {}
|
t = t or {}
|
||||||
setmetatable(t, self)
|
setmetatable(t, self)
|
||||||
self.__index = self
|
self.__index = self
|
||||||
t.matrix = {}
|
t.matrix = {}
|
||||||
t.stats = {}
|
t.stats = {interval = 900}
|
||||||
return t
|
return t
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -151,11 +150,11 @@ function CropController:harvest()
|
|||||||
self:doAction(self.slaveID, "harvest")
|
self:doAction(self.slaveID, "harvest")
|
||||||
local s, duration = self:doAction(self.slaveID, "getLastHarvestDuration")
|
local s, duration = self:doAction(self.slaveID, "getLastHarvestDuration")
|
||||||
if s == true then
|
if s == true then
|
||||||
self.stats.lastHarvestDuration = duration
|
self.stats["Last harvest duration"] = duration
|
||||||
end
|
end
|
||||||
local s, yield = self:doAction(self.slaveID, "getLastYield")
|
local s, yield = self:doAction(self.slaveID, "getLastYield")
|
||||||
if s == true then
|
if s == true then
|
||||||
self.stats.lastYield = yield
|
self.stats["Last yield"] = yield
|
||||||
end
|
end
|
||||||
self:getMatrix()
|
self:getMatrix()
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user