Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

port circleparse changes #25

Merged
merged 73 commits into from
Jan 26, 2021
Merged

port circleparse changes #25

merged 73 commits into from
Jan 26, 2021

Conversation

tybug
Copy link
Collaborator

@tybug tybug commented Jan 23, 2021

This is a port of the past two years (sounds more impressive than it really is) of changes over at the circleparse fork. After this circleparse will become defunct and circleguard will use osrparse instead.

There are quite a few changes here. The major ones are:

  • add scorev2 mod (closes Can't parse replays with ScoreV2 mod #18, supersedes Add scorev2 mod to the mods enum #20)
  • mod_combination is now a bitwise enum instead of a list of enums
  • support for parsing "pure" lzma strings (no other information available besides the replay data, since the osu! api /get_score endpoint only gives us the replay data and nothing else)
  • removal of the very last frame in replays after a certain version. This is the "rng seed" value. See the osu! wiki:

    On replays set on version 20130319 or later, the 32-bit integer RNG seed used for the score will be encoded into an additional replay frame at the end of the LZMA stream, under the format -12345|0|0|seed.

@kszlim
Copy link
Owner

kszlim commented Jan 23, 2021

Since you're the defacto maintainer of osrparse now, I'll leave this up to you, but consider adding type annotations/mypy to this library since you're actively looking at it now. I've always found types pretty handy.

@tybug
Copy link
Collaborator Author

tybug commented Jan 23, 2021

Good point. I've added type annotations to all public-facing members (adding them to internal methods doesn't seem worth the trouble).

@tybug
Copy link
Collaborator Author

tybug commented Jan 26, 2021

@kszlim I'm afraid there's a merge rule setup on the master branch which means I can't merge without an approving review (and I can't approve my own pr). Up to you if you want to remove that rule or if you want to keep a rubber stamp on all future prs.

@kszlim
Copy link
Owner

kszlim commented Jan 26, 2021

@tybug removed it

@tybug tybug merged commit 40e8ec6 into kszlim:master Jan 26, 2021
@tybug tybug deleted the osrparse branch January 26, 2021 23:34
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.

Can't parse replays with ScoreV2 mod
3 participants