Account for overflow
This commit is contained in:
parent
e120636ace
commit
76e0731ad1
@ -86,7 +86,10 @@ function checkIfDone()
|
||||
for i = 1, output.size(), 1 do
|
||||
if output.getItemDetail(i) then
|
||||
item = output.getItemDetail(i)
|
||||
if item.count == item.maxCount then
|
||||
-- Magic number 3 here is determined as follows:
|
||||
-- 1 from the offspring of this new generation
|
||||
-- 2 from the breeding pair
|
||||
if item.count == item.maxCount - 3 then
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user