Account for overflow

This commit is contained in:
Salt 2023-12-01 18:57:09 -06:00
parent e120636ace
commit 76e0731ad1

View File

@ -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