1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-07 15:17:30 +08:00

Fx component lookups being incorrect for non-databased legacy s… (#5838)

Fx component lookups being incorrect for non-databased legacy skins
This commit is contained in:
Dean Herbert 2019-08-26 18:57:04 +09:00 committed by GitHub
commit 1ec69ecef8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -155,6 +155,11 @@ namespace osu.Game.Skinning
// Spacing value was reverse-engineered from the ratio of the rendered sprite size in the visual inspector vs the actual texture size // Spacing value was reverse-engineered from the ratio of the rendered sprite size in the visual inspector vs the actual texture size
Spacing = new Vector2(-Configuration.HitCircleOverlap * 0.89f, 0) Spacing = new Vector2(-Configuration.HitCircleOverlap * 0.89f, 0)
}; };
default:
string lastPiece = componentName.Split('/').Last();
componentName = componentName.StartsWith("Gameplay/taiko/") ? "taiko-" + lastPiece : lastPiece;
break;
} }
return getAnimation(componentName, animatable, looping); return getAnimation(componentName, animatable, looping);
@ -226,11 +231,8 @@ namespace osu.Game.Skinning
{ {
bool hasExtension = filename.Contains('.'); bool hasExtension = filename.Contains('.');
string lastPiece = filename.Split('/').Last();
var legacyName = filename.StartsWith("Gameplay/taiko/") ? "taiko-" + lastPiece : lastPiece;
var file = source.Files.Find(f => var file = source.Files.Find(f =>
string.Equals(hasExtension ? f.Filename : Path.ChangeExtension(f.Filename, null), legacyName, StringComparison.InvariantCultureIgnoreCase)); string.Equals(hasExtension ? f.Filename : Path.ChangeExtension(f.Filename, null), filename, StringComparison.InvariantCultureIgnoreCase));
return file?.FileInfo.StoragePath; return file?.FileInfo.StoragePath;
} }