Skip to content

Commit 919c09a

Browse files
committed
Fixed bug with icons not being found
1 parent f00ae79 commit 919c09a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

source/SongCore/HarmonyPatches/CosmeticCharacteristicsPatches.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,9 @@ private static void Postfix(IReadOnlyList<IDifficultyBeatmapSet> difficultyBeatm
125125

126126
if (detail != null)
127127
{
128-
Sprite sprite = Utilities.Utils.LoadSpriteFromFile(Path.Combine(level.customLevelPath, detail._characteristicIconFilePath)) ?? characteristic.icon;
128+
Sprite sprite = characteristic.icon;
129+
if (detail._characteristicIconFilePath != null)
130+
sprite = Utilities.Utils.LoadSpriteFromFile(Path.Combine(level.customLevelPath, detail._characteristicIconFilePath)) ?? characteristic.icon;
129131
string label = detail._characteristicLabel ?? Polyglot.Localization.Get(characteristic.descriptionLocalizationKey);
130132
newDataItems.Add(new IconSegmentedControl.DataItem(sprite, label));
131133
}

0 commit comments

Comments
 (0)