Statistics Modal#97
Merged
Merged
Conversation
…update related calculations
…endering in StatisticsModal
…tatistics management
…tatistics display
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new in-game statistics tracking and display system for players, along with a refactor of economic terminology from "GDP" to "Industrial Production" throughout the codebase. The statistics feature collects key player metrics over time and adds a UI modal for viewing them. The economic terminology update ensures consistent usage and corrects formulas related to trade and player metrics.
Statistics feature additions:
StatDefinitions.tsandStatsStore.tsto track and compute player statistics over time, including metrics like gold, population, productivity, investments, structures, and technology progress. ([[1]](https://github.com/1brucben/Terratomic/pull/97/files#diff-5baf6266e796f97461a07cab75aa29a1e9671d261d602675edd633ce8eda1adeR1-R210),[[2]](https://github.com/1brucben/Terratomic/pull/97/files#diff-670dde409b528ee3a8ea32a5c1f9a65898a53fa4310b234d81d83e70d383d5a3R1-R112))ClientGameRunner, initializing tracking for all available metrics and updating stats on each game tick. ([[1]](https://github.com/1brucben/Terratomic/pull/97/files#diff-b256b0f1505dbe2f408d26fd2bee677538c547700ec1cae2d98a8bee3843f787R243-R260),[[2]](https://github.com/1brucben/Terratomic/pull/97/files#diff-b256b0f1505dbe2f408d26fd2bee677538c547700ec1cae2d98a8bee3843f787R312))ControlPanel2) that opens a modal displaying tracked player stats. Ensured the modal is registered and styled the button for accessibility. ([[1]](https://github.com/1brucben/Terratomic/pull/97/files#diff-06e5267ac6d5a923f03363b82774e68eec9c2a741aa355bd887f5085b3fd914bR27),[[2]](https://github.com/1brucben/Terratomic/pull/97/files#diff-06e5267ac6d5a923f03363b82774e68eec9c2a741aa355bd887f5085b3fd914bR969-R999),[[3]](https://github.com/1brucben/Terratomic/pull/97/files#diff-06e5267ac6d5a923f03363b82774e68eec9c2a741aa355bd887f5085b3fd914bR1235-R1248))index.htmland control panel styling. ([[1]](https://github.com/1brucben/Terratomic/pull/97/files#diff-f85ce1576c94e1e36e5c117441a2772114649e1bdf9dacf0478a827db28d46c6L265-R265),[[2]](https://github.com/1brucben/Terratomic/pull/97/files#diff-f85ce1576c94e1e36e5c117441a2772114649e1bdf9dacf0478a827db28d46c6R275),[[3]](https://github.com/1brucben/Terratomic/pull/97/files#diff-06e5267ac6d5a923f03363b82774e68eec9c2a741aa355bd887f5085b3fd914bL1150-R1182))Economic terminology and trade formula updates:
Config,Player,PlayerUpdate), and updated trade gravity calculations to use industrial production instead of GDP. ([[1]](https://github.com/1brucben/Terratomic/pull/97/files#diff-2642ba97cfb236b407d471ea067073daf91387e758835b1faa1e52a20a8c743fL128-R129),[[2]](https://github.com/1brucben/Terratomic/pull/97/files#diff-2642ba97cfb236b407d471ea067073daf91387e758835b1faa1e52a20a8c743fL156-R156),[[3]](https://github.com/1brucben/Terratomic/pull/97/files#diff-ee2fcbca50d87cc09d2c7d2667210defe2e3e111239820c89c40283be5385b64L1139-R1140),[[4]](https://github.com/1brucben/Terratomic/pull/97/files#diff-e76c8773aaac0de32060a5c943e0753a9621a629d4925071be31c912bd983dd3L613-R614),[[5]](https://github.com/1brucben/Terratomic/pull/97/files#diff-14aef6956113929162722927cdba9071288ec4f3dc2eac3c539768cc11ca66bbL179-R190),[[6]](https://github.com/1brucben/Terratomic/pull/97/files#diff-aa77a10b69c26dd62bc28408bb3143ee9fb5f14ba19c8632f161a8b64de7ffedL136-R140),[[7]](https://github.com/1brucben/Terratomic/pull/97/files#diff-aa77a10b69c26dd62bc28408bb3143ee9fb5f14ba19c8632f161a8b64de7ffedL160-R167))These changes collectively add a robust player statistics system and improve clarity around economic metrics in the game.