PVZFusionTranslation/PvZ-Fusion-Blooms-master/MelonLoader/Patches/GameObjects/GardenPlant_Patch.cs
2025-04-19 11:44:12 -05:00

24 lines
No EOL
621 B
C#

using HarmonyLib;
using Il2Cpp;
using PvZ_Fusion_Translator.AssetStore;
namespace PvZ_Fusion_Translator.Patches.GameObjects
{
[HarmonyPatch(typeof(GardenPlant))]
public static class GardenPlant_Patch
{
[HarmonyPatch(nameof(GardenPlant.Update))]
[HarmonyPostfix]
private static void Update(GardenPlant __instance)
{
__instance.infoText = StringStore.TranslateText(__instance.infoText);
}
[HarmonyPatch(nameof(GardenPlant.UpdateInfo))]
[HarmonyPostfix]
private static void UpdateInfo(GardenPlant __instance)
{
__instance.infoText = StringStore.TranslateText(__instance.infoText);
}
}
}