Commit 74b04375 authored by ElderLich's avatar ElderLich

Bug Fix: Fix Spell/Trap type language mismatch on cards

Ensure Spell/Trap type text follows Card Language (not UI language) by resetting InterString render dictionaries on language reload and using GetSpellTrapType(true) in card info widgets.
parent bdda910d
......@@ -255,7 +255,7 @@ namespace MDPro3
manager.GetElement("PropertyMonster").SetActive(false);
manager.GetElement("PropertySpell").SetActive(true);
manager.GetElement<Image>("SpellType").sprite = TextureManager.GetSpellTrapTypeIcon(data);
manager.GetElement<Text>("TextSpellType").text = data.GetSpellTrapType();
manager.GetElement<Text>("TextSpellType").text = data.GetSpellTrapType(true);
}
RefreshLimitIcon(data.Id);
}
......
......@@ -25,8 +25,8 @@ namespace MDPro3
public static void Initialize()
{
translations.Clear();
translationsForRender.Clear();
translationsForPrerelease.Clear();
translationsForRender = new Dictionary<string, string>();
translationsForPrerelease = new Dictionary<string, string>();
path = Program.PATH_LOCALES + Language.GetConfig() + PATH_CONF_FILE;
if (!File.Exists(path))
......
......@@ -419,7 +419,7 @@ namespace MDPro3.UI
SpellTrapType.SetActive(true);
IconSpellTrapType.sprite = TextureManager.container.GetCardSpellTrapTypeIcon(data);
TextSpellTrapType.text
= StringHelper.SecondType(data.Type) + StringHelper.MainType(data.Type);
= data.GetSpellTrapType(true);
IconAtk.gameObject.SetActive(false);
IconDef.gameObject.SetActive(false);
......
......@@ -410,7 +410,7 @@ namespace MDPro3.UI
ParamatorAreaBottom.SetActive(false);
SpellTrapType.SetActive(true);
IconSpellTrapType.sprite = TextureManager.container.GetCardSpellTrapTypeIcon(data);
TextSpellTrapType.text = data.GetSpellTrapType();
TextSpellTrapType.text = data.GetSpellTrapType(true);
PoolGroup.SetParent(ParamatorAreaTop.transform, false);
}
......
......@@ -428,7 +428,7 @@ namespace MDPro3.UI
{
SpellTrapType.SetActive(true);
IconSpellTrapType.sprite = TextureManager.container.GetCardSpellTrapTypeIcon(data);
TextSpellTrapType.text = data.GetSpellTrapType();
TextSpellTrapType.text = data.GetSpellTrapType(true);
IconAtk.gameObject.SetActive(false);
IconDef.gameObject.SetActive(false);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment