PVZFusionTranslation/MelonLoader/Patches/GameObjects/GardenCard_Patch.cs
SillyStar-Github f2f5a87813 3.0 part 1
2025-09-27 20:11:02 -04:00

24 lines
691 B
C#

using HarmonyLib;
using Il2Cpp;
using PvZ_Fusion_Translator.AssetStore;
namespace PvZ_Fusion_Translator.Patches.GameObjects
{
[HarmonyPatch(typeof(GardenCard))]
public static class GardenCard_Patch
{
[HarmonyPatch(nameof(GardenCard.Start))]
[HarmonyPostfix]
private static void Start(GardenCard __instance)
{
__instance.text.text = StringStore.TranslateText(__instance.text.text).Replace("26", "16");
}
[HarmonyPatch(nameof(GardenCard.ChangeCardSprite))]
[HarmonyPostfix]
private static void ChangeCardSprite(GardenCard __instance)
{
__instance.text.text = StringStore.TranslateText(__instance.text.text).Replace("26", "16");
}
}
}