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

Add skin.ini parsing #2244

Merged
merged 10 commits into from Mar 22, 2018

Conversation

2 participants
@peppy
Copy link
Member

peppy commented Mar 19, 2018

Prerequisite to further progress in skinning.

@peppy peppy added this to the March 2018 milestone Mar 19, 2018

string lastPiece = filename.Split('/').Last();

var file = skin.Files.FirstOrDefault(f =>
string.Equals(Path.GetFileNameWithoutExtension(f.Filename), lastPiece, StringComparison.InvariantCultureIgnoreCase));
string.Equals(hasExtension ? f.Filename : Path.GetFileNameWithoutExtension(f.Filename), lastPiece, StringComparison.InvariantCultureIgnoreCase));

This comment has been minimized.

@smoogipoo

smoogipoo Mar 20, 2018

Contributor

What's this doing?

This comment has been minimized.

@peppy

peppy Mar 20, 2018

Author Member

If the incoming lookup has an extension then it respects that for lookups, else it drops it during matching.

This comment has been minimized.

@smoogipoo

smoogipoo Mar 20, 2018

Contributor

But hasExtension implies you have a '.'. If you don't have a '.' then you... get the file without the extension? But there should already be no extension since there's no '.', so at least one of these calls is redundant.

This comment has been minimized.

@peppy

peppy Mar 20, 2018

Author Member

it's running that on the lookup value, not the input parameter

This comment has been minimized.

@smoogipoo

smoogipoo Mar 20, 2018

Contributor

:brain: 💥 :into_space:

This comment has been minimized.

@smoogipoo

smoogipoo Mar 20, 2018

Contributor

ok fair enough

This comment has been minimized.

@peppy

peppy Mar 20, 2018

Author Member

Filenames are stored with extensions in the database storage, which we want to ignore here if the query value doesn't have an extension.

@@ -10,6 +10,8 @@ public abstract class Skin
{
public readonly SkinInfo SkinInfo;

public virtual SkinConfiguration Configuration { get; protected set; }

This comment has been minimized.

@smoogipoo

smoogipoo Mar 20, 2018

Contributor

So how do you envision mania skinning to work? And catch skinning? Is the endgame to add the CatcherDashColour and individual configurations for mania playstyles at a base SkinConfiguration level? What if we want to extend each ruleset with additional skin configurations in the future?

This comment has been minimized.

@peppy

peppy Mar 20, 2018

Author Member

Probably derived SkinConfiguration types, or maybe a level below that.

break;
}

return;

This comment has been minimized.

@smoogipoo

smoogipoo Mar 20, 2018

Contributor

Is there a reason for this explicit return, vs just letting the base parse continue?

This comment has been minimized.

@peppy

peppy Mar 20, 2018

Author Member

not really

return -> break
no real reason but whatever works

@smoogipoo smoogipoo merged commit 606ad4b into ppy:master Mar 22, 2018

1 check passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details

@peppy peppy deleted the peppy:skin-ini-parsing branch Jun 21, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.