From 80ed09966953c457e10cc2cd13f23604face49bc Mon Sep 17 00:00:00 2001 From: MayNL Date: Mon, 29 Jun 2026 12:46:08 -0400 Subject: [PATCH] Don't set DISPLAYNAME if empty --- PckStudio.Core/Extensions/PckAssetExtensions.cs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/PckStudio.Core/Extensions/PckAssetExtensions.cs b/PckStudio.Core/Extensions/PckAssetExtensions.cs index 59f7bc09..52ec775e 100644 --- a/PckStudio.Core/Extensions/PckAssetExtensions.cs +++ b/PckStudio.Core/Extensions/PckAssetExtensions.cs @@ -108,13 +108,16 @@ namespace PckStudio.Core.Extensions // TODO: keep filepath asset.Filename = $"dlcskin{skinId}.png"; - asset.SetParameter("DISPLAYNAME", skin.MetaData.Name); - - if (localizationFile is not null) + if (!string.IsNullOrEmpty(skin.MetaData.Name)) { - string skinLocKey = $"IDS_dlcskin{skinId}_DISPLAYNAME"; - asset.SetParameter("DISPLAYNAMEID", skinLocKey); - localizationFile.SetLocEntry(skinLocKey, skin.MetaData.Name); + asset.SetParameter("DISPLAYNAME", 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))