stockflow: Use "floor division"

Per suggestion by @dscorbett
develop
Kelly Kinkade 2016-12-16 13:04:51 -06:00
parent 5be77fa63d
commit 1419d58b9a
1 changed files with 1 additions and 2 deletions

@ -1136,8 +1136,7 @@ function check_stockpiles(verbose)
local reaction = spec.entry.ints[entry_ints.order_number]
local filled, empty = check_pile(spec.stockpile, verbose)
local amount = trigger.filled and filled or empty
amount = (amount - (amount % trigger.divisor)) / trigger.divisor
amount = math.floor(amount)
amount = (amount - (amount % trigger.divisor)) // trigger.divisor
result[reaction] = (result[reaction] or 0) + amount
end
end