Skip to content
This repository has been archived by the owner on May 25, 2024. It is now read-only.

Numeric widget and localized number formatting. #242

Merged
merged 5 commits into from
Mar 13, 2024

Conversation

AbdielKavash
Copy link
Member

@AbdielKavash AbdielKavash commented Mar 9, 2024

 

Notes:

  • Neutron Sensor UI required a rework to implement this. Previously, the player would specify an expression, such as >150MeV, which was then parsed and evaluated compared to the current energy of the Neutron Accelerator. The new UI looks much like the UI of covers, it has a numeric threshold and an invert setting. Since the numeric widget supports SI suffixes, the player can still type an expression like 150M into the field and set the expected threshold.

Sensors placed in-world update seamlessly to the new system, so existing setups won't explode! With one exception: comparisons for == and != are no longer supported, they are converted to <= and > respectively. This means that triggers ==0eV and !=0eV continue working as expected. I can't think of any other reason why one would want to test for exact (in)equality here, I also asked in discord, and got no answers.

* YOTTank UI text formatting depends on GTNewHorizons/ModularUI#71. This will not work until the transitive dependency is updated through GT5 again (sorry Dream). Please don't merge this PR until this is done. Done.

  • Tracking down every single instance where a mod writes a number is nearly impossible. I use a few heuristics and code searches, but it is very likely that I miss some places. If an UI displays an unformatted or wrongly formatted number somewhere, please report it to be fixed.

@AbdielKavash AbdielKavash marked this pull request as ready for review March 12, 2024 15:37
@AbdielKavash
Copy link
Member Author

Ready for review and merge.

Copy link
Member

@miozune miozune left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I trust you

@boubou19 boubou19 merged commit 07b5d74 into GTNewHorizons:master Mar 13, 2024
1 check passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants