stockflow: make sure that manager order amounts are integers

Fixes #1044
develop
lethosor 2017-03-18 17:56:06 -04:00
parent fa1adbbac4
commit aea76b7ef3
1 changed files with 14 additions and 13 deletions

@ -1094,6 +1094,7 @@ end
-- Place a new copy of the order onto the manager's queue.
function create_orders(order, amount)
local new_order = order:new()
amount = math.floor(amount)
new_order.amount_left = amount
new_order.amount_total = amount
-- Todo: Create in a validated state if the fortress is small enough?