Don't set DISPLAYNAME if empty

This commit is contained in:
MayNL
2026-06-29 12:46:08 -04:00
parent fb857a083f
commit 80ed099669
@@ -108,13 +108,16 @@ namespace PckStudio.Core.Extensions
// TODO: keep filepath // TODO: keep filepath
asset.Filename = $"dlcskin{skinId}.png"; asset.Filename = $"dlcskin{skinId}.png";
asset.SetParameter("DISPLAYNAME", skin.MetaData.Name); if (!string.IsNullOrEmpty(skin.MetaData.Name))
if (localizationFile is not null)
{ {
string skinLocKey = $"IDS_dlcskin{skinId}_DISPLAYNAME"; asset.SetParameter("DISPLAYNAME", skin.MetaData.Name);
asset.SetParameter("DISPLAYNAMEID", skinLocKey);
localizationFile.SetLocEntry(skinLocKey, skin.MetaData.Name); if (localizationFile is not null)
{
string skinLocKey = $"IDS_dlcskin{skinId}_DISPLAYNAME";
asset.SetParameter("DISPLAYNAMEID", skinLocKey);
localizationFile.SetLocEntry(skinLocKey, skin.MetaData.Name);
}
} }
if (!string.IsNullOrEmpty(skin.MetaData.Theme)) if (!string.IsNullOrEmpty(skin.MetaData.Theme))