[2.0.73] Setting required fluid per mining operation to 0.1 shows as 0.0

Things that we don't consider worth fixing at this moment.
User avatar
Quezler
Filter Inserter
Filter Inserter
Posts: 304
Joined: Fri Mar 25, 2016 6:37 pm
Contact:

[2.0.73] Setting required fluid per mining operation to 0.1 shows as 0.0

Post by Quezler »

When a resource has `minable.fluid_amount` set to 1 you can see in the tooltip of a drill placed on it that it takes 0.1 per mining operation, but when you select the resource entity it shows 0.0, so there is a rounding error somewhere.

Steps to reproduce:
- change the `minable.fluid_amount` of uranium from 10 to 1
- place a drill on an uranium patch
- look at the sidebar of the drill
- look at the sidebar of the ore

Expected behavior:
- the sidebar of the ore also shows as 0.1
Attachments
Screenshot 2026-01-21 at 15.43.04.png
Screenshot 2026-01-21 at 15.43.04.png (384.86 KiB) Viewed 621 times
Screenshot 2026-01-21 at 15.43.09.png
Screenshot 2026-01-21 at 15.43.09.png (290.75 KiB) Viewed 621 times
Rseding91
Factorio Staff
Factorio Staff
Posts: 16584
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [2.0.73] Setting required fluid per mining operation to 0.1 shows as 0.0

Post by Rseding91 »

Thanks for the report however this is correct. A "mining operation" on a drill is 10 ores so it requires 0.1 fluid for 10 ores. On the ore itself it requires only 0.1 / 10 fluid per individual ore or 0.01 fluid. This rounds down and shows 0 in the tooltip.
If you want to get ahold of me I'm almost always on Discord.
User avatar
Quezler
Filter Inserter
Filter Inserter
Posts: 304
Joined: Fri Mar 25, 2016 6:37 pm
Contact:

Re: [2.0.73] Setting required fluid per mining operation to 0.1 shows as 0.0

Post by Quezler »

Rseding91 wrote: Tue Jan 27, 2026 4:43 pm Thanks for the report however this is correct. A "mining operation" on a drill is 10 ores so it requires 0.1 fluid for 10 ores. On the ore itself it requires only 0.1 / 10 fluid per individual ore or 0.01 fluid. This rounds down and shows 0 in the tooltip.
but that would mean the uranium drill & ore tooltips are wrong then since it shows 1 for both, so i still kinda feel like this is a rounding error:
Attachments
Screenshot 2026-01-28 at 12.42.37.png
Screenshot 2026-01-28 at 12.42.37.png (586.91 KiB) Viewed 425 times
Screenshot 2026-01-28 at 12.42.45.png
Screenshot 2026-01-28 at 12.42.45.png (485.17 KiB) Viewed 425 times
Rseding91
Factorio Staff
Factorio Staff
Posts: 16584
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [2.0.73] Setting required fluid per mining operation to 0.1 shows as 0.0

Post by Rseding91 »

Hmm, actually I was wrong. They are both using the / 10 value however one just puts "the number" and one through a bunch of generic name-and-count logic eventually converts to an integer before showing.
If you want to get ahold of me I'm almost always on Discord.
Rseding91
Factorio Staff
Factorio Staff
Posts: 16584
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [2.0.73] Setting required fluid per mining operation to 0.1 shows as 0.0

Post by Rseding91 »

I looked into this more and I don't see a solution that makes it "work" nicely in all cases. The GUI and logic was never meant to have fluid amounts that small because it starts adding decimals to a bunch of places - and decimals are by their nature repeating/long - so no number of decimals is ever "correct" for all cases.

The value to be shown is 1 / 10 which can't be represented in binary floating point format and so is actually 0.099999 and some change. This gets rounded down and shown as 0 in the GUI with 1 decimal place.

The solution is to not make ores take that little fluid.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Won't fix.”