Logistic group multiplier should round up

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

mrvn
Smart Inserter
Smart Inserter
Posts: 5999
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Logistic group multiplier should round up

Post by mrvn »

TL;DR
When multiplying the requested amount by the logistig group multiplier use the ceil funtion instead of truncating the result.
What?
The effective requested amount should be

Code: Select all

ceil(amount * multiplier)
Why?
The logistic group multiplier allows using a float value as multiplier. This allows having a large requested amount, e.g. the exact values from the recipe of a rocket silo, but then multiply that by e.g. 0.1 to limit the amount of items ordered on top of the required amounts.

Problem is that when you request 9 stone bricks with a multiplier of 0.1 then the requested amount is 0. It's not even rounded to the nearest integer but just truncated. Using the ceil function would ensure at least one of every listed item is actually requested regardless of the multiplier.
Post Reply

Return to “Ideas and Suggestions”