[Rseding91] [2.0.28] Inconsistent rounding with fractional logistic group multiplier
Posted: Fri Dec 27, 2024 11:32 pm
Steps to reproduce:
1. Setup a logistic request for 840 iron plates
2. Set the logistic group multiplier to 0.65 -> It will display as 0.6, see 653467
3. Fill the entity with 545 iron plates
What happens:
The indicator light will show all requests fulfilled, but the tool-tip for iron plates in the request shows the satisfaction as 545/546, and the slot is colored red. Logistic bots will also not come to supply the last iron plate, even if it is available in the logistic network. If one more plate is removed, the request becomes "unsatisfied" and bots will supply items.
What I expected to happen:
For the bots to deliver the last iron plate, or at least, for the led indicator and the slot highlight&tooltip to agree with each other (I wouldn't have noticed the rounding if it was consistent).
Extra info:
- 840*0.65 = 546 exactly
- the rounding error also occurs with other items, and probably also with other values
- Note that if the bots are allowed to insert the iron plates, the final amount will vary, depending on their storage capacity and how many plates are needed to "satisfy" the request.
Does it always happen:
It is always happens if the right number of items are in the chest.
1. Setup a logistic request for 840 iron plates
2. Set the logistic group multiplier to 0.65 -> It will display as 0.6, see 653467
3. Fill the entity with 545 iron plates
What happens:
The indicator light will show all requests fulfilled, but the tool-tip for iron plates in the request shows the satisfaction as 545/546, and the slot is colored red. Logistic bots will also not come to supply the last iron plate, even if it is available in the logistic network. If one more plate is removed, the request becomes "unsatisfied" and bots will supply items.
What I expected to happen:
For the bots to deliver the last iron plate, or at least, for the led indicator and the slot highlight&tooltip to agree with each other (I wouldn't have noticed the rounding if it was consistent).
Extra info:
- 840*0.65 = 546 exactly
- the rounding error also occurs with other items, and probably also with other values
- Note that if the bots are allowed to insert the iron plates, the final amount will vary, depending on their storage capacity and how many plates are needed to "satisfy" the request.
Does it always happen:
It is always happens if the right number of items are in the chest.