Merge branch 'cassidy'
This commit is contained in:
commit
bda9e61a68
2 changed files with 14 additions and 7 deletions
|
|
@ -17,10 +17,13 @@ namespace PvZ_Fusion_Translator.Patches.BaseTextObjects
|
|||
{
|
||||
if (!string.IsNullOrEmpty(__instance.text))
|
||||
{
|
||||
if(__instance.transform.parent.parent.name.Contains("AbyssBagMenu"))
|
||||
if(__instance.transform.parent.parent != null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (__instance.transform.parent.parent.name.Contains("AbyssBagMenu"))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
__instance = StringStore.TranslateText(__instance);
|
||||
__instance.autoSizeTextContainer = false;
|
||||
|
|
@ -50,9 +53,12 @@ namespace PvZ_Fusion_Translator.Patches.BaseTextObjects
|
|||
{
|
||||
if (!string.IsNullOrEmpty(__instance.text))
|
||||
{
|
||||
if (__instance.transform.parent.parent.name.Contains("AbyssBagMenu"))
|
||||
if (__instance.transform.parent.parent != null)
|
||||
{
|
||||
return;
|
||||
if (__instance.transform.parent.parent.name.Contains("AbyssBagMenu"))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
__instance = StringStore.TranslateText(__instance);
|
||||
|
|
|
|||
|
|
@ -19,12 +19,13 @@ namespace PvZ_Fusion_Translator.Patches.GameObjects
|
|||
{
|
||||
TMP_FontAsset fontAsset = FontStore.LoadTMPFont(Utils.Language.ToString());
|
||||
|
||||
PlantType thePlantType = __instance.plant.thePlantType;
|
||||
BigGardenPlant thePlant = __instance.plant;
|
||||
|
||||
foreach (TextMeshProUGUI txt in __instance.GetComponentsInChildren<TextMeshProUGUI>())
|
||||
{
|
||||
if(txt.name.Contains("Introduce"))
|
||||
if (txt.name.Contains("Introduce") && thePlant != null)
|
||||
{
|
||||
PlantType thePlantType = thePlant.thePlantType;
|
||||
txt.text = StringStore.TranslateText(txt.text);
|
||||
|
||||
string text = txt.text;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue