PVZFusionTranslation/BepInEx/Patches/GameObjects/MinorObjects/Plant_Patch.cs
SillyStar-Github 3262b76a78 BEPINEX PORT
2025-04-29 19:19:20 -04:00

24 lines
No EOL
560 B
C#

#if FIX
using HarmonyLib;
using PvZ_Fusion_Translator__BepInEx_.AssetStore;
using UnityEngine;
namespace PvZ_Fusion_Translator__BepInEx_.Patches.GameObjects.MinorObjects
{
[HarmonyPatch(typeof(Plant))]
public static class Plant_Patch
{
[HarmonyPostfix]
[HarmonyPatch(nameof(Plant.UpdateHealthText))]
private static void UpdateHealthText(Plant __instance)
{
Transform healthTransform = __instance.transform.Find("health");
if (healthTransform != null)
{
StringStore.TranslateTextTransform(__instance.transform);
}
}
}
}
#endif