[1.1.63] Rounding error when supplying flamethrower turrets with oil from an assembly machine

Bugs that are actually features.
Xeanoa
Fast Inserter
Fast Inserter
Posts: 190
Joined: Tue Apr 26, 2016 4:32 pm
Contact:

[1.1.63] Rounding error when supplying flamethrower turrets with oil from an assembly machine

Post by Xeanoa »

Hi,

when building small flamethrower turret outposts supplied with oil from an assembly machine, I noticed that sometimes, it would round the amount of the oil in the machine to xxx.9, e.g. 899.9, or 999.9 crude oil in stead of 900, or 1000 respectively. This sometimes corrects itself when oil is flowing, and becomes the correct amount again.

This seems to happen when oil flows out of the assembly machine. but does not completely drain it, for example when you fill the machine with oil first, then rotate it to connect with the pipe.
Attachments
Flamethrower2.png
Flamethrower2.png (292.28 KiB) Viewed 1277 times
Flamethrower1.png
Flamethrower1.png (61.43 KiB) Viewed 1277 times
vangrunz
Long Handed Inserter
Long Handed Inserter
Posts: 84
Joined: Tue Dec 26, 2017 1:26 pm
Contact:

Re: [1.1.63] Rounding error when supplying flamethrower turrets with oil from an assembly machine

Post by vangrunz »

Is the amount still wrong if you put a pump directly after the assembler?
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 2965
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [1.1.63] Rounding error when supplying flamethrower turrets with oil from an assembly machine

Post by boskid »

Fluids are implemented using floating point numbers, there are roundings happening in various places. If during fluid flow there was some fluid amount lost then its gone. I am not going to round those numbers up because it could happen that there is 49.99999 fluid in the assembling machine that would show up as a 50.0 and yet a barreling recipe would not start because of not enough fluid ingredient and that would be an obvious issue. Current behavior of showing xx.9 is not a bug because the fluid amount is indeed xx.9 and i am not going to convert fluid system to use fixed point numbers only to fix this bug report.
Post Reply

Return to “Not a bug”