Cherryzilla & zombie text patch
This commit is contained in:
parent
5ab3d60b84
commit
ea94331c83
5 changed files with 67 additions and 10 deletions
|
|
@ -29,7 +29,7 @@ namespace PvZ_Fusion_Translator.AssetStore
|
||||||
// UI - Playing
|
// UI - Playing
|
||||||
{ @"-------UI - Playing" , "UI - Playing-------" },
|
{ @"-------UI - Playing" , "UI - Playing-------" },
|
||||||
{ @"快捷键:(\d+)" , "<size=20>Hotkey: {0}" },
|
{ @"快捷键:(\d+)" , "<size=20>Hotkey: {0}" },
|
||||||
{ @"场上敌人数量:(\d+)" , "Zombies: {0}" },
|
{ @"场上敌人数量:(\d+)$" , "Zombies: {0}" },
|
||||||
{ @"难度:(\d+)" , "Difficulty: {0}" },
|
{ @"难度:(\d+)" , "Difficulty: {0}" },
|
||||||
|
|
||||||
// UI - Adventure Mode
|
// UI - Adventure Mode
|
||||||
|
|
@ -117,8 +117,8 @@ namespace PvZ_Fusion_Translator.AssetStore
|
||||||
{ @"-------Strings - Others" , "Strings - Others-------" },
|
{ @"-------Strings - Others" , "Strings - Others-------" },
|
||||||
// { @"HP:(\d+)/(\d+)\s+一类:(\d+)/(\d+)" , "HP: {0}/{1}\nArmor: {2}/{3}" },
|
// { @"HP:(\d+)/(\d+)\s+一类:(\d+)/(\d+)" , "HP: {0}/{1}\nArmor: {2}/{3}" },
|
||||||
// { @"HP:(\d+)/(\d+)\s+二类:(\d+)/(\d+)" , "HP: {0}/{1}\nArmor: {2}/{3}" },
|
// { @"HP:(\d+)/(\d+)\s+二类:(\d+)/(\d+)" , "HP: {0}/{1}\nArmor: {2}/{3}" },
|
||||||
{ @"^HP:(\d+)/(\d+)\s+([^\s+])类:(\d+)/(\d+)" , "HP: {0}/{1}\nArmor: {3}/{4}" },
|
// { @"^HP:(\d+)/(\d+)\s+([^\s+])类:(\d+)/(\d+)" , "HP: {0}/{1}\nArmor: {3}/{4}" },
|
||||||
{ @"^HP:(\d+)/(\d+)" , "HP: {0}/{1}" },
|
// { @"^HP:(\d+)/(\d+)" , "HP: {0}/{1}" },
|
||||||
// { @"平衡性调整(([^\s]+))" , "Balance Adjustment ({0})" },
|
// { @"平衡性调整(([^\s]+))" , "Balance Adjustment ({0})" },
|
||||||
{ @"旅行:守护 (\d+)轮已经完成" , "Odyssey: Last Stand | {0} Rounds Completed"},
|
{ @"旅行:守护 (\d+)轮已经完成" , "Odyssey: Last Stand | {0} Rounds Completed"},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
using HarmonyLib;
|
||||||
|
using Il2Cpp;
|
||||||
|
using PvZ_Fusion_Translator.AssetStore;
|
||||||
|
|
||||||
|
namespace PvZ_Fusion_Translator.Patches.GameObjects.MinorObjects
|
||||||
|
{
|
||||||
|
[HarmonyPatch(typeof(TrainingDummy), nameof(TrainingDummy.UpdateHealthText))]
|
||||||
|
public static class TrainingDummy_Patch
|
||||||
|
{
|
||||||
|
[HarmonyPostfix]
|
||||||
|
public static void UpdateHealthText(TrainingDummy __instance)
|
||||||
|
{
|
||||||
|
StringStore.TranslateText(__instance.healthText);
|
||||||
|
StringStore.TranslateText(__instance.healthTextShadow);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
using HarmonyLib;
|
||||||
|
using Il2Cpp;
|
||||||
|
using PvZ_Fusion_Translator.AssetStore;
|
||||||
|
|
||||||
|
namespace PvZ_Fusion_Translator.Patches.GameObjects.MinorObjects
|
||||||
|
{
|
||||||
|
[HarmonyPatch(typeof(UltimateChomper), nameof(UltimateChomper.UpdateText))]
|
||||||
|
public static class UltimateChomper_Patch
|
||||||
|
{
|
||||||
|
[HarmonyPostfix]
|
||||||
|
public static void UpdateText(UltimateChomper __instance)
|
||||||
|
{
|
||||||
|
StringStore.TranslateText(__instance.killingText);
|
||||||
|
StringStore.TranslateText(__instance.killingTextShadow);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,12 +1,33 @@
|
||||||
using System;
|
using HarmonyLib;
|
||||||
using System.Collections.Generic;
|
using Il2Cpp;
|
||||||
using System.Linq;
|
using PvZ_Fusion_Translator.AssetStore;
|
||||||
using System.Text;
|
using UnityEngine;
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace PvZ_Fusion_Translator.Patches.GameObjects.MinorObjects
|
namespace PvZ_Fusion_Translator.Patches.GameObjects.MinorObjects
|
||||||
{
|
{
|
||||||
class Zombie_Patch
|
[HarmonyPatch(typeof(Zombie))]
|
||||||
|
public static class Zombie_Patch
|
||||||
{
|
{
|
||||||
|
[HarmonyPatch(nameof(Zombie.Start))]
|
||||||
|
[HarmonyPostfix]
|
||||||
|
public static void Start(Zombie __instance)
|
||||||
|
{
|
||||||
|
StringStore.TranslateText(__instance.healthText);
|
||||||
|
StringStore.TranslateText(__instance.healthTextShadow);
|
||||||
|
if (__instance.healthText.transform.rotation != Quaternion.Euler(0, 0, 0))
|
||||||
|
__instance.healthText.transform.rotation = Quaternion.Euler(0f, 0f, 0f);
|
||||||
|
}
|
||||||
|
|
||||||
|
[HarmonyPatch(nameof(Zombie.Update))]
|
||||||
|
[HarmonyPrefix]
|
||||||
|
public static void Update(Zombie __instance)
|
||||||
|
{
|
||||||
|
if (__instance.theZombieType == ZombieType.TrainingDummy || !Board.Instance.showZombieHealth)
|
||||||
|
return;
|
||||||
|
StringStore.TranslateText(__instance.healthText);
|
||||||
|
StringStore.TranslateText(__instance.healthTextShadow);
|
||||||
|
if (__instance.healthText.transform.rotation != Quaternion.Euler(0f, 0f, 0f))
|
||||||
|
__instance.healthText.transform.rotation = Quaternion.Euler(0f, 0f, 0f);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -406,6 +406,8 @@
|
||||||
<Compile Include="Patches\GameObjects\AbyssSettlementMenu_Patch.cs" />
|
<Compile Include="Patches\GameObjects\AbyssSettlementMenu_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\ButtonObjects\NormalBtn_Patch.cs" />
|
<Compile Include="Patches\GameObjects\ButtonObjects\NormalBtn_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\ButtonObjects\UIButton_Patch.cs" />
|
<Compile Include="Patches\GameObjects\ButtonObjects\UIButton_Patch.cs" />
|
||||||
|
<Compile Include="Patches\GameObjects\MinorObjects\TrainingDummy_Patch.cs" />
|
||||||
|
<Compile Include="Patches\GameObjects\MinorObjects\UltimateChomper_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\OtherMenu_Patch.cs" />
|
<Compile Include="Patches\GameObjects\OtherMenu_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\ButtonObjects\AbyssCheckSellMenu_Patch.cs" />
|
<Compile Include="Patches\GameObjects\ButtonObjects\AbyssCheckSellMenu_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\ButtonObjects\AbyssBuffButton_Patch.cs" />
|
<Compile Include="Patches\GameObjects\ButtonObjects\AbyssBuffButton_Patch.cs" />
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue