Skip to content

fix(stats): save stats on attempt and populate stats UI#53

Open
xWalfie-SMR wants to merge 2 commits intoRhythia:indevfrom
xWalfie-SMR:fix/stats-save
Open

fix(stats): save stats on attempt and populate stats UI#53
xWalfie-SMR wants to merge 2 commits intoRhythia:indevfrom
xWalfie-SMR:fix/stats-save

Conversation

@xWalfie-SMR
Copy link
Copy Markdown

this addresses issue #43

Stats.Save() was never called after updating stats in LegacyRunner.Stop(), so it only stayed in memory.
StatsPanel.Update() was empty, so the stats panel never displayed any values

this addresses issue Rhythia#43 where stats are updated in memory but not saved. StatsPanel.Update() is empty so UI still doesnt update
StatsPanel.Update() was empty so the stats panel never displayed any values even if the stats were saved
@nyuwaea
Copy link
Copy Markdown
Member

nyuwaea commented Apr 25, 2026

Very nice, this fix works on my end. The only issue is that Update() isn't called after launching the game, I believe setting up a Saved signal in Stats listened to by StatsPanel would work best.
Storing the Labels through _Ready() or with the Export annotation could also speed up Update() but it should be called infrequently enough where it likely doesn't matter too much.

@xWalfie-SMR
Copy link
Copy Markdown
Author

Sure, ill work on setting it up tomorrow, Stats already has [GlobalClass] so it should be straightforward

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants