Skip to content

Refactor combo colours retrieval to use skin config lookups instead #12682

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

Merged
merged 5 commits into from
Jul 20, 2021

Conversation

frenzibyte
Copy link
Member

This refactors the combo colours retrieval logic to not directly read the combo colours of the skin and use, but instead add a combo colour lookup (SkinComboColourLookup) for skin config and retrieve the colour using it.

This is required for a further change that overrides a given combo index with another special index instead, at a skin level, which can only ever be possible with this refactor.

Side note:

  • I was thinking of moving the lookup handling logic to a Skin-level and add a virtual GetComboColour method for both DefaultSkin and LegacySkin to override, but I've refrained from doing so as currently Skin does not implement anything and always returns null, so I think it's a better choice to leave doing that for later, once it's settled how modern (lazer) skins would look like and what members they will have.

Copy link
Member

@peppy peppy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm pretty happy with the direction of this change.

@peppy
Copy link
Member

peppy commented Jul 20, 2021

Separate from the follow-up "colourhax" PR, this one looks like a good code quality improvement. @smoogipoo requesting you do a sanity check of this one to make sure you agree.

@peppy peppy requested a review from smoogipoo July 20, 2021 10:16
@smoogipoo
Copy link
Contributor

It looks ok from me. Feel free to merge if you've tested.

Copy link
Contributor

@smoogipoo smoogipoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving based on code quality, haven't tested.

@peppy peppy merged commit d066ebc into ppy:master Jul 20, 2021
@frenzibyte frenzibyte deleted the refactor-combo-colour-retrieval branch July 20, 2021 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants