Shadnix-was-taken / BeatSaber-SongPlayHistoryContinued

Beat Saber local leaderboard plugin
MIT License
16 stars 4 forks source link

Bring Back Acc on Failed Record + BeatLeader Replay Detection #6

Closed qe201020335 closed 1 year ago

qe201020335 commented 1 year ago

1.6.3: Identify whether the result is from ScoreSaver or BeatLeader replay. Ignore if it is.

1.6.4: Add the failed acc back. Added a new field in the Record model for max raw score.

The max raw score is actually not accessible at all outside of the game play context and it only exists in the ScoreController. Well, I guess I have to track and pass the value myself then. SiraUtil and Zenject to the rescue!

For all the existing records, if the max scores can be calculated with the old method, i.e. there is no slider or burst in the map, I simply calculate the max score with the note count Record.LastNote.

Shadnix-was-taken commented 1 year ago

Thank you very much for the PR. I'll work through it once I'm back from vacation next week.

qe201020335 commented 1 year ago

hotfix, my previous replay detection code will break if BeatLeader is not installed, I have handled this case but it apparently did not work

Learnt that from this issue https://github.com/qe201020335/HRCounter/issues/40

qe201020335 commented 1 year ago

Just noticed, the OldschoolBeatSaber mod will break this. Simply installing the mod will cause the SPH hover hint ui not to load.

There won't be any exceptions, just like SPH is not installed but new records will still be saved. This seems to be because OldschoolBeatSaber provides a re-implementation of some old-school elements of HMUI and SPH's reflection may be finding the wrong types.

qe201020335 commented 1 year ago

Added support for 1.28.0. (1.27.0 still works)

qe201020335 commented 1 year ago

I'm uploading this to BeatMods

Shadnix-was-taken commented 1 year ago

Ok, I'm fine with that. Sorry for my total lack of activity. Life happened and my spare time is very limited at the moment :/

qe201020335 commented 1 year ago

No worries, I can take it over while you are busy