Merge branch 'main' into cassidy
This commit is contained in:
commit
c188f75c9d
2 changed files with 32 additions and 0 deletions
31
MelonLoader/Patches/GameObjects/MinorObjects/Jigsaw_Patch.cs
Normal file
31
MelonLoader/Patches/GameObjects/MinorObjects/Jigsaw_Patch.cs
Normal 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -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" />
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue