[Twinsen][1.1.12][Minor] Formatting for recipe temperatures

This subforum contains all the issues which we already resolved.
User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2529
Joined: Fri Nov 06, 2015 7:41 pm

[Twinsen][1.1.12][Minor] Formatting for recipe temperatures

Post by Deadlock989 »

A few quibbles with the way tooltips work for recipes that have results which set fluid temperatures.

1. Recipes with multiple results are handled differently to a single result. For single-product results with a temperature, the temperature is appended to the recipe name in the header, regardless of whether it is using the default recipe name localisation or an explicit localised_description property. For multiple-product results, it isn't. Setting or clearing main_product doesn't seem to affect this. My preference would be to not have it in the recipe header at all, but consistency would be my second choice.

r1.jpg
r1.jpg (29.67 KiB) Viewed 3395 times
r2.jpg
r2.jpg (26.05 KiB) Viewed 3395 times

2. The temperatures always give two decimal places (e.g. 1800.00 °). This seems excessive - I understand the need to cap repeating decimals but if it's a round number in the prototype, it would be nicer to have no decimals.

3. Temperatures in these tooltips don't appear to be using the format-degrees locale in core/locale/XX/core.cfg. This is set to __1__° with no space between the value and the degrees symbol, but recipe tooltips are unaffected if you override it, so I don't know where they are getting the symbol ° from. The tooltips also add an extra space between the value and the symbol (which isn't in the format-degrees locale string) which looks naff in brackets, especially with no scale (what kind of degrees are they?). This contrasts with boilers ,which show °C, but again, this doesn't seem to be localised text. TL;DR there's no way for a mod to standardise or adjust these temperature units and no way (that I can find) to provide multi-language support for the units.

r3.jpg
r3.jpg (44.44 KiB) Viewed 3363 times
Twinsen
Factorio Staff
Factorio Staff
Posts: 1348
Joined: Tue Sep 23, 2014 7:10 am
Contact:

Re: [Twinsen][1.1.12][Minor] Formatting for recipe temperatures

Post by Twinsen »

1.When there's a single main product, count is added in front and temperature is added at the back, regardless of translation.
At some point showAmountInTitle was added to work around this.
To keep it simple I made it so temperature shows in title only if showAmountInTitle is true.

2. I went through everywhere we print temperatures and made it so that temperatures that change in real-time(reactor, heat exchanger, pipes) always show 2 digit precision in gui or tooltips. Values that that are static(like in recipe tooltips or prototypes) will have 2 digit precision but with zeros truncated.

3. format-degrees locale is used only for angles as far as I can see. I added format-degrees-c and format-degrees-c-compact which should replace all our hardcoded temperature prints. (format-degrees-c-compact is only used once to print the heat capacity)
I also updated the products and ingredients in recipe tooltips to show °C instead of just °

So all should be fixed in Version: 1.1.13.

I made quite a few changes around how temperatures are printed so let me know if anything was broken or not accounted for.
User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2529
Joined: Fri Nov 06, 2015 7:41 pm

Re: [Twinsen][1.1.12][Minor] Formatting for recipe temperatures

Post by Deadlock989 »

Many thanks.
Post Reply

Return to “Resolved Problems and Bugs”