X2CommunityCore / X2WOTCCommunityHighlander

https://steamcommunity.com/workshop/filedetails/?id=1134256495
MIT License
60 stars 69 forks source link

Allow mods to force displaying the 24h clock and allow appending zeroes to months and days for display consistency. #1400

Closed BlackDog86 closed 1 week ago

BlackDog86 commented 3 weeks ago

X2StrategyGameRulesetDataStructures contains some unusual logic for when the game should display the 24h clock (GetTimeStringSeparated function) - if the language is INT or ESN, then the 12h clock is preferred for some strange reason. In one of my mods I currently over-ride X2StrategyGameRulesetDataStructures to fix this minor issue but it would be better if mods could just set this via a config variable.

Additionally, it has always bugged me that dates are displayed like this:

9/6/2024 13/6/2024

(Different string lengths)

Rather than something like: 09/06/2024 or better, in ISO standard: 2024-06-09

By creating a couple of leading-zero-appended strings in GetDateString, mods can adjust the display of these dates just by using localisation without having to interfere with any base-game functionality and/or MCO this relatively important class.