Page 1 of 1

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

Posted: Thu Aug 04, 2022 5:09 pm
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.

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

Posted: Thu Feb 16, 2023 7:35 am
by vangrunz
Is the amount still wrong if you put a pump directly after the assembler?

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

Posted: Tue Mar 14, 2023 7:29 am
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.