Merge branch 'main' into cassidy

This commit is contained in:
SillyStar-Github 2025-07-24 11:59:34 -04:00
commit c188f75c9d
2 changed files with 32 additions and 0 deletions

View file

@ -0,0 +1,31 @@
using HarmonyLib;
using Il2Cpp;
using Il2CppTMPro;
using PvZ_Fusion_Translator.AssetStore;
namespace PvZ_Fusion_Translator.Patches.GameObjects
{
[HarmonyPatch(typeof(JigsawClip))]
public static class JigsawClip_Patch
{
[HarmonyPostfix]
[HarmonyPatch(nameof(JigsawClip.Awake))]
private static void Postfix_Awake(JigsawClip __instance)
{
if (!__instance || !__instance.description) return;
StringStore.TranslateTextUI(__instance.description);
}
[HarmonyPostfix]
[HarmonyPatch(nameof(JigsawClip.Update))]
private static void Postfix_Update(JigsawClip __instance)
{
if (!__instance || !__instance.description) return;
if (__instance.description.text != StringStore.TranslateText(__instance.description.text))
{
StringStore.TranslateTextUI(__instance.description);
}
}
}
}

View file

@ -400,6 +400,7 @@
<Compile Include="Log.cs" /> <Compile Include="Log.cs" />
<Compile Include="ModFeatures.cs" /> <Compile Include="ModFeatures.cs" />
<Compile Include="AssetStore\AudioStore.cs" /> <Compile Include="AssetStore\AudioStore.cs" />
<Compile Include="Patches\GameObjects\MinorObjects\Jigsaw_Patch.cs" />
<Compile Include="Patches\GameObjects\ShootingSelectWindow_Patch.cs" /> <Compile Include="Patches\GameObjects\ShootingSelectWindow_Patch.cs" />
<Compile Include="Patches\GameObjects\FruitNinjaSelectWindow_Patch.cs" /> <Compile Include="Patches\GameObjects\FruitNinjaSelectWindow_Patch.cs" />
<Compile Include="Patches\GameObjects\RogueCardWindow_Patch.cs" /> <Compile Include="Patches\GameObjects\RogueCardWindow_Patch.cs" />