PVZFusionTranslation/BepInEx/Patches/GameObjects/MinorObjects/Plant_Patch.cs
SillyStar-Github 0e393ce375 return bepinex
2025-04-20 09:30:36 -04:00

21 lines
545 B
C#

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);
}
}
}
}