Merge branch 'cassidy'
This commit is contained in:
commit
cb499a155a
64 changed files with 1286 additions and 545 deletions
121
.gitignore
vendored
121
.gitignore
vendored
|
|
@ -11,127 +11,10 @@
|
||||||
/BepInEx/obj
|
/BepInEx/obj
|
||||||
/BepInEx/bin/ReleaseMulti/net6.0
|
/BepInEx/bin/ReleaseMulti/net6.0
|
||||||
/AlmanacPlantBank_Patch.cs
|
/AlmanacPlantBank_Patch.cs
|
||||||
MelonLoader/bin/x64/Debug/net6.0/0Harmony.dll
|
/MelonLoader/bin/x64/Debug
|
||||||
MelonLoader/bin/x64/Debug/net6.0/AsmResolver.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/AsmResolver.DotNet.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/AsmResolver.PE.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/AsmResolver.PE.File.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/Assembly-CSharp.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/AssetRipper.Primitives.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/AssetsTools.NET.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/AudioImportLib.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/bHapticsLib.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/Il2Cpp__Generated.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/Il2CppInterop.Common.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/Il2CppInterop.Generator.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/Il2CppInterop.HarmonySupport.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/Il2CppInterop.Runtime.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/Il2CppMono.Security.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/Il2Cppmscorlib.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/Il2CppSystem.Configuration.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/Il2CppSystem.Core.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/Il2CppSystem.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/Il2CppSystem.Xml.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/MelonLoader.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/MelonLoader.pdb
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/MelonLoader.xml
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/Microsoft.Diagnostics.NETCore.Client.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/Microsoft.Diagnostics.Runtime.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/Microsoft.Extensions.Logging.Abstractions.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/Mono.Cecil.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/Mono.Cecil.Mdb.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/Mono.Cecil.Pdb.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/Mono.Cecil.Rocks.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/MonoMod.Backports.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/MonoMod.ILHelpers.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/MonoMod.RuntimeDetour.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/MonoMod.Utils.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/PvZ_Fusion_Translator.deps.json
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/PvZ_Fusion_Translator.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/PvZ_Fusion_Translator.pdb
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/Tomlet.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/Unity.2D.Animation.Runtime.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/Unity.2D.Common.Runtime.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/Unity.2D.SpriteShape.Runtime.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/Unity.Burst.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/Unity.Burst.Unsafe.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/Unity.Collections.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/Unity.Collections.LowLevel.ILSupport.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/Unity.InternalAPIEngineBridge.001.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/Unity.Mathematics.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/Unity.RenderPipeline.Universal.ShaderLibrary.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/Unity.RenderPipelines.Core.Runtime.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/Unity.RenderPipelines.Universal.Runtime.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/Unity.TextMeshPro.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/Unity.VisualScripting.Core.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/UnityEngine.AccessibilityModule.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/UnityEngine.AIModule.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/UnityEngine.AndroidJNIModule.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/UnityEngine.AnimationModule.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/UnityEngine.ARModule.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/UnityEngine.AssetBundleModule.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/UnityEngine.AudioModule.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/UnityEngine.ClothModule.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/UnityEngine.ContentLoadModule.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/UnityEngine.CoreModule.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/UnityEngine.CrashReportingModule.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/UnityEngine.DirectorModule.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/UnityEngine.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/UnityEngine.DSPGraphModule.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/UnityEngine.GameCenterModule.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/UnityEngine.GIModule.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/UnityEngine.GridModule.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/UnityEngine.HotReloadModule.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/UnityEngine.ImageConversionModule.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/UnityEngine.IMGUIModule.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/UnityEngine.InputLegacyModule.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/UnityEngine.InputModule.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/UnityEngine.JSONSerializeModule.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/UnityEngine.LocalizationModule.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/UnityEngine.ParticleSystemModule.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/UnityEngine.PerformanceReportingModule.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/UnityEngine.Physics2DModule.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/UnityEngine.PhysicsModule.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/UnityEngine.ProfilerModule.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/UnityEngine.PropertiesModule.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/UnityEngine.RuntimeInitializeOnLoadManagerInitializerModule.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/UnityEngine.ScreenCaptureModule.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/UnityEngine.SharedInternalsModule.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/UnityEngine.SpriteMaskModule.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/UnityEngine.SpriteShapeModule.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/UnityEngine.StreamingModule.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/UnityEngine.SubstanceModule.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/UnityEngine.SubsystemsModule.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/UnityEngine.TerrainModule.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/UnityEngine.TerrainPhysicsModule.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/UnityEngine.TextCoreFontEngineModule.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/UnityEngine.TextCoreTextEngineModule.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/UnityEngine.TextRenderingModule.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/UnityEngine.TilemapModule.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/UnityEngine.TLSModule.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/UnityEngine.UI.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/UnityEngine.UIElementsModule.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/UnityEngine.UIModule.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/UnityEngine.UmbraModule.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/UnityEngine.UnityAnalyticsCommonModule.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/UnityEngine.UnityAnalyticsModule.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/UnityEngine.UnityConnectModule.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/UnityEngine.UnityCurlModule.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/UnityEngine.UnityTestProtocolModule.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/UnityEngine.UnityWebRequestAssetBundleModule.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/UnityEngine.UnityWebRequestAudioModule.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/UnityEngine.UnityWebRequestModule.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/UnityEngine.UnityWebRequestTextureModule.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/UnityEngine.UnityWebRequestWWWModule.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/UnityEngine.VehiclesModule.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/UnityEngine.VFXModule.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/UnityEngine.VideoModule.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/UnityEngine.VRModule.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/UnityEngine.WindModule.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/UnityEngine.XRModule.dll
|
|
||||||
MelonLoader/bin/x64/Debug/net6.0/WebSocketDotNet.dll
|
|
||||||
/BepInEx/bin/Debug/net6.0
|
/BepInEx/bin/Debug/net6.0
|
||||||
.HOWTO-sync-MelonLoader-from-origin-main.txt
|
.HOWTO-sync-MelonLoader-from-origin-main.txt
|
||||||
/MelonLoader/bin/ReleaseMulti/net6.0
|
/MelonLoader/bin/ReleaseMulti/net6.0
|
||||||
BepInEx/Patches/GameObjects/changes.txt
|
BepInEx/Patches/GameObjects/changes.txt
|
||||||
/Assembly-CSharp
|
/Assembly-CSharp
|
||||||
|
/MelonLoader/bin/Debug/net6.0
|
||||||
|
|
|
||||||
|
|
@ -211,12 +211,73 @@ namespace PvZ_Fusion_Translator.AssetStore
|
||||||
|
|
||||||
if (isLog)
|
if (isLog)
|
||||||
Log.LogDebug($"Text '{originalText}' not translated");
|
Log.LogDebug($"Text '{originalText}' not translated");
|
||||||
|
if(Utils.CheckForUntranslatedText(originalText))
|
||||||
|
{
|
||||||
|
FileLoader.DumpUntranslatedStrings(originalText);
|
||||||
|
}
|
||||||
return originalText;
|
return originalText;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static bool TestRegex(string originalText, string pattern)
|
public static string TranslateColorText(string originalText, bool isLog = false)
|
||||||
{
|
{
|
||||||
return Regex.IsMatch(originalText, pattern);
|
string text = TranslateColorSegments(originalText);
|
||||||
|
string checkText;
|
||||||
|
#if DEBUG
|
||||||
|
Regex regex = new("\\p{IsCJKUnifiedIdeographs}+");
|
||||||
|
Match match = regex.Match(text);
|
||||||
|
|
||||||
|
if (match.Success)
|
||||||
|
{
|
||||||
|
// Log.LogDebug("Untranslated String: " + match.Value);
|
||||||
|
FileLoader.DumpUntranslatedStrings(text);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
checkText = text;
|
||||||
|
|
||||||
|
return checkText;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string TranslateColorSegments(string input)
|
||||||
|
{
|
||||||
|
string result = "";
|
||||||
|
string pattern = @"<color=[^>]+>[\s\S]*?(?:<\/color>|$)|(?:<(?!color=)|[^<])+";
|
||||||
|
string smallPattern = @"(<color=[^>]+>)(.*?)(</color>)";
|
||||||
|
MatchCollection matches = Regex.Matches(input, pattern);
|
||||||
|
|
||||||
|
for (int i = 0; i < matches.Count; i++)
|
||||||
|
{
|
||||||
|
Match match = matches[i];
|
||||||
|
if (Regex.Match(match.Value, smallPattern, RegexOptions.Singleline).Success)
|
||||||
|
{
|
||||||
|
result += TranslateColorSegment(match.Value);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
result += DoTranslateText(match.Value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string TranslateColorSegment(string input)
|
||||||
|
{
|
||||||
|
string result = input;
|
||||||
|
string pattern = @"(<color=[^>]+>)(.*?)(</color>)";
|
||||||
|
Match match = Regex.Match(input, pattern, RegexOptions.Singleline);
|
||||||
|
string translatedText = DoTranslateText(match.Groups[2].Value);
|
||||||
|
if(Utils.CheckForUntranslatedText(translatedText))
|
||||||
|
{
|
||||||
|
FileLoader.DumpUntranslatedStrings(translatedText);
|
||||||
|
}
|
||||||
|
result = match.Groups[1].Value + translatedText + match.Groups[3].Value;
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
public static bool TestRegex(string originalText, string pattern, bool singleLine = false)
|
||||||
|
{
|
||||||
|
RegexOptions options = (singleLine) ? RegexOptions.None : RegexOptions.Singleline;
|
||||||
|
return Regex.IsMatch(originalText, pattern, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static TextAlignmentOptions TextAnchorToTMPAlignment(TextAnchor anchor)
|
private static TextAlignmentOptions TextAnchorToTMPAlignment(TextAnchor anchor)
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,14 @@
|
||||||
using Il2CppTMPro;
|
using Il2Cpp;
|
||||||
|
using Il2CppTMPro;
|
||||||
using MelonLoader;
|
using MelonLoader;
|
||||||
using MelonLoader.Utils;
|
using MelonLoader.Utils;
|
||||||
using PvZ_Fusion_Translator.AssetStore;
|
using PvZ_Fusion_Translator.AssetStore;
|
||||||
using PvZ_Fusion_Translator.Patches.Managers;
|
using PvZ_Fusion_Translator.Patches.Managers;
|
||||||
|
using PvZ_Fusion_Translator.Patches.Modes.Odyssey;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Text.Json;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using Il2Cpp;
|
using static PvZ_Fusion_Translator.FileLoader;
|
||||||
|
|
||||||
[assembly: MelonInfo(typeof(PvZ_Fusion_Translator.Core), "PvZ Fusion Translator", "231.0.0", "dynaslash / arifrios1st / lancerx0 / JustNull / Dakosha / Mamoru-kun / cassidy / Teyliu", null)]
|
[assembly: MelonInfo(typeof(PvZ_Fusion_Translator.Core), "PvZ Fusion Translator", "231.0.0", "dynaslash / arifrios1st / lancerx0 / JustNull / Dakosha / Mamoru-kun / cassidy / Teyliu", null)]
|
||||||
[assembly: MelonGame("LanPiaoPiao", "PlantsVsZombiesRH")]
|
[assembly: MelonGame("LanPiaoPiao", "PlantsVsZombiesRH")]
|
||||||
|
|
@ -42,6 +46,7 @@ namespace PvZ_Fusion_Translator
|
||||||
{
|
{
|
||||||
dtStart = DateTime.Now;
|
dtStart = DateTime.Now;
|
||||||
replaceTextureRoutine = MelonCoroutines.Start(TextureStore.ReplaceTexturesCoroutine());
|
replaceTextureRoutine = MelonCoroutines.Start(TextureStore.ReplaceTexturesCoroutine());
|
||||||
|
TravelMgr_Patch.DumpTravelBuffs();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnDeinitializeMelon()
|
public override void OnDeinitializeMelon()
|
||||||
|
|
|
||||||
|
|
@ -2,11 +2,11 @@
|
||||||
using MelonLoader;
|
using MelonLoader;
|
||||||
using PvZ_Fusion_Translator.AssetStore;
|
using PvZ_Fusion_Translator.AssetStore;
|
||||||
using PvZ_Fusion_Translator.Patches.GameObjects.MinorObjects;
|
using PvZ_Fusion_Translator.Patches.GameObjects.MinorObjects;
|
||||||
|
using PvZ_Fusion_Translator.Patches.Modes.Odyssey;
|
||||||
using PvZ_Fusion_Translator.Patches.OtherManagers;
|
using PvZ_Fusion_Translator.Patches.OtherManagers;
|
||||||
using System.Text.Encodings.Web;
|
using System.Text.Encodings.Web;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.Rendering;
|
|
||||||
|
|
||||||
namespace PvZ_Fusion_Translator
|
namespace PvZ_Fusion_Translator
|
||||||
{
|
{
|
||||||
|
|
@ -81,6 +81,10 @@ namespace PvZ_Fusion_Translator
|
||||||
}
|
}
|
||||||
Zombie_Patch.LoadHPStrings();
|
Zombie_Patch.LoadHPStrings();
|
||||||
}
|
}
|
||||||
|
else if(fileName.EndsWith("travel_buffs"))
|
||||||
|
{
|
||||||
|
TravelMgr_Patch.translatedTravelBuffs = JsonSerializer.Deserialize<Dictionary<string, SortedDictionary<int, string>>>(jsonString);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
SaveStrings();
|
SaveStrings();
|
||||||
DumpJson();
|
DumpJson();
|
||||||
|
|
@ -318,6 +322,68 @@ namespace PvZ_Fusion_Translator
|
||||||
File.WriteAllText(Path.Combine(dumpDir, "ZombieStrings.json"), ZombieStrings);
|
File.WriteAllText(Path.Combine(dumpDir, "ZombieStrings.json"), ZombieStrings);
|
||||||
File.WriteAllText(Path.Combine(dumpDir, "AbyssBuffData.json"), AbyssBuffData);
|
File.WriteAllText(Path.Combine(dumpDir, "AbyssBuffData.json"), AbyssBuffData);
|
||||||
|
|
||||||
|
// dump iz tips
|
||||||
|
var izLevelData = Resources.LoadAll<TextAsset>("izleveldata");
|
||||||
|
Dictionary<string, string> izLevelDataDump = new Dictionary<string, string>();
|
||||||
|
|
||||||
|
string izTranslatedPath = Path.Combine(GetAssetDir(AssetType.Strings, Utils.Language), "tips_iz.json");
|
||||||
|
if (!File.Exists(izTranslatedPath))
|
||||||
|
{
|
||||||
|
File.WriteAllText(izTranslatedPath, JsonSerializer.Serialize(izLevelDataDump));
|
||||||
|
}
|
||||||
|
var izTranslatedTips = JsonSerializer.Deserialize<Dictionary<string, string>>(File.ReadAllText(izTranslatedPath));
|
||||||
|
|
||||||
|
foreach (var level in izLevelData)
|
||||||
|
{
|
||||||
|
string data = level.text;
|
||||||
|
LevelData levelData = JsonUtility.FromJson<LevelData>(data);
|
||||||
|
if(levelData.tips != null)
|
||||||
|
{
|
||||||
|
izLevelDataDump.Add(level.name, levelData.tips);
|
||||||
|
if(izTranslatedTips.ContainsKey(level.name) && !StringStore.translationString.ContainsKey(levelData.tips))
|
||||||
|
{
|
||||||
|
StringStore.translationString.Add(levelData.tips, izTranslatedTips[level.name]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
File.WriteAllText(Path.Combine(dumpDir, "tips_iz.json"), JsonSerializer.Serialize(izLevelDataDump, new JsonSerializerOptions
|
||||||
|
{
|
||||||
|
WriteIndented = true,
|
||||||
|
Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping
|
||||||
|
}));
|
||||||
|
|
||||||
|
// dump fusion showcase tips
|
||||||
|
var fusionShowcaseData = Resources.LoadAll<TextAsset>("leveldata/explore");
|
||||||
|
Dictionary<string, string> fusionShowcaseDataDump = new Dictionary<string, string>();
|
||||||
|
|
||||||
|
string fsTranslatedPath = Path.Combine(GetAssetDir(AssetType.Strings, Utils.Language), "tips_fs.json");
|
||||||
|
if(!File.Exists(fsTranslatedPath))
|
||||||
|
{
|
||||||
|
File.WriteAllText(fsTranslatedPath, JsonSerializer.Serialize(fusionShowcaseDataDump));
|
||||||
|
}
|
||||||
|
var fsTranslatedTips = JsonSerializer.Deserialize<Dictionary<string, string>>(File.ReadAllText(fsTranslatedPath));
|
||||||
|
|
||||||
|
foreach (var level in fusionShowcaseData)
|
||||||
|
{
|
||||||
|
string data = level.text;
|
||||||
|
LevelData levelData = JsonUtility.FromJson<LevelData>(data);
|
||||||
|
if (levelData.tips != null)
|
||||||
|
{
|
||||||
|
fusionShowcaseDataDump.Add(level.name, levelData.tips);
|
||||||
|
if (fsTranslatedTips.ContainsKey(level.name) && !StringStore.translationString.ContainsKey(levelData.tips))
|
||||||
|
{
|
||||||
|
StringStore.translationString.Add(levelData.tips, fsTranslatedTips[level.name]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
File.WriteAllText(Path.Combine(dumpDir, "tips_fs.json"), JsonSerializer.Serialize(fusionShowcaseDataDump, new JsonSerializerOptions
|
||||||
|
{
|
||||||
|
WriteIndented = true,
|
||||||
|
Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping
|
||||||
|
}));
|
||||||
|
|
||||||
Dictionary<Achievement, AchievementObject> achievementsList = new Dictionary<Achievement, AchievementObject>();
|
Dictionary<Achievement, AchievementObject> achievementsList = new Dictionary<Achievement, AchievementObject>();
|
||||||
foreach (Il2CppSystem.Collections.Generic.KeyValuePair<Achievement, Il2CppSystem.Tuple<string, string>> entry in AchievementClip.achievementsText)
|
foreach (Il2CppSystem.Collections.Generic.KeyValuePair<Achievement, Il2CppSystem.Tuple<string, string>> entry in AchievementClip.achievementsText)
|
||||||
{
|
{
|
||||||
|
|
@ -362,6 +428,7 @@ namespace PvZ_Fusion_Translator
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if MULTI_LANGUAGE
|
#if MULTI_LANGUAGE
|
||||||
internal static void LoadLanguage()
|
internal static void LoadLanguage()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -2,42 +2,80 @@
|
||||||
using Il2Cpp;
|
using Il2Cpp;
|
||||||
using Il2CppTMPro;
|
using Il2CppTMPro;
|
||||||
using PvZ_Fusion_Translator.AssetStore;
|
using PvZ_Fusion_Translator.AssetStore;
|
||||||
using PvZ_Fusion_Translator.Patches.Managers;
|
using PvZ_Fusion_Translator.Patches.Modes.Odyssey;
|
||||||
|
|
||||||
|
//using PvZ_Fusion_Translator.Patches.Modes.Odyssey;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
using System.Xml.Linq;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
namespace PvZ_Fusion_Translator.Patches.BaseTextObjects
|
namespace PvZ_Fusion_Translator.Patches.BaseTextObjects
|
||||||
{
|
{
|
||||||
[HarmonyPatch(typeof(InGameText))]
|
[HarmonyPatch(typeof(InGameText))]
|
||||||
public static class InGameText_Patch
|
public static class InGameText_Patch
|
||||||
{
|
{
|
||||||
[HarmonyPatch(nameof(InGameText.ShowText), new Type[] { typeof(string), typeof(float), typeof(bool) })]
|
[HarmonyPatch(nameof(InGameText.ShowText))]
|
||||||
[HarmonyPrefix]
|
|
||||||
private static void ShowText(InGameText __instance, ref string text) => text = StringStore.TranslateText(text, true);
|
|
||||||
|
|
||||||
[HarmonyPatch(nameof(InGameText.ShowText), new Type[] { typeof(string), typeof(float), typeof(bool) })]
|
|
||||||
[HarmonyPostfix]
|
[HarmonyPostfix]
|
||||||
private static void ShowText(InGameText __instance)
|
public static void ShowText(InGameText __instance)
|
||||||
{
|
{
|
||||||
|
|
||||||
#if MULTI_LANGUAGE
|
|
||||||
TMP_FontAsset fontAsset = FontStore.LoadTMPFont(Utils.Language.ToString());
|
TMP_FontAsset fontAsset = FontStore.LoadTMPFont(Utils.Language.ToString());
|
||||||
#else
|
|
||||||
TMP_FontAsset fontAsset = FontStore.LoadTMPFont();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
foreach (TextMeshProUGUI txt in __instance.textMeshes)
|
foreach (TextMeshProUGUI txt in __instance.GetComponentsInChildren<TextMeshProUGUI>())
|
||||||
{
|
{
|
||||||
string travelMatch = TravelMgr_Patch.MatchTravelBuff(txt.text);
|
string originalText = txt.text;
|
||||||
|
string travelMatch = TravelMgr_Patch.MatchTravelBuff(originalText);
|
||||||
|
|
||||||
if(travelMatch != "")
|
if (txt.gameObject.name.Contains("shadow"))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (travelMatch != "")
|
||||||
{
|
{
|
||||||
txt.text = travelMatch;
|
txt.text = travelMatch;
|
||||||
|
if (txt.gameObject.name.Contains("main"))
|
||||||
|
{
|
||||||
|
originalText = txt.text;
|
||||||
|
Transform shadowText = txt.transform.parent.Find("Text_shadow");
|
||||||
|
if (shadowText != null)
|
||||||
|
{
|
||||||
|
shadowText.GetComponent<TextMeshProUGUI>().text = Utils.RemoveColorTags(originalText);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if((Regex.Match(txt.text, @"(<color[^>]*>.*?</color>)", RegexOptions.Singleline).Success) && !StringStore.translationString.ContainsKey(txt.text))
|
||||||
|
{
|
||||||
|
txt.text = StringStore.TranslateColorText(txt.text, true);
|
||||||
|
if (txt.gameObject.name.Contains("main"))
|
||||||
|
{
|
||||||
|
originalText = txt.text;
|
||||||
|
Transform shadowText = txt.transform.parent.Find("Text_shadow");
|
||||||
|
if (shadowText != null)
|
||||||
|
{
|
||||||
|
shadowText.GetComponent<TextMeshProUGUI>().text = Utils.RemoveColorTags(originalText);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
txt.text = StringStore.TranslateText(txt.text, true);
|
txt.text = StringStore.TranslateText(txt.text, true);
|
||||||
|
if (txt.gameObject.name.Contains("main"))
|
||||||
|
{
|
||||||
|
originalText = txt.text;
|
||||||
|
Transform shadowText = txt.transform.parent.Find("Text_shadow");
|
||||||
|
if (shadowText != null)
|
||||||
|
{
|
||||||
|
shadowText.GetComponent<TextMeshProUGUI>().text = Utils.RemoveColorTags(originalText);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
txt.font = fontAsset;
|
txt.font = fontAsset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(__instance.TryGetComponent<TextMeshProUGUI>(out TextMeshProUGUI text))
|
||||||
|
{
|
||||||
|
text.text = StringStore.TranslateText(text.text);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -52,6 +52,7 @@ namespace PvZ_Fusion_Translator.Patches.GameObjects
|
||||||
char[] toTrim = Environment.NewLine.ToCharArray();
|
char[] toTrim = Environment.NewLine.ToCharArray();
|
||||||
__instance.showedPlantIntroduce.text = Utils.RemoveSizeTags(plantInfo.info) + "\n\n" + Utils.RemoveSizeTags(plantInfo.introduce) + "\n\n" + Utils.RemoveSizeTags(plantInfo.cost).TrimStart(toTrim) + "\n\n";
|
__instance.showedPlantIntroduce.text = Utils.RemoveSizeTags(plantInfo.info) + "\n\n" + Utils.RemoveSizeTags(plantInfo.introduce) + "\n\n" + Utils.RemoveSizeTags(plantInfo.cost).TrimStart(toTrim) + "\n\n";
|
||||||
__instance.showedPlantIntroduce.font = fontAsset;
|
__instance.showedPlantIntroduce.font = fontAsset;
|
||||||
|
__instance.showedPlantIntroduce.fontSizeMax = 21;
|
||||||
__instance.showedPlantIntroduce.margin = new Vector4(6, 2, 12, 0);
|
__instance.showedPlantIntroduce.margin = new Vector4(6, 2, 12, 0);
|
||||||
|
|
||||||
__instance.showedPlantIntroduce.enableWordWrapping = true;
|
__instance.showedPlantIntroduce.enableWordWrapping = true;
|
||||||
|
|
|
||||||
|
|
@ -35,9 +35,10 @@ namespace PvZ_Fusion_Translator.Patches.GameObjects
|
||||||
|
|
||||||
TMP_FontAsset fontAsset = (hasAlmanacFont) ? FontStore.LoadTMPFontAlmanac(Utils.Language.ToString()) : FontStore.LoadTMPFont(Utils.Language.ToString());
|
TMP_FontAsset fontAsset = (hasAlmanacFont) ? FontStore.LoadTMPFontAlmanac(Utils.Language.ToString()) : FontStore.LoadTMPFont(Utils.Language.ToString());
|
||||||
|
|
||||||
ZombieAlmanacData zombieData = JsonUtility.FromJson<ZombieAlmanacData>(json);
|
ZombieAlmanacData zombieAlmanacData = JsonUtility.FromJson<ZombieAlmanacData>(json);
|
||||||
|
var zombieDataDic = ZombieDataManager.zombieDataDic;
|
||||||
|
|
||||||
foreach (ZombieInfo zombieInfo in zombieData.zombies)
|
foreach (ZombieInfo zombieInfo in zombieAlmanacData.zombies)
|
||||||
{
|
{
|
||||||
if (zombieInfo.theZombieType == __instance.currentZombieType)
|
if (zombieInfo.theZombieType == __instance.currentZombieType)
|
||||||
{
|
{
|
||||||
|
|
@ -49,8 +50,18 @@ namespace PvZ_Fusion_Translator.Patches.GameObjects
|
||||||
text.fontSizeMax = 21;
|
text.fontSizeMax = 21;
|
||||||
}
|
}
|
||||||
|
|
||||||
__instance.showedZombieIntroduce.text = Utils.RemoveSizeTags(zombieInfo.info) + "\n\n" + Utils.RemoveSizeTags(zombieInfo.introduce) + "\n\n";
|
ZombieDataManager.ZombieData zombieData = zombieDataDic[__instance.currentZombieType];
|
||||||
|
|
||||||
|
string spawnInfo = "";
|
||||||
|
string spawnInfoFormat = StringStore.translationStringRegex["出怪等级: (\\d+)\n出怪权重: (\\d+)"];
|
||||||
|
if(spawnInfoFormat != null)
|
||||||
|
{
|
||||||
|
spawnInfo = string.Format(spawnInfoFormat, [zombieData.summonLevel, zombieData.summonWeight]) + "\n\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
__instance.showedZombieIntroduce.text = Utils.RemoveSizeTags(zombieInfo.info) + "\n\n" + spawnInfo + Utils.RemoveSizeTags(zombieInfo.introduce) + "\n\n";
|
||||||
__instance.showedZombieIntroduce.font = fontAsset;
|
__instance.showedZombieIntroduce.font = fontAsset;
|
||||||
|
__instance.showedZombieIntroduce.fontSizeMax = 21;
|
||||||
__instance.showedZombieIntroduce.margin = new Vector4(3, 2, 12, 0);
|
__instance.showedZombieIntroduce.margin = new Vector4(3, 2, 12, 0);
|
||||||
|
|
||||||
__instance.showedZombieIntroduce.enableWordWrapping = true;
|
__instance.showedZombieIntroduce.enableWordWrapping = true;
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ namespace PvZ_Fusion_Translator.Patches.GameObjects.MinorObjects
|
||||||
{ "^HP:(\\d+)/(\\d+)\n一类:(\\d+)/(\\d+)\n二类:(\\d+)/(\\d+)$", "HP: {0}/{1}\nType 1 armor: {2}/{3}\nType 2 armor: {4}/{5}" },
|
{ "^HP:(\\d+)/(\\d+)\n一类:(\\d+)/(\\d+)\n二类:(\\d+)/(\\d+)$", "HP: {0}/{1}\nType 1 armor: {2}/{3}\nType 2 armor: {4}/{5}" },
|
||||||
{ "^HP:(\\d+)/(\\d+)\n一类:(\\d+)/(\\d+)$", "HP: {0}/{1}\nType 1 armor: {2}/{3}" },
|
{ "^HP:(\\d+)/(\\d+)\n一类:(\\d+)/(\\d+)$", "HP: {0}/{1}\nType 1 armor: {2}/{3}" },
|
||||||
{ "^HP:(\\d+)/(\\d+)\n二类:(\\d+)/(\\d+)$", "HP: {0}/{1}\nType 2 armor: {2}/{3}" },
|
{ "^HP:(\\d+)/(\\d+)\n二类:(\\d+)/(\\d+)$", "HP: {0}/{1}\nType 2 armor: {2}/{3}" },
|
||||||
{ "^HP:(\\d+)/(\\d+)$", "HP: {0}/{1}" },
|
{ "^HP:(\\d+)/(\\d+)$", "HP: {0}/{1}" }
|
||||||
};
|
};
|
||||||
|
|
||||||
public static void LoadHPStrings()
|
public static void LoadHPStrings()
|
||||||
|
|
@ -56,7 +56,21 @@ namespace PvZ_Fusion_Translator.Patches.GameObjects.MinorObjects
|
||||||
if (textTMP)
|
if (textTMP)
|
||||||
{
|
{
|
||||||
string origText = textTMP.text;
|
string origText = textTMP.text;
|
||||||
string translatedText = TranslateHPText(origText, __instance);
|
string translatedText = origText;
|
||||||
|
if (translatedText == null) return;
|
||||||
|
string pattern = "(\\d+)阶\n([\\s\\S]+)";
|
||||||
|
if (StringStore.TestRegex(translatedText, pattern))
|
||||||
|
{
|
||||||
|
var match = Regex.Match(translatedText, pattern, RegexOptions.Singleline);
|
||||||
|
string tier = match.Groups[1].Value;
|
||||||
|
string healthText = TranslateHPText(match.Groups[2].Value, __instance);
|
||||||
|
string fStr = StringStore.translationStringRegex[pattern];
|
||||||
|
translatedText = string.Format(fStr, [tier, healthText]);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
translatedText = TranslateHPText(origText, __instance);
|
||||||
|
}
|
||||||
textTMP.text = translatedText == origText ? origText : translatedText;
|
textTMP.text = translatedText == origText ? origText : translatedText;
|
||||||
textTMP.autoSizeTextContainer = false;
|
textTMP.autoSizeTextContainer = false;
|
||||||
if (translatedText != origText)
|
if (translatedText != origText)
|
||||||
|
|
@ -91,8 +105,7 @@ namespace PvZ_Fusion_Translator.Patches.GameObjects.MinorObjects
|
||||||
for(int i = 0; i < HPStrings.Count; i++)
|
for(int i = 0; i < HPStrings.Count; i++)
|
||||||
{
|
{
|
||||||
var hp = HPStrings.ElementAt(i);
|
var hp = HPStrings.ElementAt(i);
|
||||||
Regex regex = new Regex(hp.Key);
|
if(Regex.Match(originalText, hp.Key, RegexOptions.Singleline).Success)
|
||||||
if(regex.IsMatch(originalText))
|
|
||||||
{
|
{
|
||||||
fIndex = i;
|
fIndex = i;
|
||||||
found = true;
|
found = true;
|
||||||
|
|
@ -146,6 +159,7 @@ namespace PvZ_Fusion_Translator.Patches.GameObjects.MinorObjects
|
||||||
{
|
{
|
||||||
string fStr = HPStrings.ElementAt(fIndex).Value;
|
string fStr = HPStrings.ElementAt(fIndex).Value;
|
||||||
string DPS = originalText.Split("\n")[1].Replace("DPS:", "");
|
string DPS = originalText.Split("\n")[1].Replace("DPS:", "");
|
||||||
|
DPS = StringStore.TranslateText(DPS);
|
||||||
|
|
||||||
switch (fIndex)
|
switch (fIndex)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,17 @@ namespace PvZ_Fusion_Translator.Patches.GameObjects
|
||||||
|
|
||||||
TextMeshProUGUI contentText = contentObject.GetComponent<TextMeshProUGUI>();
|
TextMeshProUGUI contentText = contentObject.GetComponent<TextMeshProUGUI>();
|
||||||
contentText.text = changelogText;
|
contentText.text = changelogText;
|
||||||
|
contentText.margin = new Vector4(6, 2, 12, 0);
|
||||||
|
|
||||||
|
contentText.enableWordWrapping = true;
|
||||||
|
contentText.overflowMode = TextOverflowModes.ScrollRect;
|
||||||
|
|
||||||
|
Canvas.ForceUpdateCanvases();
|
||||||
|
contentText.ForceMeshUpdate();
|
||||||
|
|
||||||
|
//float textHeight = contentText.preferredHeight;
|
||||||
|
//RectTransform contentRect = contentObject.GetComponent<RectTransform>();
|
||||||
|
//contentRect.sizeDelta = new Vector2(contentRect.sizeDelta.x, textHeight);
|
||||||
|
|
||||||
ContentSizeFitter sizeFitter = contentObject.AddComponent<ContentSizeFitter>();
|
ContentSizeFitter sizeFitter = contentObject.AddComponent<ContentSizeFitter>();
|
||||||
sizeFitter.verticalFit = ContentSizeFitter.FitMode.PreferredSize;
|
sizeFitter.verticalFit = ContentSizeFitter.FitMode.PreferredSize;
|
||||||
|
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
||||||
using HarmonyLib;
|
|
||||||
using Il2Cpp;
|
|
||||||
using Il2CppTMPro;
|
|
||||||
using PvZ_Fusion_Translator.AssetStore;
|
|
||||||
using static PvZ_Fusion_Translator.Patches.Managers.TravelMgr_Patch;
|
|
||||||
using UnityEngine;
|
|
||||||
using MelonLoader;
|
|
||||||
|
|
||||||
namespace PvZ_Fusion_Translator.Patches.GameObjects
|
|
||||||
{
|
|
||||||
[HarmonyPatch(typeof(TravelBuffMenu))]
|
|
||||||
public static class TravelBuffMenu_Patch
|
|
||||||
{
|
|
||||||
[HarmonyPatch(nameof(TravelBuffMenu.RefeshOptions))]
|
|
||||||
[HarmonyPostfix]
|
|
||||||
public static void RefeshOptions(TravelBuffMenu __instance)
|
|
||||||
{
|
|
||||||
foreach(TravelBuffOptionButton button in __instance.options)
|
|
||||||
{
|
|
||||||
TravelBuffOptionButton_Patch.TranslateOptionButton(button);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,18 +0,0 @@
|
||||||
using HarmonyLib;
|
|
||||||
using Il2Cpp;
|
|
||||||
|
|
||||||
namespace PvZ_Fusion_Translator.Patches.GameObjects
|
|
||||||
{
|
|
||||||
[HarmonyPatch(typeof(TravelBuff))]
|
|
||||||
public static class TravelBuff_Patch
|
|
||||||
{
|
|
||||||
[HarmonyPatch(nameof(TravelBuff.OnMouseUpAsButton))]
|
|
||||||
[HarmonyPostfix]
|
|
||||||
private static void OnMouseUpAsButton()
|
|
||||||
{
|
|
||||||
if (TravelBuffMgr.Instance == null) return;
|
|
||||||
TravelBuffMgr.Instance.text = AssetStore.StringStore.TranslateText(TravelBuffMgr.Instance.text);
|
|
||||||
TravelBuffMgr.Instance.text2 = AssetStore.StringStore.TranslateText(TravelBuffMgr.Instance.text2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,70 +0,0 @@
|
||||||
using HarmonyLib;
|
|
||||||
using Il2Cpp;
|
|
||||||
using Il2CppTMPro;
|
|
||||||
using PvZ_Fusion_Translator.AssetStore;
|
|
||||||
using static PvZ_Fusion_Translator.Patches.Managers.TravelMgr_Patch;
|
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
namespace PvZ_Fusion_Translator.Patches.GameObjects
|
|
||||||
{
|
|
||||||
[HarmonyPatch(typeof(TravelStore))]
|
|
||||||
public static class TravelStore_Patch
|
|
||||||
{
|
|
||||||
[HarmonyPatch(nameof(TravelStore.Update))]
|
|
||||||
[HarmonyPostfix]
|
|
||||||
private static void Update(TravelStore __instance)
|
|
||||||
{
|
|
||||||
foreach(TextMeshProUGUI text in __instance.introduces)
|
|
||||||
{
|
|
||||||
if(__instance.currentSelect != null)
|
|
||||||
{
|
|
||||||
var buffList = translatedTravelBuffs[buffLinks[(BuffType)__instance.currentSelect.theBuffType]];
|
|
||||||
if(__instance.currentSelect.theBuffNumber < buffList.Count && __instance.currentSelect.theBuffNumber > -1)
|
|
||||||
{
|
|
||||||
text.text = buffList[__instance.currentSelect.theBuffNumber];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
text.text = StringStore.TranslateText(text.text);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
foreach (var textMesh in __instance.points)
|
|
||||||
{
|
|
||||||
textMesh.text = StringStore.TranslateText(textMesh.text);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[HarmonyPatch(nameof(TravelStore.RefreshBuff))]
|
|
||||||
[HarmonyPostfix]
|
|
||||||
private static void RefreshBuff(TravelStore __instance)
|
|
||||||
{
|
|
||||||
foreach (TravelBuff buff in __instance.travelBuffs)
|
|
||||||
{
|
|
||||||
TextMeshProUGUI cost = buff.transform.GetChild(1).GetComponent<TextMeshProUGUI>();
|
|
||||||
cost.text = StringStore.TranslateText(cost.text);
|
|
||||||
cost.font = FontStore.LoadTMPFont(Utils.Language.ToString());
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach (TextMeshProUGUI text in __instance.introduces)
|
|
||||||
{
|
|
||||||
if (__instance.currentSelect != null)
|
|
||||||
{
|
|
||||||
var buffList = translatedTravelBuffs[buffLinks[(BuffType)__instance.currentSelect.theBuffType]];
|
|
||||||
if (__instance.currentSelect.theBuffNumber < buffList.Count && __instance.currentSelect.theBuffNumber > -1)
|
|
||||||
{
|
|
||||||
text.text = buffList[__instance.currentSelect.theBuffNumber];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
text.text = StringStore.TranslateText(text.text);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
foreach (var textMesh in __instance.points)
|
|
||||||
{
|
|
||||||
textMesh.text = StringStore.TranslateText(textMesh.text);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -12,13 +12,13 @@ namespace PvZ_Fusion_Translator.Patches.Managers
|
||||||
{
|
{
|
||||||
[HarmonyPatch(nameof(CanvasUpUI.Start))]
|
[HarmonyPatch(nameof(CanvasUpUI.Start))]
|
||||||
[HarmonyPostfix]
|
[HarmonyPostfix]
|
||||||
public static void Start(IZBottomMenu __instance)
|
public static void Start(CanvasUpUI __instance)
|
||||||
{
|
{
|
||||||
TMP_FontAsset fontAsset = FontStore.LoadTMPFont(Utils.Language.ToString());
|
TMP_FontAsset fontAsset = FontStore.LoadTMPFont(Utils.Language.ToString());
|
||||||
|
|
||||||
foreach(TextMeshProUGUI text in __instance.GetComponentsInChildren<TextMeshProUGUI>())
|
foreach(TextMeshProUGUI text in __instance.GetComponentsInChildren<TextMeshProUGUI>())
|
||||||
{
|
{
|
||||||
string originalKey = StringStore.translationString.FirstOrDefault(x => x.Value.Replace("\n", " ") == text.text).Key;
|
string originalKey = StringStore.translationString.FirstOrDefault(x => (x.Value == text.text || x.Value.Replace("\n", "") == text.text)).Key;
|
||||||
text.text = (StringStore.translationString.ContainsKey(originalKey + "_MG")) ? StringStore.TranslateText(originalKey + "_MG") : StringStore.TranslateText(text.text);
|
text.text = (StringStore.translationString.ContainsKey(originalKey + "_MG")) ? StringStore.TranslateText(originalKey + "_MG") : StringStore.TranslateText(text.text);
|
||||||
if(text.gameObject.name.Contains("LevelName"))
|
if(text.gameObject.name.Contains("LevelName"))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
using Il2Cpp;
|
using Il2Cpp;
|
||||||
using Il2CppTMPro;
|
using Il2CppTMPro;
|
||||||
using PvZ_Fusion_Translator.AssetStore;
|
using PvZ_Fusion_Translator.AssetStore;
|
||||||
|
using PvZ_Fusion_Translator.Patches.Modes.Odyssey;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
|
|
@ -11,7 +12,7 @@ namespace PvZ_Fusion_Translator.Patches.Managers
|
||||||
public static class OppositeBuffManager_Patch
|
public static class OppositeBuffManager_Patch
|
||||||
{
|
{
|
||||||
public static Dictionary<BuffType, string> buffLinks = TravelMgr_Patch.buffLinks;
|
public static Dictionary<BuffType, string> buffLinks = TravelMgr_Patch.buffLinks;
|
||||||
public static Dictionary<string, List<string>> translatedTravelBuffs = TravelMgr_Patch.translatedTravelBuffs;
|
public static Dictionary<string, SortedDictionary<int, string>> translatedTravelBuffs = TravelMgr_Patch.translatedTravelBuffs;
|
||||||
public static string badPattern = @"^但(.*)";
|
public static string badPattern = @"^但(.*)";
|
||||||
public static string badFormat = StringStore.translationStringRegex.ContainsKey(badPattern) ? StringStore.translationStringRegex[badPattern] : "But, {0}";
|
public static string badFormat = StringStore.translationStringRegex.ContainsKey(badPattern) ? StringStore.translationStringRegex[badPattern] : "But, {0}";
|
||||||
public static TMP_FontAsset fontAsset = FontStore.LoadTMPFont(Utils.Language.ToString());
|
public static TMP_FontAsset fontAsset = FontStore.LoadTMPFont(Utils.Language.ToString());
|
||||||
|
|
@ -30,9 +31,9 @@ namespace PvZ_Fusion_Translator.Patches.Managers
|
||||||
{
|
{
|
||||||
string buff = translatedTravelBuffs[buffLinks[buffType]][buffIndex];
|
string buff = translatedTravelBuffs[buffLinks[buffType]][buffIndex];
|
||||||
|
|
||||||
foreach(var text in textList)
|
foreach (var text in textList)
|
||||||
{
|
{
|
||||||
if(isBad)
|
if (isBad)
|
||||||
{
|
{
|
||||||
text.text = string.Format(badFormat, buff);
|
text.text = string.Format(badFormat, buff);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
using HarmonyLib;
|
|
||||||
using Il2Cpp;
|
|
||||||
using System.Text.Encodings.Web;
|
|
||||||
using System.Text.Json;
|
|
||||||
|
|
||||||
namespace PvZ_Fusion_Translator.Patches.Managers
|
|
||||||
{
|
|
||||||
[HarmonyPatch(typeof(TravelBuffMgr))]
|
|
||||||
public static class TravelBuffMgr_Patch
|
|
||||||
{
|
|
||||||
[HarmonyPatch(nameof(TravelBuffMgr.Awake))]
|
|
||||||
[HarmonyPostfix]
|
|
||||||
private static void Awake(TravelBuffMgr __instance)
|
|
||||||
{
|
|
||||||
__instance.text = AssetStore.StringStore.TranslateText(__instance.text);
|
|
||||||
__instance.text2 = AssetStore.StringStore.TranslateText(__instance.text2);
|
|
||||||
}
|
|
||||||
|
|
||||||
[HarmonyPatch(nameof(TravelBuffMgr.ShowText), new Type[] { typeof(int), typeof(int) })]
|
|
||||||
[HarmonyPostfix]
|
|
||||||
private static void ShowText(TravelBuffMgr __instance)
|
|
||||||
{
|
|
||||||
__instance.text = AssetStore.StringStore.TranslateText(__instance.text);
|
|
||||||
__instance.text2 = AssetStore.StringStore.TranslateText(__instance.text2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,102 +0,0 @@
|
||||||
using Il2Cpp;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Text.Encodings.Web;
|
|
||||||
using System.Text.Json;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using HarmonyLib;
|
|
||||||
|
|
||||||
namespace PvZ_Fusion_Translator.Patches.Managers
|
|
||||||
{
|
|
||||||
[HarmonyPatch(typeof(TravelMgr))]
|
|
||||||
public static class TravelMgr_Patch
|
|
||||||
{
|
|
||||||
public static Dictionary<BuffType, string> buffLinks = new Dictionary<BuffType, string>()
|
|
||||||
{
|
|
||||||
{ BuffType.AdvancedBuff, "advancedUpgrades" },
|
|
||||||
{ BuffType.UltimateBuff, "ultimateUpgrades" },
|
|
||||||
{ BuffType.UnlockPlant, "strongUltimates" },
|
|
||||||
{ BuffType.Debuff, "debuffs" },
|
|
||||||
};
|
|
||||||
|
|
||||||
public static Dictionary<string, List<string>> dumpedTravelBuffs = new Dictionary<string, List<string>>()
|
|
||||||
{
|
|
||||||
{ "advancedUpgrades", [] },
|
|
||||||
{ "ultimateUpgrades", [] },
|
|
||||||
{ "strongUltimates", [] },
|
|
||||||
{ "debuffs", [] }
|
|
||||||
};
|
|
||||||
|
|
||||||
public static Dictionary<string, List<string>> translatedTravelBuffs = new Dictionary<string, List<string>>();
|
|
||||||
|
|
||||||
public static void DumpTravelBuffs(Il2CppSystem.Collections.Generic.Dictionary<int, string> source, Dictionary<string, List<string>> dest, string index)
|
|
||||||
{
|
|
||||||
foreach (var i in source)
|
|
||||||
{
|
|
||||||
if (!Utils.CheckForUntranslatedText(i.Value))
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
dest[index].Add(i.Value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static string MatchTravelBuff(string originalText)
|
|
||||||
{
|
|
||||||
string res = "";
|
|
||||||
|
|
||||||
foreach(var i in dumpedTravelBuffs)
|
|
||||||
{
|
|
||||||
if(i.Value.Contains(originalText))
|
|
||||||
{
|
|
||||||
res = translatedTravelBuffs[i.Key][i.Value.IndexOf(originalText)];
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
[HarmonyPatch(nameof(TravelMgr.Awake))]
|
|
||||||
[HarmonyPrefix]
|
|
||||||
private static void Pre_Awake(TravelMgr __instance)
|
|
||||||
{
|
|
||||||
// Dump buffs
|
|
||||||
|
|
||||||
dumpedTravelBuffs = new Dictionary<string, List<string>>() // reset dump
|
|
||||||
{
|
|
||||||
{ "advancedUpgrades", [] },
|
|
||||||
{ "ultimateUpgrades", [] },
|
|
||||||
{ "strongUltimates", [] },
|
|
||||||
{ "debuffs", [] }
|
|
||||||
};
|
|
||||||
|
|
||||||
DumpTravelBuffs(TravelMgr.advancedBuffs, dumpedTravelBuffs, "advancedUpgrades");
|
|
||||||
DumpTravelBuffs(TravelMgr.ultimateBuffs, dumpedTravelBuffs, "ultimateUpgrades");
|
|
||||||
DumpTravelBuffs(TravelMgr.unlocks, dumpedTravelBuffs, "strongUltimates");
|
|
||||||
DumpTravelBuffs(TravelMgr.debuffs, dumpedTravelBuffs, "debuffs");
|
|
||||||
|
|
||||||
string dumpDir = FileLoader.GetAssetDir(FileLoader.AssetType.Dumps);
|
|
||||||
var options = new JsonSerializerOptions
|
|
||||||
{
|
|
||||||
Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping,
|
|
||||||
WriteIndented = true
|
|
||||||
};
|
|
||||||
File.WriteAllText(Path.Combine(dumpDir, "travel_buffs.json"), JsonSerializer.Serialize(dumpedTravelBuffs, options));
|
|
||||||
|
|
||||||
string stringDir = FileLoader.GetAssetDir(FileLoader.AssetType.Strings, Utils.Language);
|
|
||||||
string travelBuffDir = Path.Combine(stringDir, "travel_buffs.json");
|
|
||||||
|
|
||||||
if(!File.Exists(travelBuffDir))
|
|
||||||
{
|
|
||||||
File.WriteAllText(travelBuffDir, JsonSerializer.Serialize(dumpedTravelBuffs, options));
|
|
||||||
}
|
|
||||||
|
|
||||||
string travelBuffs = File.ReadAllText(Path.Combine(stringDir, "travel_buffs.json"));
|
|
||||||
|
|
||||||
translatedTravelBuffs = JsonSerializer.Deserialize<Dictionary<string, List<string>>>(travelBuffs);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -12,7 +12,7 @@ using System.Text.Json;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using UnityEngine.TextCore.Text;
|
using UnityEngine.TextCore.Text;
|
||||||
|
|
||||||
namespace PvZ_Fusion_Translator.Patches.GameObjects
|
namespace PvZ_Fusion_Translator.Patches.Modes.Abyss
|
||||||
{
|
{
|
||||||
[HarmonyPatch(typeof(AbyssBuffMenu))]
|
[HarmonyPatch(typeof(AbyssBuffMenu))]
|
||||||
public static class AbyssBuffMenu_Patch
|
public static class AbyssBuffMenu_Patch
|
||||||
|
|
@ -98,7 +98,7 @@ namespace PvZ_Fusion_Translator.Patches.GameObjects
|
||||||
var regex = new Regex(pattern);
|
var regex = new Regex(pattern);
|
||||||
var match = regex.Match(originalText);
|
var match = regex.Match(originalText);
|
||||||
|
|
||||||
return String.Format(x.Value.Replace("value", "0"), match.Groups[1].Value);
|
return string.Format(x.Value.Replace("value", "0"), match.Groups[1].Value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -4,7 +4,7 @@ using Il2CppTMPro;
|
||||||
using PvZ_Fusion_Translator.AssetStore;
|
using PvZ_Fusion_Translator.AssetStore;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace PvZ_Fusion_Translator.Patches.GameObjects.MinorObjects
|
namespace PvZ_Fusion_Translator.Patches.Modes.Abyss
|
||||||
{
|
{
|
||||||
[HarmonyPatch(typeof(AbyssGoods))]
|
[HarmonyPatch(typeof(AbyssGoods))]
|
||||||
public static class AbyssGoods_Patch
|
public static class AbyssGoods_Patch
|
||||||
|
|
@ -4,7 +4,7 @@ using Il2CppTMPro;
|
||||||
using PvZ_Fusion_Translator.AssetStore;
|
using PvZ_Fusion_Translator.AssetStore;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace PvZ_Fusion_Translator.Patches.GameObjects.ButtonObjects
|
namespace PvZ_Fusion_Translator.Patches.Modes.Abyss
|
||||||
{
|
{
|
||||||
[HarmonyPatch(typeof(AbyssLevelEnter))]
|
[HarmonyPatch(typeof(AbyssLevelEnter))]
|
||||||
public static class AbyssLevelEnter_Patch
|
public static class AbyssLevelEnter_Patch
|
||||||
|
|
@ -9,7 +9,7 @@ using System.Text.RegularExpressions;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
using MelonLoader.Utils;
|
using MelonLoader.Utils;
|
||||||
|
|
||||||
namespace PvZ_Fusion_Translator.Patches.GameObjects
|
namespace PvZ_Fusion_Translator.Patches.Modes.Abyss
|
||||||
{
|
{
|
||||||
[HarmonyPatch(typeof(AbyssMenu))]
|
[HarmonyPatch(typeof(AbyssMenu))]
|
||||||
public static class AbyssMenu_Patch
|
public static class AbyssMenu_Patch
|
||||||
|
|
@ -5,7 +5,7 @@ using PvZ_Fusion_Translator.AssetStore;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
|
|
||||||
namespace PvZ_Fusion_Translator.Patches.GameObjects
|
namespace PvZ_Fusion_Translator.Patches.Modes.Abyss
|
||||||
{
|
{
|
||||||
[HarmonyPatch(typeof(AbyssSelectBuffWindow))]
|
[HarmonyPatch(typeof(AbyssSelectBuffWindow))]
|
||||||
public static class AbyssSelectBuffWindow_Patch
|
public static class AbyssSelectBuffWindow_Patch
|
||||||
|
|
@ -45,7 +45,7 @@ namespace PvZ_Fusion_Translator.Patches.GameObjects
|
||||||
titleText.font = fontAsset;
|
titleText.font = fontAsset;
|
||||||
}
|
}
|
||||||
|
|
||||||
string translatedIntroduceText = (AbyssBuffMenu_Patch.abyssBuffData.ContainsKey(__instance.introduce.text)) ? AbyssBuffMenu_Patch.abyssBuffData[__instance.introduce.text] : AbyssBuffMenu_Patch.TranslateAbyssBuffRegex(__instance.introduce.text);
|
string translatedIntroduceText = AbyssBuffMenu_Patch.abyssBuffData.ContainsKey(__instance.introduce.text) ? AbyssBuffMenu_Patch.abyssBuffData[__instance.introduce.text] : AbyssBuffMenu_Patch.TranslateAbyssBuffRegex(__instance.introduce.text);
|
||||||
|
|
||||||
if (translatedIntroduceText != null)
|
if (translatedIntroduceText != null)
|
||||||
{
|
{
|
||||||
|
|
@ -3,7 +3,7 @@ using Il2Cpp;
|
||||||
using Il2CppTMPro;
|
using Il2CppTMPro;
|
||||||
using PvZ_Fusion_Translator.AssetStore;
|
using PvZ_Fusion_Translator.AssetStore;
|
||||||
|
|
||||||
namespace PvZ_Fusion_Translator.Patches.GameObjects
|
namespace PvZ_Fusion_Translator.Patches.Modes.Abyss
|
||||||
{
|
{
|
||||||
[HarmonyPatch(typeof(AbyssStoreMenu))]
|
[HarmonyPatch(typeof(AbyssStoreMenu))]
|
||||||
public static class AbyssStoreMenu_Patch
|
public static class AbyssStoreMenu_Patch
|
||||||
|
|
@ -4,7 +4,7 @@ using Il2CppTMPro;
|
||||||
using PvZ_Fusion_Translator.AssetStore;
|
using PvZ_Fusion_Translator.AssetStore;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace PvZ_Fusion_Translator.Patches.GameObjects
|
namespace PvZ_Fusion_Translator.Patches.Modes.Harvest
|
||||||
{
|
{
|
||||||
[HarmonyPatch(typeof(GardenBagMenu))]
|
[HarmonyPatch(typeof(GardenBagMenu))]
|
||||||
public static class GardenBagMenu_Patch
|
public static class GardenBagMenu_Patch
|
||||||
|
|
@ -15,26 +15,6 @@ namespace PvZ_Fusion_Translator.Patches.GameObjects
|
||||||
{
|
{
|
||||||
TMP_FontAsset fontAsset = FontStore.LoadTMPFont(Utils.Language.ToString());
|
TMP_FontAsset fontAsset = FontStore.LoadTMPFont(Utils.Language.ToString());
|
||||||
|
|
||||||
foreach (TextMeshProUGUI txt in __instance.GetComponentsInChildren<TextMeshProUGUI>())
|
|
||||||
{
|
|
||||||
if(txt.transform.parent.name.Contains("Close"))
|
|
||||||
{
|
|
||||||
txt.text = StringStore.TranslateText("合上");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
txt.text = StringStore.TranslateText(txt.text);
|
|
||||||
}
|
|
||||||
txt.font = fontAsset;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[HarmonyPatch(nameof(GardenBagMenu.SetTreasureCard))]
|
|
||||||
[HarmonyPostfix]
|
|
||||||
private static void SetTreasureCard(GardenBagMenu __instance)
|
|
||||||
{
|
|
||||||
TMP_FontAsset fontAsset = FontStore.LoadTMPFont(Utils.Language.ToString());
|
|
||||||
|
|
||||||
foreach (TextMeshProUGUI txt in __instance.GetComponentsInChildren<TextMeshProUGUI>())
|
foreach (TextMeshProUGUI txt in __instance.GetComponentsInChildren<TextMeshProUGUI>())
|
||||||
{
|
{
|
||||||
if (txt.transform.parent.name.Contains("Close"))
|
if (txt.transform.parent.name.Contains("Close"))
|
||||||
|
|
@ -48,5 +28,25 @@ namespace PvZ_Fusion_Translator.Patches.GameObjects
|
||||||
txt.font = fontAsset;
|
txt.font = fontAsset;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//[HarmonyPatch(nameof(GardenBagMenu.SetTreasureCard))]
|
||||||
|
//[HarmonyPostfix]
|
||||||
|
//private static void SetTreasureCard(GardenBagMenu __instance)
|
||||||
|
//{
|
||||||
|
// //TMP_FontAsset fontAsset = FontStore.LoadTMPFont(Utils.Language.ToString());
|
||||||
|
|
||||||
|
// //foreach (TextMeshProUGUI txt in __instance.GetComponentsInChildren<TextMeshProUGUI>())
|
||||||
|
// //{
|
||||||
|
// // if (txt.transform.parent.name.Contains("Close"))
|
||||||
|
// // {
|
||||||
|
// // txt.text = StringStore.TranslateText("合上");
|
||||||
|
// // }
|
||||||
|
// // else
|
||||||
|
// // {
|
||||||
|
// // txt.text = StringStore.TranslateText(txt.text);
|
||||||
|
// // }
|
||||||
|
// // txt.font = fontAsset;
|
||||||
|
// //}
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
using Il2Cpp;
|
using Il2Cpp;
|
||||||
using PvZ_Fusion_Translator.AssetStore;
|
using PvZ_Fusion_Translator.AssetStore;
|
||||||
|
|
||||||
namespace PvZ_Fusion_Translator.Patches.GameObjects
|
namespace PvZ_Fusion_Translator.Patches.Modes.Harvest
|
||||||
{
|
{
|
||||||
[HarmonyPatch(typeof(GardenCard))]
|
[HarmonyPatch(typeof(GardenCard))]
|
||||||
public static class GardenCard_Patch
|
public static class GardenCard_Patch
|
||||||
|
|
@ -4,7 +4,7 @@ using Il2CppTMPro;
|
||||||
using PvZ_Fusion_Translator.AssetStore;
|
using PvZ_Fusion_Translator.AssetStore;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace PvZ_Fusion_Translator.Patches.GameObjects
|
namespace PvZ_Fusion_Translator.Patches.Modes.Harvest
|
||||||
{
|
{
|
||||||
[HarmonyPatch(typeof(TreasureConfirmMenu))]
|
[HarmonyPatch(typeof(TreasureConfirmMenu))]
|
||||||
public static class TreasureConfirmMenu_Patch
|
public static class TreasureConfirmMenu_Patch
|
||||||
|
|
@ -4,7 +4,7 @@ using Il2CppTMPro;
|
||||||
using PvZ_Fusion_Translator.AssetStore;
|
using PvZ_Fusion_Translator.AssetStore;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace PvZ_Fusion_Translator.Patches.GameObjects
|
namespace PvZ_Fusion_Translator.Patches.Modes.Harvest
|
||||||
{
|
{
|
||||||
[HarmonyPatch(typeof(TreasureEquipmentMenu))]
|
[HarmonyPatch(typeof(TreasureEquipmentMenu))]
|
||||||
public static class TreasureEquipmentMenu_Patch
|
public static class TreasureEquipmentMenu_Patch
|
||||||
|
|
@ -5,7 +5,7 @@ using PvZ_Fusion_Translator.AssetStore;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
|
|
||||||
namespace PvZ_Fusion_Translator.Patches.GameObjects
|
namespace PvZ_Fusion_Translator.Patches.Modes.Harvest
|
||||||
{
|
{
|
||||||
[HarmonyPatch(typeof(TreasureEvacuateMenu))]
|
[HarmonyPatch(typeof(TreasureEvacuateMenu))]
|
||||||
public static class TreasureEvacuateMenu_Patch
|
public static class TreasureEvacuateMenu_Patch
|
||||||
|
|
@ -4,7 +4,7 @@ using Il2CppTMPro;
|
||||||
using PvZ_Fusion_Translator.AssetStore;
|
using PvZ_Fusion_Translator.AssetStore;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace PvZ_Fusion_Translator.Patches.GameObjects
|
namespace PvZ_Fusion_Translator.Patches.Modes.Harvest
|
||||||
{
|
{
|
||||||
[HarmonyPatch(typeof(TreasureMainMenu))]
|
[HarmonyPatch(typeof(TreasureMainMenu))]
|
||||||
public static class TreasureMainMenu_Patch
|
public static class TreasureMainMenu_Patch
|
||||||
|
|
@ -4,7 +4,7 @@ using Il2CppTMPro;
|
||||||
using PvZ_Fusion_Translator.AssetStore;
|
using PvZ_Fusion_Translator.AssetStore;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace PvZ_Fusion_Translator.Patches.Managers
|
namespace PvZ_Fusion_Translator.Patches.Modes.Harvest
|
||||||
{
|
{
|
||||||
[HarmonyPatch(typeof(TreasureManager))]
|
[HarmonyPatch(typeof(TreasureManager))]
|
||||||
public static class TreasureManager_Patch
|
public static class TreasureManager_Patch
|
||||||
|
|
@ -4,7 +4,7 @@ using Il2CppTMPro;
|
||||||
using PvZ_Fusion_Translator.AssetStore;
|
using PvZ_Fusion_Translator.AssetStore;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace PvZ_Fusion_Translator.Patches.GameObjects
|
namespace PvZ_Fusion_Translator.Patches.Modes.Harvest
|
||||||
{
|
{
|
||||||
[HarmonyPatch(typeof(TreasureStoreMenu))]
|
[HarmonyPatch(typeof(TreasureStoreMenu))]
|
||||||
public static class TreasureStoreMenu_Patch
|
public static class TreasureStoreMenu_Patch
|
||||||
|
|
@ -7,7 +7,7 @@ using System.Text.RegularExpressions;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
|
|
||||||
namespace PvZ_Fusion_Translator.Patches.GameObjects
|
namespace PvZ_Fusion_Translator.Patches.Modes.Harvest
|
||||||
{
|
{
|
||||||
[HarmonyPatch(typeof(TreasureUpgradeMenu))]
|
[HarmonyPatch(typeof(TreasureUpgradeMenu))]
|
||||||
public static class TreasureUpgradeMenu_Patch
|
public static class TreasureUpgradeMenu_Patch
|
||||||
|
|
@ -4,7 +4,7 @@ using Il2CppTMPro;
|
||||||
using PvZ_Fusion_Translator.AssetStore;
|
using PvZ_Fusion_Translator.AssetStore;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace PvZ_Fusion_Translator.Patches.GameObjects
|
namespace PvZ_Fusion_Translator.Patches.Modes.Harvest
|
||||||
{
|
{
|
||||||
[HarmonyPatch(typeof(TreasureWarehouseMenu))]
|
[HarmonyPatch(typeof(TreasureWarehouseMenu))]
|
||||||
public static class TreasureWarehouseMenu_Patch
|
public static class TreasureWarehouseMenu_Patch
|
||||||
33
MelonLoader/Patches/Modes/Odyssey/SynergyDisplay_Patch.cs
Normal file
33
MelonLoader/Patches/Modes/Odyssey/SynergyDisplay_Patch.cs
Normal file
|
|
@ -0,0 +1,33 @@
|
||||||
|
using HarmonyLib;
|
||||||
|
using Il2Cpp;
|
||||||
|
using Il2CppTMPro;
|
||||||
|
using PvZ_Fusion_Translator.AssetStore;
|
||||||
|
using static PvZ_Fusion_Translator.Patches.Modes.Odyssey.TravelMgr_Patch;
|
||||||
|
using UnityEngine;
|
||||||
|
using MelonLoader;
|
||||||
|
|
||||||
|
namespace PvZ_Fusion_Translator.Patches.Modes.Odyssey
|
||||||
|
{
|
||||||
|
[HarmonyPatch(typeof(SynergyDisplay))]
|
||||||
|
public static class SynergyDisplay_Patch
|
||||||
|
{
|
||||||
|
[HarmonyPatch(nameof(SynergyDisplay.Start))]
|
||||||
|
[HarmonyPostfix]
|
||||||
|
public static void Start(SynergyDisplay __instance)
|
||||||
|
{
|
||||||
|
__instance.text1.text = TranslateInvestDisplay(__instance.text1.text);
|
||||||
|
__instance.text_shadow.text = Utils.RemoveColorTags(__instance.text1.text);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string TranslateInvestDisplay(string originalText)
|
||||||
|
{
|
||||||
|
string[] parts = originalText.Split("\n\n");
|
||||||
|
List<string> translatedParts = new List<string>();
|
||||||
|
foreach(string part in parts)
|
||||||
|
{
|
||||||
|
translatedParts.Add(StringStore.TranslateColorText(part));
|
||||||
|
}
|
||||||
|
return String.Join("\n\n", translatedParts);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
35
MelonLoader/Patches/Modes/Odyssey/TravelBuffMenu_Patch.cs
Normal file
35
MelonLoader/Patches/Modes/Odyssey/TravelBuffMenu_Patch.cs
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
using HarmonyLib;
|
||||||
|
using Il2Cpp;
|
||||||
|
using Il2CppTMPro;
|
||||||
|
using PvZ_Fusion_Translator.AssetStore;
|
||||||
|
using static PvZ_Fusion_Translator.Patches.Modes.Odyssey.TravelMgr_Patch;
|
||||||
|
using UnityEngine;
|
||||||
|
using MelonLoader;
|
||||||
|
|
||||||
|
namespace PvZ_Fusion_Translator.Patches.Modes.Odyssey
|
||||||
|
{
|
||||||
|
[HarmonyPatch(typeof(TravelBuffMenu))]
|
||||||
|
public static class TravelBuffMenu_Patch
|
||||||
|
{
|
||||||
|
[HarmonyPatch(nameof(TravelBuffMenu.RefeshOptions))]
|
||||||
|
[HarmonyPostfix]
|
||||||
|
public static void RefeshOptions(TravelBuffMenu __instance)
|
||||||
|
{
|
||||||
|
foreach (TravelBuffOptionButton button in __instance.options)
|
||||||
|
{
|
||||||
|
TravelBuffOptionButton_Patch.TranslateOptionButton(button);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[HarmonyPatch(nameof(TravelBuffMenu.Awake))]
|
||||||
|
[HarmonyPostfix]
|
||||||
|
public static void Awake(TravelBuffMenu __instance)
|
||||||
|
{
|
||||||
|
Transform refreshTransform = __instance.transform.Find("Refresh");
|
||||||
|
foreach (TextMeshProUGUI text in refreshTransform.GetComponentsInChildren<TextMeshProUGUI>())
|
||||||
|
{
|
||||||
|
text.text = StringStore.TranslateText(text.text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
27
MelonLoader/Patches/Modes/Odyssey/TravelBuffMgr_Patch.cs
Normal file
27
MelonLoader/Patches/Modes/Odyssey/TravelBuffMgr_Patch.cs
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
//using HarmonyLib;
|
||||||
|
//using Il2Cpp;
|
||||||
|
//using System.Text.Encodings.Web;
|
||||||
|
//using System.Text.Json;
|
||||||
|
|
||||||
|
//namespace PvZ_Fusion_Translator.Patches.Modes.Odyssey
|
||||||
|
//{
|
||||||
|
// [HarmonyPatch(typeof(TravelBuffMgr))]
|
||||||
|
// public static class TravelBuffMgr_Patch
|
||||||
|
// {
|
||||||
|
// [HarmonyPatch(nameof(TravelBuffMgr.Awake))]
|
||||||
|
// [HarmonyPostfix]
|
||||||
|
// private static void Awake(TravelBuffMgr __instance)
|
||||||
|
// {
|
||||||
|
// __instance.text = AssetStore.StringStore.TranslateText(__instance.text);
|
||||||
|
// __instance.text2 = AssetStore.StringStore.TranslateText(__instance.text2);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// [HarmonyPatch(nameof(TravelBuffMgr.ShowText), new Type[] { typeof(int), typeof(int) })]
|
||||||
|
// [HarmonyPostfix]
|
||||||
|
// private static void ShowText(TravelBuffMgr __instance)
|
||||||
|
// {
|
||||||
|
// __instance.text = AssetStore.StringStore.TranslateText(__instance.text);
|
||||||
|
// __instance.text2 = AssetStore.StringStore.TranslateText(__instance.text2);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
|
@ -4,9 +4,9 @@ using Il2CppTMPro;
|
||||||
using MelonLoader;
|
using MelonLoader;
|
||||||
using PvZ_Fusion_Translator.AssetStore;
|
using PvZ_Fusion_Translator.AssetStore;
|
||||||
using static MelonLoader.MelonLogger;
|
using static MelonLoader.MelonLogger;
|
||||||
using static PvZ_Fusion_Translator.Patches.Managers.TravelMgr_Patch;
|
using static PvZ_Fusion_Translator.Patches.Modes.Odyssey.TravelMgr_Patch;
|
||||||
|
|
||||||
namespace PvZ_Fusion_Translator.Patches.GameObjects
|
namespace PvZ_Fusion_Translator.Patches.Modes.Odyssey
|
||||||
{
|
{
|
||||||
[HarmonyPatch(typeof(TravelBuffOptionButton))]
|
[HarmonyPatch(typeof(TravelBuffOptionButton))]
|
||||||
public static class TravelBuffOptionButton_Patch
|
public static class TravelBuffOptionButton_Patch
|
||||||
|
|
@ -27,9 +27,9 @@ namespace PvZ_Fusion_Translator.Patches.GameObjects
|
||||||
|
|
||||||
public static void TranslateOptionButton(TravelBuffOptionButton button)
|
public static void TranslateOptionButton(TravelBuffOptionButton button)
|
||||||
{
|
{
|
||||||
List<string> buffSet = translatedTravelBuffs[buffLinks[button.buffType]];
|
SortedDictionary<int, string> buffSet = translatedTravelBuffs[buffLinks[button.buffType]];
|
||||||
|
|
||||||
string buff = (button.show != null && button.introduce.text != "词条已选完") ? buffSet[button.buffIndex] : StringStore.TranslateText("词条已选完");
|
string buff = button.show != null && button.introduce.text != "词条已选完" ? buffSet[button.buffIndex] : StringStore.TranslateText("词条已选完");
|
||||||
|
|
||||||
button.introduce.text = buff;
|
button.introduce.text = buff;
|
||||||
}
|
}
|
||||||
18
MelonLoader/Patches/Modes/Odyssey/TravelBuff_Patch.cs
Normal file
18
MelonLoader/Patches/Modes/Odyssey/TravelBuff_Patch.cs
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
//using HarmonyLib;
|
||||||
|
//using Il2Cpp;
|
||||||
|
|
||||||
|
//namespace PvZ_Fusion_Translator.Patches.Modes.Odyssey
|
||||||
|
//{
|
||||||
|
// [HarmonyPatch(typeof(TravelBuff))]
|
||||||
|
// public static class TravelBuff_Patch
|
||||||
|
// {
|
||||||
|
// [HarmonyPatch(nameof(TravelBuff.OnMouseUpAsButton))]
|
||||||
|
// [HarmonyPostfix]
|
||||||
|
// private static void OnMouseUpAsButton()
|
||||||
|
// {
|
||||||
|
// if (TravelBuffMgr.Instance == null) return;
|
||||||
|
// TravelBuffMgr.Instance.text = AssetStore.StringStore.TranslateText(TravelBuffMgr.Instance.text);
|
||||||
|
// TravelBuffMgr.Instance.text2 = AssetStore.StringStore.TranslateText(TravelBuffMgr.Instance.text2);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//}
|
||||||
32
MelonLoader/Patches/Modes/Odyssey/TravelInvestMenu_Patch.cs
Normal file
32
MelonLoader/Patches/Modes/Odyssey/TravelInvestMenu_Patch.cs
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
using HarmonyLib;
|
||||||
|
using Il2Cpp;
|
||||||
|
using Il2CppTMPro;
|
||||||
|
using PvZ_Fusion_Translator.AssetStore;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace PvZ_Fusion_Translator.Patches.Modes.Odyssey
|
||||||
|
{
|
||||||
|
[HarmonyPatch(typeof(TravelInvestMenu))]
|
||||||
|
public static class TravelInvestMenu_Patch
|
||||||
|
{
|
||||||
|
[HarmonyPatch(nameof(TravelInvestMenu.Start))]
|
||||||
|
[HarmonyPostfix]
|
||||||
|
private static void Start(TravelInvestMenu __instance)
|
||||||
|
{
|
||||||
|
Transform titleText = __instance.transform.Find("Title");
|
||||||
|
TextMeshProUGUI shadowText = titleText.GetComponent<TextMeshProUGUI>();
|
||||||
|
|
||||||
|
TextMeshProUGUI regularText = titleText.transform.Find("Title2").GetComponent<TextMeshProUGUI>();
|
||||||
|
regularText.text = StringStore.TranslateText(regularText.text);
|
||||||
|
|
||||||
|
shadowText.text = Utils.RemoveColorTags(regularText.text);
|
||||||
|
}
|
||||||
|
|
||||||
|
[HarmonyPatch(nameof(TravelInvestMenu.RefreshBuff))]
|
||||||
|
[HarmonyPostfix]
|
||||||
|
private static void RefreshBuff(TravelInvestMenu __instance, ref TravelBuffOptionButton option)
|
||||||
|
{
|
||||||
|
TravelBuffOptionButton_Patch.TranslateOptionButton(option);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -2,11 +2,11 @@
|
||||||
using Il2Cpp;
|
using Il2Cpp;
|
||||||
using Il2CppTMPro;
|
using Il2CppTMPro;
|
||||||
using PvZ_Fusion_Translator.AssetStore;
|
using PvZ_Fusion_Translator.AssetStore;
|
||||||
using static PvZ_Fusion_Translator.Patches.Managers.TravelMgr_Patch;
|
using static PvZ_Fusion_Translator.Patches.Modes.Odyssey.TravelMgr_Patch;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using MelonLoader;
|
using MelonLoader;
|
||||||
|
|
||||||
namespace PvZ_Fusion_Translator.Patches.GameObjects
|
namespace PvZ_Fusion_Translator.Patches.Modes.Odyssey
|
||||||
{
|
{
|
||||||
[HarmonyPatch(typeof(TravelLookBuff))]
|
[HarmonyPatch(typeof(TravelLookBuff))]
|
||||||
public static class TravelLookBuff_Patch
|
public static class TravelLookBuff_Patch
|
||||||
|
|
@ -38,8 +38,8 @@ namespace PvZ_Fusion_Translator.Patches.GameObjects
|
||||||
[HarmonyPostfix]
|
[HarmonyPostfix]
|
||||||
public static void Post_SetBuff(TravelLookBuff __instance)
|
public static void Post_SetBuff(TravelLookBuff __instance)
|
||||||
{
|
{
|
||||||
List<string> buffSet = translatedTravelBuffs[buffLinks[__instance.buffType]];
|
SortedDictionary<int, string> buffSet = translatedTravelBuffs[buffLinks[__instance.buffType]];
|
||||||
string buffText = (__instance.buffIndex < buffSet.Count) ? buffSet[__instance.buffIndex] : StringStore.TranslateText(__instance.introduce.text);
|
string buffText = buffSet.ContainsKey(__instance.buffIndex) ? buffSet[__instance.buffIndex] : StringStore.TranslateText(__instance.introduce.text);
|
||||||
__instance.introduce.text = buffText;
|
__instance.introduce.text = buffText;
|
||||||
|
|
||||||
foreach (TextMeshProUGUI text in __instance.transform.FindChild("Images").FindChild("Button").GetComponentsInChildren<TextMeshProUGUI>())
|
foreach (TextMeshProUGUI text in __instance.transform.FindChild("Images").FindChild("Button").GetComponentsInChildren<TextMeshProUGUI>())
|
||||||
|
|
@ -4,7 +4,7 @@ using Il2CppTMPro;
|
||||||
using PvZ_Fusion_Translator.AssetStore;
|
using PvZ_Fusion_Translator.AssetStore;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace PvZ_Fusion_Translator.Patches.GameObjects
|
namespace PvZ_Fusion_Translator.Patches.Modes.Odyssey
|
||||||
{
|
{
|
||||||
[HarmonyPatch(typeof(TravelLookMenu))]
|
[HarmonyPatch(typeof(TravelLookMenu))]
|
||||||
public static class TravelLookMenu_Patch
|
public static class TravelLookMenu_Patch
|
||||||
126
MelonLoader/Patches/Modes/Odyssey/TravelMgr_Patch.cs
Normal file
126
MelonLoader/Patches/Modes/Odyssey/TravelMgr_Patch.cs
Normal file
|
|
@ -0,0 +1,126 @@
|
||||||
|
using HarmonyLib;
|
||||||
|
using Il2Cpp;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Text.Encodings.Web;
|
||||||
|
using System.Text.Json;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Unity.Collections;
|
||||||
|
using UnityEngine.Rendering;
|
||||||
|
using static PvZ_Fusion_Translator.FileLoader;
|
||||||
|
|
||||||
|
namespace PvZ_Fusion_Translator.Patches.Modes.Odyssey
|
||||||
|
{
|
||||||
|
[HarmonyPatch(typeof(TravelMgr))]
|
||||||
|
public static class TravelMgr_Patch
|
||||||
|
{
|
||||||
|
public static Dictionary<string, SortedDictionary<int, string>> dumpedTravelBuffs = new()
|
||||||
|
{
|
||||||
|
{ "advancedBuffs", new SortedDictionary<int, string>() },
|
||||||
|
{ "ultimateBuffs", new SortedDictionary<int, string>() },
|
||||||
|
{ "debuffs", new SortedDictionary<int, string>() },
|
||||||
|
{ "unlocks", new SortedDictionary<int, string>() },
|
||||||
|
{ "investmentBuffs", new SortedDictionary<int, string>() }
|
||||||
|
};
|
||||||
|
|
||||||
|
public static Dictionary<string, SortedDictionary<int, string>> translatedTravelBuffs = new()
|
||||||
|
{
|
||||||
|
{ "advancedBuffs", new SortedDictionary<int, string>() },
|
||||||
|
{ "ultimateBuffs", new SortedDictionary<int, string>() },
|
||||||
|
{ "debuffs", new SortedDictionary<int, string>() },
|
||||||
|
{ "unlocks", new SortedDictionary<int, string>() },
|
||||||
|
{ "investmentBuffs", new SortedDictionary<int, string>() }
|
||||||
|
};
|
||||||
|
|
||||||
|
public static Dictionary<BuffType, string> buffLinks = new()
|
||||||
|
{
|
||||||
|
{ BuffType.AdvancedBuff, "advancedBuffs" },
|
||||||
|
{ BuffType.UltimateBuff, "ultimateBuffs" },
|
||||||
|
{ BuffType.Debuff, "debuffs" },
|
||||||
|
{ BuffType.UnlockPlant, "unlocks" },
|
||||||
|
{ BuffType.InvestmentBuff, "investmentBuffs" }
|
||||||
|
};
|
||||||
|
|
||||||
|
public static void DumpTravelBuffs()
|
||||||
|
{
|
||||||
|
TravelMgr.Instance.GetPlantBuffUnlockCount(PlantType.DoomGatling);
|
||||||
|
|
||||||
|
foreach (var pair in TravelDictionary.advancedBuffsText)
|
||||||
|
{
|
||||||
|
dumpedTravelBuffs["advancedBuffs"].Add((int)pair.Key, pair.Value);
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (var pair in TravelDictionary.ultimateBuffsText)
|
||||||
|
{
|
||||||
|
dumpedTravelBuffs["ultimateBuffs"].Add((int)pair.Key, pair.Value);
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (var pair in TravelDictionary.debuffData)
|
||||||
|
{
|
||||||
|
dumpedTravelBuffs["debuffs"].Add((int)pair.Key, pair.Value.Item1);
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (var pair in TravelDictionary.unlocksText)
|
||||||
|
{
|
||||||
|
dumpedTravelBuffs["unlocks"].Add((int)pair.Key, pair.Value);
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (var pair in TravelMgr.InvestBuffsData)
|
||||||
|
{
|
||||||
|
dumpedTravelBuffs["investmentBuffs"].Add((int)pair.Key, pair.Value.GetDescription());
|
||||||
|
}
|
||||||
|
|
||||||
|
File.WriteAllText(Path.Combine(GetAssetDir(AssetType.Dumps), "travel_buffs.json"), JsonSerializer.Serialize(dumpedTravelBuffs, new JsonSerializerOptions
|
||||||
|
{
|
||||||
|
WriteIndented = true,
|
||||||
|
Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping
|
||||||
|
}));
|
||||||
|
|
||||||
|
string translatedTravelBuffsPath = Path.Combine(GetAssetDir(AssetType.Strings, Utils.Language), "travel_buffs.json");
|
||||||
|
|
||||||
|
if (!File.Exists(translatedTravelBuffsPath))
|
||||||
|
{
|
||||||
|
File.WriteAllText(translatedTravelBuffsPath, JsonSerializer.Serialize(dumpedTravelBuffs, new JsonSerializerOptions
|
||||||
|
{
|
||||||
|
WriteIndented = true,
|
||||||
|
Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping
|
||||||
|
}));
|
||||||
|
translatedTravelBuffs = dumpedTravelBuffs;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string MatchTravelBuff(string originalText)
|
||||||
|
{
|
||||||
|
string res = "";
|
||||||
|
|
||||||
|
foreach (var i in dumpedTravelBuffs)
|
||||||
|
{
|
||||||
|
foreach (var j in dumpedTravelBuffs[i.Key])
|
||||||
|
{
|
||||||
|
if (j.Value == originalText || j.Value == RemoveBuffName(originalText))
|
||||||
|
{
|
||||||
|
res = translatedTravelBuffs[i.Key][j.Key];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (res != "") break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string RemoveBuffName(string buffText)
|
||||||
|
{
|
||||||
|
string res = buffText;
|
||||||
|
int firstColon = res.IndexOf(":");
|
||||||
|
if(firstColon > 0)
|
||||||
|
{
|
||||||
|
res = res.Substring(firstColon + 1);
|
||||||
|
}
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -4,7 +4,7 @@ using Il2CppTMPro;
|
||||||
using PvZ_Fusion_Translator.AssetStore;
|
using PvZ_Fusion_Translator.AssetStore;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace PvZ_Fusion_Translator.Patches.GameObjects
|
namespace PvZ_Fusion_Translator.Patches.Modes.Odyssey
|
||||||
{
|
{
|
||||||
[HarmonyPatch(typeof(TravelRefresh))]
|
[HarmonyPatch(typeof(TravelRefresh))]
|
||||||
public static class TravelRefresh_Patch
|
public static class TravelRefresh_Patch
|
||||||
97
MelonLoader/Patches/Modes/Odyssey/TravelStoreWindow_Patch.cs
Normal file
97
MelonLoader/Patches/Modes/Odyssey/TravelStoreWindow_Patch.cs
Normal file
|
|
@ -0,0 +1,97 @@
|
||||||
|
using HarmonyLib;
|
||||||
|
using Il2Cpp;
|
||||||
|
using Il2CppTMPro;
|
||||||
|
using PvZ_Fusion_Translator.AssetStore;
|
||||||
|
using static PvZ_Fusion_Translator.Patches.Modes.Odyssey.TravelMgr_Patch;
|
||||||
|
using UnityEngine;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
|
||||||
|
namespace PvZ_Fusion_Translator.Patches.Modes.Odyssey
|
||||||
|
{
|
||||||
|
[HarmonyPatch(typeof(TravelStoreWindow))]
|
||||||
|
public static class TravelStoreWindow_Patch
|
||||||
|
{
|
||||||
|
[HarmonyPatch(nameof(TravelStoreWindow.SetType))]
|
||||||
|
[HarmonyPostfix]
|
||||||
|
private static void SetType(TravelStoreWindow __instance)
|
||||||
|
{
|
||||||
|
var buffSet = translatedTravelBuffs[buffLinks[__instance.buffType]];
|
||||||
|
|
||||||
|
string buff = __instance.show != null && __instance.introduce.text != "词条已选完" ? buffSet[__instance.buffIndex] : StringStore.TranslateText("词条已选完");
|
||||||
|
string originalText = __instance.introduce.text;
|
||||||
|
|
||||||
|
string affinities = TranslateAffinities(originalText);
|
||||||
|
|
||||||
|
__instance.introduce.text = buff + affinities;
|
||||||
|
|
||||||
|
foreach (var text in __instance.buttonText)
|
||||||
|
{
|
||||||
|
text.text = StringStore.TranslateText(text.text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[HarmonyPatch(nameof(TravelStoreWindow.UpdateButtonText))]
|
||||||
|
[HarmonyPostfix]
|
||||||
|
private static void UpdateButtonText(TravelStoreWindow __instance)
|
||||||
|
{
|
||||||
|
foreach (var text in __instance.buttonText)
|
||||||
|
{
|
||||||
|
text.text = StringStore.TranslateText(text.text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string TranslateAffinities(string originalText)
|
||||||
|
{
|
||||||
|
string discolored = Utils.RemoveColorTags(originalText);
|
||||||
|
int firstNewlineIndex = discolored.IndexOf('\n');
|
||||||
|
|
||||||
|
string result = "";
|
||||||
|
List<string> translatedAffinities = [];
|
||||||
|
|
||||||
|
if(firstNewlineIndex >= 0)
|
||||||
|
{
|
||||||
|
string affinityString = discolored.Substring(firstNewlineIndex);
|
||||||
|
string[] affinities = affinityString.Split('\n');
|
||||||
|
|
||||||
|
string fStr = StringStore.translationStringRegex.ContainsKey("【([^\\s]+)】_IV") ? StringStore.translationStringRegex["【([^\\s]+)】_IV"] : "[{0}]";
|
||||||
|
string originalPattern = "【([^\\s]+)】";
|
||||||
|
|
||||||
|
foreach (string affinity in affinities)
|
||||||
|
{
|
||||||
|
if(affinity != "")
|
||||||
|
{
|
||||||
|
string translatedAffinity = affinity;
|
||||||
|
if (StringStore.TestRegex(affinity, originalPattern))
|
||||||
|
{
|
||||||
|
// Extract dynamic parts from the original text
|
||||||
|
var regex = new Regex(originalPattern);
|
||||||
|
var match = regex.Match(affinity);
|
||||||
|
int groupCount = match.Groups.Count;
|
||||||
|
|
||||||
|
// List to hold formatted dynamic parts
|
||||||
|
List<string> dynamicParts = [];
|
||||||
|
|
||||||
|
// Loop through each group and determine its translation
|
||||||
|
for (int i = 1; i < groupCount; i++)
|
||||||
|
{
|
||||||
|
string groupValue = match.Groups[i].Value;
|
||||||
|
string translatedValue = StringStore.translationString.ContainsKey(groupValue)
|
||||||
|
? StringStore.translationString[groupValue]
|
||||||
|
: groupValue;
|
||||||
|
dynamicParts.Add(translatedValue);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Format the output string with dynamic parts
|
||||||
|
translatedAffinity = string.Format(fStr, [.. dynamicParts]);
|
||||||
|
}
|
||||||
|
|
||||||
|
translatedAffinities.Add(translatedAffinity);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
result = "\n" + "<color=red>" + String.Join("\n", translatedAffinities) + "</color>";
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
91
MelonLoader/Patches/Modes/Odyssey/TravelStore_Patch.cs
Normal file
91
MelonLoader/Patches/Modes/Odyssey/TravelStore_Patch.cs
Normal file
|
|
@ -0,0 +1,91 @@
|
||||||
|
using HarmonyLib;
|
||||||
|
using Il2Cpp;
|
||||||
|
using Il2CppTMPro;
|
||||||
|
using PvZ_Fusion_Translator.AssetStore;
|
||||||
|
using static PvZ_Fusion_Translator.Patches.Modes.Odyssey.TravelMgr_Patch;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace PvZ_Fusion_Translator.Patches.Modes.Odyssey
|
||||||
|
{
|
||||||
|
[HarmonyPatch(typeof(TravelStore))]
|
||||||
|
public static class TravelStore_Patch
|
||||||
|
{
|
||||||
|
[HarmonyPatch(nameof(TravelStore.Start))]
|
||||||
|
[HarmonyPostfix]
|
||||||
|
private static void Start(TravelStore __instance)
|
||||||
|
{
|
||||||
|
TranslateStoreText(__instance);
|
||||||
|
}
|
||||||
|
|
||||||
|
[HarmonyPatch(nameof(TravelStore.Update))]
|
||||||
|
[HarmonyPostfix]
|
||||||
|
private static void Update(TravelStore __instance)
|
||||||
|
{
|
||||||
|
TranslateStoreText(__instance);
|
||||||
|
}
|
||||||
|
|
||||||
|
[HarmonyPatch(nameof(TravelStore.RefreshBuff))]
|
||||||
|
[HarmonyPostfix]
|
||||||
|
private static void RefreshBuff(TravelStore __instance)
|
||||||
|
{
|
||||||
|
TranslateStoreText(__instance);
|
||||||
|
}
|
||||||
|
|
||||||
|
[HarmonyPatch(nameof(TravelStore.SelectBuff))]
|
||||||
|
[HarmonyPostfix]
|
||||||
|
private static void SelectBuff(TravelStore __instance, ref TravelStoreWindow window)
|
||||||
|
{
|
||||||
|
TranslateStoreText(__instance);
|
||||||
|
|
||||||
|
foreach (var text in window.buttonText)
|
||||||
|
{
|
||||||
|
text.text = StringStore.TranslateText(text.text);
|
||||||
|
}
|
||||||
|
|
||||||
|
__instance.investText.text = TranslateInvestText(__instance.investText.text);
|
||||||
|
__instance.investTextshadow.text = TranslateInvestText(__instance.investTextshadow.text);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void TranslateStoreText(TravelStore __instance)
|
||||||
|
{
|
||||||
|
__instance.investText.text = TranslateInvestText(__instance.investText.text);
|
||||||
|
__instance.investTextshadow.text = TranslateInvestText(__instance.investTextshadow.text);
|
||||||
|
|
||||||
|
foreach (var text in __instance.pointText)
|
||||||
|
{
|
||||||
|
text.text = StringStore.TranslateText(text.text);
|
||||||
|
}
|
||||||
|
foreach (var text in __instance.refreshText)
|
||||||
|
{
|
||||||
|
text.text = StringStore.TranslateText(text.text);
|
||||||
|
}
|
||||||
|
foreach(var text in __instance.transform.Find("Quit").GetComponentsInChildren<TextMeshProUGUI>())
|
||||||
|
{
|
||||||
|
text.text = StringStore.TranslateText("合上");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string TranslateInvestText(string investText)
|
||||||
|
{
|
||||||
|
string res = investText;
|
||||||
|
|
||||||
|
string[] investStats = investText.Split("\n\n");
|
||||||
|
List<string> translatedInvestStats = new List<string>();
|
||||||
|
foreach(string investStat in investStats)
|
||||||
|
{
|
||||||
|
string[] lines = investStat.Split("\n");
|
||||||
|
List<string> translatedLines = new List<string>();
|
||||||
|
foreach(string line in lines)
|
||||||
|
{
|
||||||
|
translatedLines.Add(StringStore.TranslateColorText(line));
|
||||||
|
}
|
||||||
|
string translatedInvestStat = String.Join("\n", translatedLines);
|
||||||
|
translatedInvestStats.Add(translatedInvestStat);
|
||||||
|
}
|
||||||
|
|
||||||
|
res = String.Join("\n\n", translatedInvestStats);
|
||||||
|
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
107
MelonLoader/Patches/Modes/Odyssey/TravelSynergyMenu_Patch.cs
Normal file
107
MelonLoader/Patches/Modes/Odyssey/TravelSynergyMenu_Patch.cs
Normal file
|
|
@ -0,0 +1,107 @@
|
||||||
|
using HarmonyLib;
|
||||||
|
using Il2Cpp;
|
||||||
|
using Il2CppTMPro;
|
||||||
|
using PvZ_Fusion_Translator.AssetStore;
|
||||||
|
using static PvZ_Fusion_Translator.Patches.Modes.Odyssey.TravelMgr_Patch;
|
||||||
|
using UnityEngine;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
|
||||||
|
namespace PvZ_Fusion_Translator.Patches.Modes.Odyssey
|
||||||
|
{
|
||||||
|
[HarmonyPatch(typeof(TravelSynergyMenu))]
|
||||||
|
public static class TravelSynergyMenu_Patch
|
||||||
|
{
|
||||||
|
[HarmonyPatch(nameof(TravelSynergyMenu.Awake))]
|
||||||
|
[HarmonyPostfix]
|
||||||
|
public static void Awake(TravelSynergyMenu __instance)
|
||||||
|
{
|
||||||
|
Transform background = __instance.transform.Find("Background");
|
||||||
|
Transform tip = __instance.transform.Find("Text (TMP)");
|
||||||
|
|
||||||
|
foreach(TextMeshProUGUI text in background.GetComponentsInChildren<TextMeshProUGUI>())
|
||||||
|
{
|
||||||
|
text.text = StringStore.TranslateText(text.text);
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (TextMeshProUGUI text in tip.GetComponentsInChildren<TextMeshProUGUI>())
|
||||||
|
{
|
||||||
|
text.text = StringStore.TranslateText(text.text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[HarmonyPatch(typeof(SynergyNode))]
|
||||||
|
public static class SynergyNode_Patch
|
||||||
|
{
|
||||||
|
[HarmonyPatch(nameof(SynergyNode.InitNode))]
|
||||||
|
[HarmonyPostfix]
|
||||||
|
public static void InitNode(SynergyNode __instance)
|
||||||
|
{
|
||||||
|
int firstNewlineIndex = __instance.synergyTitle.text.IndexOf("\n");
|
||||||
|
string title = __instance.synergyTitle.text.Substring(0, firstNewlineIndex);
|
||||||
|
string description = __instance.synergyTitle.text.Substring(firstNewlineIndex + 1);
|
||||||
|
description = (description.Substring(0, 8) == "</color>") ? description.Substring(8) : description;
|
||||||
|
|
||||||
|
string pattern = @"<color=[^>]+>[\s\S]*?(?:<\/color>|$)|(?:<(?!color=)|[^<])+";
|
||||||
|
string smallPattern = @"(<color=[^>]+>)(.*?)(</color>)";
|
||||||
|
MatchCollection matches = Regex.Matches(description, pattern);
|
||||||
|
string translatedDescription = "";
|
||||||
|
foreach(Match match in matches)
|
||||||
|
{
|
||||||
|
Match colorMatch = Regex.Match(match.Value, smallPattern, RegexOptions.Singleline);
|
||||||
|
if (colorMatch.Success)
|
||||||
|
{
|
||||||
|
translatedDescription += colorMatch.Groups[1].Value + TranslateSegment(colorMatch.Groups[2].Value) + colorMatch.Groups[3].Value;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
translatedDescription += TranslateSegment(match.Value) + "\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
__instance.synergyTitle.text = "<size=95%>" + StringStore.TranslateColorText(title) + "\n" + translatedDescription;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string TranslateSegment(string text)
|
||||||
|
{
|
||||||
|
string res = "";
|
||||||
|
|
||||||
|
List<string> parts = SplitSecondNewLines(text);
|
||||||
|
|
||||||
|
foreach(string part in parts)
|
||||||
|
{
|
||||||
|
string temp = "";
|
||||||
|
string[] lines = part.Split('\n');
|
||||||
|
if(lines.Length > 1)
|
||||||
|
{
|
||||||
|
temp = StringStore.TranslateText(lines[0]) + "\n" + StringStore.TranslateText(lines[1]);
|
||||||
|
}
|
||||||
|
res += temp + "\n";
|
||||||
|
}
|
||||||
|
return res.Substring(0, res.Length - 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static List<string> SplitSecondNewLines(string originalText)
|
||||||
|
{
|
||||||
|
List<string> results = new List<string>();
|
||||||
|
|
||||||
|
string[] lines = originalText.Split('\n');
|
||||||
|
for (int i = 0; i < lines.Length; i += 2)
|
||||||
|
{
|
||||||
|
string res = "";
|
||||||
|
if(i + 1 < lines.Length)
|
||||||
|
{
|
||||||
|
res = lines[i] + "\n" + lines[i + 1];
|
||||||
|
results.Add(res);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
res = lines[i];
|
||||||
|
results.Add(res);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,77 @@
|
||||||
|
using HarmonyLib;
|
||||||
|
using Il2Cpp;
|
||||||
|
using Il2CppTMPro;
|
||||||
|
using PvZ_Fusion_Translator.AssetStore;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace PvZ_Fusion_Translator.Patches.Modes.Starbound
|
||||||
|
{
|
||||||
|
[HarmonyPatch(typeof(AdvantureEvolutionMenu))]
|
||||||
|
public static class AdvantureEvolutionMenu_Patch
|
||||||
|
{
|
||||||
|
[HarmonyPatch(nameof(AdvantureMenu.Awake))]
|
||||||
|
[HarmonyPostfix]
|
||||||
|
public static void Awake(AdvantureEvolutionMenu __instance)
|
||||||
|
{
|
||||||
|
foreach (TextMeshProUGUI text in __instance.GetComponentsInChildren<TextMeshProUGUI>())
|
||||||
|
{
|
||||||
|
text.text = StringStore.TranslateColorText(text.text);
|
||||||
|
}
|
||||||
|
|
||||||
|
Transform baseWindow = __instance.transform.Find("BaseWindow");
|
||||||
|
Transform advancedWindow = __instance.transform.Find("AdvancedWindow");
|
||||||
|
|
||||||
|
if(baseWindow != null)
|
||||||
|
{
|
||||||
|
foreach(TextMeshProUGUI text in baseWindow.GetComponentsInChildren<TextMeshProUGUI>())
|
||||||
|
{
|
||||||
|
if(text.gameObject.name.Contains("Name"))
|
||||||
|
{
|
||||||
|
text.text = Utils.GetPlantNameFromAlmanac(__instance.thePlantType);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (advancedWindow != null)
|
||||||
|
{
|
||||||
|
foreach (TextMeshProUGUI text in advancedWindow.GetComponentsInChildren<TextMeshProUGUI>())
|
||||||
|
{
|
||||||
|
if (text.gameObject.name.Contains("Name"))
|
||||||
|
{
|
||||||
|
text.text = Utils.GetPlantNameFromAlmanac(__instance.thePlantType);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[HarmonyPatch(nameof(AdvantureEvolutionMenu.UpdateText))]
|
||||||
|
[HarmonyPostfix]
|
||||||
|
public static void UpdateText(AdvantureEvolutionMenu __instance)
|
||||||
|
{
|
||||||
|
foreach (TextMeshProUGUI text in __instance.GetComponentsInChildren<TextMeshProUGUI>())
|
||||||
|
{
|
||||||
|
text.text = StringStore.TranslateColorText(text.text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[HarmonyPatch(nameof(AdvantureEvolutionMenu.RollEvolution))]
|
||||||
|
[HarmonyPostfix]
|
||||||
|
public static void RollEvolution(AdvantureEvolutionMenu __instance)
|
||||||
|
{
|
||||||
|
foreach (TextMeshProUGUI text in __instance.GetComponentsInChildren<TextMeshProUGUI>())
|
||||||
|
{
|
||||||
|
text.text = StringStore.TranslateColorText(text.text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[HarmonyPatch(nameof(AdvantureEvolutionMenu.RollEvolutionGood))]
|
||||||
|
[HarmonyPostfix]
|
||||||
|
public static void RollEvolutionGood(AdvantureEvolutionMenu __instance)
|
||||||
|
{
|
||||||
|
foreach (TextMeshProUGUI text in __instance.GetComponentsInChildren<TextMeshProUGUI>())
|
||||||
|
{
|
||||||
|
text.text = StringStore.TranslateColorText(text.text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
using HarmonyLib;
|
||||||
|
using Il2Cpp;
|
||||||
|
using Il2CppTMPro;
|
||||||
|
using PvZ_Fusion_Translator.AssetStore;
|
||||||
|
|
||||||
|
namespace PvZ_Fusion_Translator.Patches.Modes.Starbound
|
||||||
|
{
|
||||||
|
[HarmonyPatch(typeof(AdvantureHelpMenu))]
|
||||||
|
public static class AdvantureHelpMenu_Patch
|
||||||
|
{
|
||||||
|
[HarmonyPatch(nameof(AdvantureHelpMenu.InitText))]
|
||||||
|
[HarmonyPostfix]
|
||||||
|
private static void InitText(AdvantureHelpMenu __instance)
|
||||||
|
{
|
||||||
|
foreach(TextMeshProUGUI text in __instance.GetComponentsInChildren<TextMeshProUGUI>())
|
||||||
|
{
|
||||||
|
text.text = StringStore.TranslateText(text.text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
28
MelonLoader/Patches/Modes/Starbound/AdvantureMenu2_Patch.cs
Normal file
28
MelonLoader/Patches/Modes/Starbound/AdvantureMenu2_Patch.cs
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
using HarmonyLib;
|
||||||
|
using Il2Cpp;
|
||||||
|
using Il2CppTMPro;
|
||||||
|
using PvZ_Fusion_Translator.AssetStore;
|
||||||
|
|
||||||
|
namespace PvZ_Fusion_Translator.Patches.Modes.Starbound
|
||||||
|
{
|
||||||
|
[HarmonyPatch(typeof(AdvantureMenu2))]
|
||||||
|
public static class AdvantureMenu2_Patch
|
||||||
|
{
|
||||||
|
[HarmonyPatch(nameof(AdvantureMenu2.Awake))]
|
||||||
|
[HarmonyPostfix]
|
||||||
|
private static void Awake(AdvantureMenu2 __instance)
|
||||||
|
{
|
||||||
|
foreach(TextMeshProUGUI text in __instance.GetComponentsInChildren<TextMeshProUGUI>())
|
||||||
|
{
|
||||||
|
text.text = StringStore.TranslateText(text.text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[HarmonyPatch(nameof(AdvantureMenu2.AdjustDifficulty))]
|
||||||
|
[HarmonyPostfix]
|
||||||
|
private static void AdjustDifficulty(AdvantureMenu2 __instance)
|
||||||
|
{
|
||||||
|
__instance.difficulty.text = StringStore.TranslateText(__instance.difficulty.text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
64
MelonLoader/Patches/Modes/Starbound/AdvantureMenu_Patch.cs
Normal file
64
MelonLoader/Patches/Modes/Starbound/AdvantureMenu_Patch.cs
Normal file
|
|
@ -0,0 +1,64 @@
|
||||||
|
using HarmonyLib;
|
||||||
|
using Il2Cpp;
|
||||||
|
using Il2CppTMPro;
|
||||||
|
using PvZ_Fusion_Translator.AssetStore;
|
||||||
|
|
||||||
|
namespace PvZ_Fusion_Translator.Patches.Modes.Starbound
|
||||||
|
{
|
||||||
|
[HarmonyPatch(typeof(AdvantureMenu))]
|
||||||
|
public static class AdvantureMenu_Patch
|
||||||
|
{
|
||||||
|
[HarmonyPatch(nameof(AdvantureMenu.Start))]
|
||||||
|
[HarmonyPostfix]
|
||||||
|
private static void Start(AdvantureMenu __instance)
|
||||||
|
{
|
||||||
|
TranslateAdvantureMenu(__instance);
|
||||||
|
}
|
||||||
|
|
||||||
|
[HarmonyPatch(nameof(AdvantureMenu.ChangeDifficulty))]
|
||||||
|
[HarmonyPostfix]
|
||||||
|
private static void ChangeDifficulty(AdvantureMenu __instance)
|
||||||
|
{
|
||||||
|
TranslateAdvantureMenu(__instance);
|
||||||
|
}
|
||||||
|
|
||||||
|
[HarmonyPatch(nameof(AdvantureMenu.GetChapterDifficulty))]
|
||||||
|
[HarmonyPostfix]
|
||||||
|
private static void GetChapterDifficulty(AdvantureMenu __instance)
|
||||||
|
{
|
||||||
|
TranslateAdvantureMenu(__instance);
|
||||||
|
}
|
||||||
|
|
||||||
|
[HarmonyPatch(nameof(AdvantureMenu.UpdateChapterDifficulty))]
|
||||||
|
[HarmonyPostfix]
|
||||||
|
private static void UpdateChapterDifficulty(AdvantureMenu __instance)
|
||||||
|
{
|
||||||
|
TranslateAdvantureMenu(__instance);
|
||||||
|
}
|
||||||
|
|
||||||
|
[HarmonyPatch(nameof(AdvantureMenu.UpdateStarCount))]
|
||||||
|
[HarmonyPostfix]
|
||||||
|
private static void UpdateStarCount(AdvantureMenu __instance)
|
||||||
|
{
|
||||||
|
TranslateAdvantureMenu(__instance);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void TranslateAdvantureMenu(AdvantureMenu __instance)
|
||||||
|
{
|
||||||
|
bool hasSBString = StringStore.translationString.ContainsKey(__instance.difficulty.text + "_SB");
|
||||||
|
__instance.difficulty.text = Utils.RemoveSizeTags(hasSBString ? StringStore.TranslateText(__instance.difficulty.text + "_SB") : StringStore.TranslateText(__instance.difficulty.text));
|
||||||
|
__instance.chapterDifficulty.text = StringStore.TranslateText(__instance.chapterDifficulty.text);
|
||||||
|
__instance.starCount.text = StringStore.TranslateText(__instance.starCount.text);
|
||||||
|
|
||||||
|
foreach (TextMeshProUGUI text in __instance.title)
|
||||||
|
{
|
||||||
|
text.text = StringStore.TranslateText(text.text);
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (TextMeshProUGUI text in __instance.GetComponentsInChildren<TextMeshProUGUI>())
|
||||||
|
{
|
||||||
|
text.text = StringStore.TranslateText(text.text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,56 @@
|
||||||
|
using HarmonyLib;
|
||||||
|
using Il2Cpp;
|
||||||
|
using Il2CppTMPro;
|
||||||
|
using PvZ_Fusion_Translator.AssetStore;
|
||||||
|
|
||||||
|
namespace PvZ_Fusion_Translator.Patches.Modes.Starbound
|
||||||
|
{
|
||||||
|
[HarmonyPatch(typeof(AdvantureMissionMenu))]
|
||||||
|
public static class AdvantureMissionMenu_Patch
|
||||||
|
{
|
||||||
|
[HarmonyPatch(nameof(AdvantureMissionMenu.Awake))]
|
||||||
|
[HarmonyPostfix]
|
||||||
|
private static void Awake(AdvantureMissionMenu __instance)
|
||||||
|
{
|
||||||
|
foreach (TextMeshProUGUI text in __instance.contant.GetComponentsInChildren<TextMeshProUGUI>())
|
||||||
|
{
|
||||||
|
text.text = StringStore.TranslateColorText(text.text);
|
||||||
|
}
|
||||||
|
|
||||||
|
//foreach (TextMeshProUGUI text in __instance.GetComponentsInChildren<TextMeshProUGUI>())
|
||||||
|
//{
|
||||||
|
// text.text = StringStore.TranslateText(text.text);
|
||||||
|
//}
|
||||||
|
}
|
||||||
|
|
||||||
|
[HarmonyPatch(nameof(AdvantureMissionMenu.InitText))]
|
||||||
|
[HarmonyPostfix]
|
||||||
|
private static void InitText(AdvantureMissionMenu __instance)
|
||||||
|
{
|
||||||
|
foreach (TextMeshProUGUI text in __instance.contant.GetComponentsInChildren<TextMeshProUGUI>())
|
||||||
|
{
|
||||||
|
text.text = StringStore.TranslateColorText(text.text);
|
||||||
|
}
|
||||||
|
|
||||||
|
//foreach (TextMeshProUGUI text in __instance.GetComponentsInChildren<TextMeshProUGUI>())
|
||||||
|
//{
|
||||||
|
// text.text = StringStore.TranslateText(text.text);
|
||||||
|
//}
|
||||||
|
}
|
||||||
|
|
||||||
|
[HarmonyPatch(nameof(AdvantureMissionMenu.SwitchAward))]
|
||||||
|
[HarmonyPostfix]
|
||||||
|
private static void SwitchAward(AdvantureMissionMenu __instance)
|
||||||
|
{
|
||||||
|
foreach(TextMeshProUGUI text in __instance.contant.GetComponentsInChildren<TextMeshProUGUI>())
|
||||||
|
{
|
||||||
|
text.text = StringStore.TranslateColorText(text.text);
|
||||||
|
}
|
||||||
|
|
||||||
|
//foreach (TextMeshProUGUI text in __instance.GetComponentsInChildren<TextMeshProUGUI>())
|
||||||
|
//{
|
||||||
|
// text.text = StringStore.TranslateText(text.text);
|
||||||
|
//}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,61 @@
|
||||||
|
using HarmonyLib;
|
||||||
|
using Il2Cpp;
|
||||||
|
using Il2CppTMPro;
|
||||||
|
using PvZ_Fusion_Translator.AssetStore;
|
||||||
|
|
||||||
|
namespace PvZ_Fusion_Translator.Patches.Modes.Starbound
|
||||||
|
{
|
||||||
|
[HarmonyPatch(typeof(AdvantureStarMenu))]
|
||||||
|
public static class AdvantureStarMenu_Patch
|
||||||
|
{
|
||||||
|
[HarmonyPatch(nameof(AdvantureStarMenu.Awake))]
|
||||||
|
[HarmonyPostfix]
|
||||||
|
private static void Awake(AdvantureStarMenu __instance)
|
||||||
|
{
|
||||||
|
foreach(TextMeshProUGUI text in __instance.GetComponentsInChildren<TextMeshProUGUI>())
|
||||||
|
{
|
||||||
|
text.text = StringStore.TranslateText(text.text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[HarmonyPatch(nameof(AdvantureStarMenu.GetNodes))]
|
||||||
|
[HarmonyPostfix]
|
||||||
|
private static void GetNodes(AdvantureStarMenu __instance)
|
||||||
|
{
|
||||||
|
foreach (TextMeshProUGUI text in __instance.GetComponentsInChildren<TextMeshProUGUI>())
|
||||||
|
{
|
||||||
|
text.text = StringStore.TranslateText(text.text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[HarmonyPatch(nameof(AdvantureStarMenu.UpdateStarText))]
|
||||||
|
[HarmonyPostfix]
|
||||||
|
private static void UpdateStarText(AdvantureStarMenu __instance)
|
||||||
|
{
|
||||||
|
foreach (TextMeshProUGUI text in __instance.GetComponentsInChildren<TextMeshProUGUI>())
|
||||||
|
{
|
||||||
|
text.text = StringStore.TranslateText(text.text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[HarmonyPatch(nameof(AdvantureStarMenu.InitTalents))]
|
||||||
|
[HarmonyPostfix]
|
||||||
|
private static void InitTalents(AdvantureStarMenu __instance)
|
||||||
|
{
|
||||||
|
foreach (TextMeshProUGUI text in __instance.GetComponentsInChildren<TextMeshProUGUI>())
|
||||||
|
{
|
||||||
|
text.text = StringStore.TranslateText(text.text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[HarmonyPatch(nameof(AdvantureStarMenu.ResetAward))]
|
||||||
|
[HarmonyPostfix]
|
||||||
|
private static void ResetAward(AdvantureStarMenu __instance)
|
||||||
|
{
|
||||||
|
foreach (TextMeshProUGUI text in __instance.GetComponentsInChildren<TextMeshProUGUI>())
|
||||||
|
{
|
||||||
|
text.text = StringStore.TranslateText(text.text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -402,7 +402,17 @@
|
||||||
<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\AbyssBuffMenu_Patch.cs" />
|
<Compile Include="Patches\Modes\Abyss\AbyssBuffMenu_Patch.cs" />
|
||||||
|
<Compile Include="Patches\Modes\Odyssey\TravelInvestMenu_Patch.cs" />
|
||||||
|
<Compile Include="Patches\Modes\Odyssey\SynergyDisplay_Patch.cs" />
|
||||||
|
<Compile Include="Patches\Modes\Odyssey\TravelStoreWindow_Patch.cs" />
|
||||||
|
<Compile Include="Patches\Modes\Odyssey\TravelSynergyMenu_Patch.cs" />
|
||||||
|
<Compile Include="Patches\Modes\Starbound\AdvantureEvolutionMenu_Patch.cs" />
|
||||||
|
<Compile Include="Patches\Modes\Starbound\AdvantureStarMenu_Patch.cs" />
|
||||||
|
<Compile Include="Patches\Modes\Starbound\AdvantureMissionMenu_Patch.cs" />
|
||||||
|
<Compile Include="Patches\Modes\Starbound\AdvantureHelpMenu_Patch.cs" />
|
||||||
|
<Compile Include="Patches\Modes\Starbound\AdvantureMenu2_Patch.cs" />
|
||||||
|
<Compile Include="Patches\Modes\Starbound\AdvantureMenu_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\AlmanacZombieWindow_Patch.cs" />
|
<Compile Include="Patches\GameObjects\AlmanacZombieWindow_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\AlmanacZombieMenu_Patch.cs" />
|
<Compile Include="Patches\GameObjects\AlmanacZombieMenu_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\AlmanacPlantMenu_Patch.cs" />
|
<Compile Include="Patches\GameObjects\AlmanacPlantMenu_Patch.cs" />
|
||||||
|
|
@ -419,76 +429,76 @@
|
||||||
<Compile Include="Patches\GameObjects\ButtonObjects\BackToIndex_Patch.cs" />
|
<Compile Include="Patches\GameObjects\ButtonObjects\BackToIndex_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\ButtonObjects\UIBtn_Patch.cs" />
|
<Compile Include="Patches\GameObjects\ButtonObjects\UIBtn_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\ExploreMakeMenu_Patch.cs" />
|
<Compile Include="Patches\GameObjects\ExploreMakeMenu_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\AbyssSelectBuffWindow_Patch.cs" />
|
<Compile Include="Patches\Modes\Abyss\AbyssSelectBuffWindow_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\SpriteRenderer_Patch.cs" />
|
<Compile Include="Patches\GameObjects\SpriteRenderer_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\Board_Patch.cs" />
|
<Compile Include="Patches\GameObjects\Board_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\ButtonObjects\MainMenu_Btn_Patch.cs" />
|
<Compile Include="Patches\GameObjects\ButtonObjects\MainMenu_Btn_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\MinorObjects\TreasureMoney_Patch.cs" />
|
<Compile Include="Patches\GameObjects\MinorObjects\TreasureMoney_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\PlantInfoWindow_Patch.cs" />
|
<Compile Include="Patches\GameObjects\PlantInfoWindow_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\GardenCard_Patch.cs" />
|
<Compile Include="Patches\Modes\Harvest\GardenCard_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\MinorObjects\UIProgress2_Patch.cs" />
|
<Compile Include="Patches\GameObjects\MinorObjects\UIProgress2_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\MinorObjects\Jigsaw_Patch.cs" />
|
<Compile Include="Patches\GameObjects\MinorObjects\Jigsaw_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\ExploreEnterWindow_Patch.cs" />
|
<Compile Include="Patches\GameObjects\ExploreEnterWindow_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\PlayerShootingWindow_Patch.cs" />
|
<Compile Include="Patches\GameObjects\PlayerShootingWindow_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\PlayerShootingMenu_Patch.cs" />
|
<Compile Include="Patches\GameObjects\PlayerShootingMenu_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\GardenBagMenu_Patch.cs" />
|
<Compile Include="Patches\Modes\Harvest\GardenBagMenu_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\ExploreMenu_Patch.cs" />
|
<Compile Include="Patches\GameObjects\ExploreMenu_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\SeedLibrary_Patch.cs" />
|
<Compile Include="Patches\GameObjects\SeedLibrary_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\TreasureEquipmentMenu_Patch.cs" />
|
<Compile Include="Patches\Modes\Harvest\TreasureEquipmentMenu_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\TreasureConfirmMenu_Patch.cs" />
|
<Compile Include="Patches\Modes\Harvest\TreasureConfirmMenu_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\TreasureEvacuateMenu_Patch.cs" />
|
<Compile Include="Patches\Modes\Harvest\TreasureEvacuateMenu_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\TreasureUpgradeMenu_Patch.cs" />
|
<Compile Include="Patches\Modes\Harvest\TreasureUpgradeMenu_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\TreasureStoreMenu_Patch.cs" />
|
<Compile Include="Patches\Modes\Harvest\TreasureStoreMenu_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\TreasureWarehouseMenu_Patch.cs" />
|
<Compile Include="Patches\Modes\Harvest\TreasureWarehouseMenu_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\TreasureMainMenu_Patch.cs" />
|
<Compile Include="Patches\Modes\Harvest\TreasureMainMenu_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" />
|
||||||
<Compile Include="Patches\GameObjects\CrisisZombieWindow_Patch.cs" />
|
<Compile Include="Patches\GameObjects\CrisisZombieWindow_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\RogueStartMenu_Patch.cs" />
|
<Compile Include="Patches\GameObjects\RogueStartMenu_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\AbyssBagMenu_Patch.cs" />
|
<Compile Include="Patches\Modes\Abyss\AbyssBagMenu_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\AbyssCheckInBag_Patch.cs" />
|
<Compile Include="Patches\Modes\Abyss\AbyssCheckInBag_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\AbyssStoreMenu_Patch.cs" />
|
<Compile Include="Patches\Modes\Abyss\AbyssStoreMenu_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\AbyssSettlementMenu_Patch.cs" />
|
<Compile Include="Patches\Modes\Abyss\AbyssSettlementMenu_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\ButtonObjects\NormalBtn_Patch.cs" />
|
<Compile Include="Patches\GameObjects\ButtonObjects\NormalBtn_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\ButtonObjects\UIButton_Patch.cs" />
|
<Compile Include="Patches\GameObjects\ButtonObjects\UIButton_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\MinorObjects\TrainingDummy_Patch.cs" />
|
<Compile Include="Patches\GameObjects\MinorObjects\TrainingDummy_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\MinorObjects\UltimateChomper_Patch.cs" />
|
<Compile Include="Patches\GameObjects\MinorObjects\UltimateChomper_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\OtherMenu_Patch.cs" />
|
<Compile Include="Patches\GameObjects\OtherMenu_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\ButtonObjects\AbyssCheckSellMenu_Patch.cs" />
|
<Compile Include="Patches\Modes\Abyss\AbyssCheckSellMenu_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\ButtonObjects\AbyssBuffButton_Patch.cs" />
|
<Compile Include="Patches\Modes\Abyss\AbyssBuffButton_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\ButtonObjects\AbyssLevelEnter_Patch.cs" />
|
<Compile Include="Patches\Modes\Abyss\AbyssLevelEnter_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\BaseMenu_Patch.cs" />
|
<Compile Include="Patches\GameObjects\BaseMenu_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\ButtonObjects\CustomLevelEnter_Patch.cs" />
|
<Compile Include="Patches\GameObjects\ButtonObjects\CustomLevelEnter_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\ButtonObjects\SaveMenuBtn_Patch.cs" />
|
<Compile Include="Patches\GameObjects\ButtonObjects\SaveMenuBtn_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\MainMenu_Patch.cs" />
|
<Compile Include="Patches\GameObjects\MainMenu_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\MinorObjects\AbyssGoods_Patch.cs" />
|
<Compile Include="Patches\Modes\Abyss\AbyssGoods_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\MinorObjects\DY_Patch.cs" />
|
<Compile Include="Patches\GameObjects\MinorObjects\DY_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\MinorObjects\LanternUmbrella_Patch.cs" />
|
<Compile Include="Patches\GameObjects\MinorObjects\LanternUmbrella_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\MinorObjects\MagnetBox_Patch.cs" />
|
<Compile Include="Patches\GameObjects\MinorObjects\MagnetBox_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\MinorObjects\MagnetInterface_Patch.cs" />
|
<Compile Include="Patches\GameObjects\MinorObjects\MagnetInterface_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\MinorObjects\Money_Patch.cs" />
|
<Compile Include="Patches\GameObjects\MinorObjects\Money_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\AbyssDevelopMenu_Patch.cs" />
|
<Compile Include="Patches\Modes\Abyss\AbyssDevelopMenu_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\AbyssMenu2_Patch.cs" />
|
<Compile Include="Patches\Modes\Abyss\AbyssMenu2_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\AbyssMenu_Patch.cs" />
|
<Compile Include="Patches\Modes\Abyss\AbyssMenu_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\TravelBuffMenu_Patch.cs" />
|
<Compile Include="Patches\Modes\Odyssey\TravelBuffMenu_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\TowerUpgradeMenu_Patch.cs" />
|
<Compile Include="Patches\GameObjects\TowerUpgradeMenu_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\TowerOption_Patch.cs" />
|
<Compile Include="Patches\GameObjects\TowerOption_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\TravelLookBuff_Patch.cs" />
|
<Compile Include="Patches\Modes\Odyssey\TravelLookBuff_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\ShootingMenu_Patch.cs" />
|
<Compile Include="Patches\GameObjects\ShootingMenu_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\TravelLookMenu_Patch.cs" />
|
<Compile Include="Patches\Modes\Odyssey\TravelLookMenu_Patch.cs" />
|
||||||
<Compile Include="Patches\Managers\AbyssBuffData_Patch.cs" />
|
<Compile Include="Patches\Modes\Abyss\AbyssBuffData_Patch.cs" />
|
||||||
<Compile Include="Patches\Managers\AbyssInfo_Patch.cs" />
|
<Compile Include="Patches\Modes\Abyss\AbyssInfo_Patch.cs" />
|
||||||
<Compile Include="Patches\Managers\ChessManager_Patch.cs" />
|
<Compile Include="Patches\Managers\ChessManager_Patch.cs" />
|
||||||
<Compile Include="Patches\Managers\CustomLevelShower_Patch.cs" />
|
<Compile Include="Patches\Managers\CustomLevelShower_Patch.cs" />
|
||||||
<Compile Include="Patches\Managers\Garden_Patch.cs" />
|
<Compile Include="Patches\Managers\Garden_Patch.cs" />
|
||||||
<Compile Include="Patches\Managers\DrawCardManager_Patch.cs" />
|
<Compile Include="Patches\Managers\DrawCardManager_Patch.cs" />
|
||||||
<Compile Include="Patches\Managers\CanvasUpUI_Patch.cs" />
|
<Compile Include="Patches\Managers\CanvasUpUI_Patch.cs" />
|
||||||
<Compile Include="Patches\Managers\TravelMgr_Patch.cs" />
|
<Compile Include="Patches\Modes\Odyssey\TravelMgr_Patch.cs" />
|
||||||
<Compile Include="Patches\Managers\TreasureManager_Patch.cs" />
|
<Compile Include="Patches\Modes\Harvest\TreasureManager_Patch.cs" />
|
||||||
<Compile Include="Patches\Managers\TowerManager_Patch.cs" />
|
<Compile Include="Patches\Managers\TowerManager_Patch.cs" />
|
||||||
<Compile Include="Patches\Managers\SaveMenu_Patch.cs" />
|
<Compile Include="Patches\Managers\SaveMenu_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\TravelBuffOptionButton_Patch.cs" />
|
<Compile Include="Patches\Modes\Odyssey\TravelBuffOptionButton_Patch.cs" />
|
||||||
<Compile Include="Patches\OtherManagers\AchievementClip_Patch.cs" />
|
<Compile Include="Patches\OtherManagers\AchievementClip_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\ButtonObjects\Advanture_Btn_Patch.cs" />
|
<Compile Include="Patches\GameObjects\ButtonObjects\Advanture_Btn_Patch.cs" />
|
||||||
<Compile Include="Patches\Managers\AlmanacMgrZombie_Patch.cs" />
|
<Compile Include="Patches\Managers\AlmanacMgrZombie_Patch.cs" />
|
||||||
|
|
@ -514,10 +524,10 @@
|
||||||
<Compile Include="Patches\BaseTextObjects\TextMeshPro_Patch.cs" />
|
<Compile Include="Patches\BaseTextObjects\TextMeshPro_Patch.cs" />
|
||||||
<Compile Include="Patches\BaseTextObjects\TextMeshProUGUI_Patch.cs" />
|
<Compile Include="Patches\BaseTextObjects\TextMeshProUGUI_Patch.cs" />
|
||||||
<Compile Include="Patches\BaseTextObjects\TMP_InputField_Patch.cs" />
|
<Compile Include="Patches\BaseTextObjects\TMP_InputField_Patch.cs" />
|
||||||
<Compile Include="Patches\Managers\TravelBuffMgr_Patch.cs" />
|
<Compile Include="Patches\Modes\Odyssey\TravelBuffMgr_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\TravelBuff_Patch.cs" />
|
<Compile Include="Patches\Modes\Odyssey\TravelBuff_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\TravelRefresh_Patch.cs" />
|
<Compile Include="Patches\Modes\Odyssey\TravelRefresh_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\TravelStore_Patch.cs" />
|
<Compile Include="Patches\Modes\Odyssey\TravelStore_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\UIDifficulty_Patch.cs" />
|
<Compile Include="Patches\GameObjects\UIDifficulty_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\UIZombieNum_Patch.cs" />
|
<Compile Include="Patches\GameObjects\UIZombieNum_Patch.cs" />
|
||||||
<Compile Include="Patches\GameObjects\MinorObjects\Plant_Patch.cs" />
|
<Compile Include="Patches\GameObjects\MinorObjects\Plant_Patch.cs" />
|
||||||
|
|
|
||||||
|
|
@ -346,10 +346,17 @@ namespace PvZ_Fusion_Translator
|
||||||
public static bool CheckForUntranslatedText(string text)
|
public static bool CheckForUntranslatedText(string text)
|
||||||
{
|
{
|
||||||
Regex regex = new("\\p{IsCJKUnifiedIdeographs}+");
|
Regex regex = new("\\p{IsCJKUnifiedIdeographs}+");
|
||||||
|
try
|
||||||
|
{
|
||||||
Match match = regex.Match(text);
|
Match match = regex.Match(text);
|
||||||
|
|
||||||
return match.Success;
|
return match.Success;
|
||||||
}
|
}
|
||||||
|
catch(Exception e)
|
||||||
|
{
|
||||||
|
Log.LogError(e);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
#if MULTI_LANGUAGE
|
#if MULTI_LANGUAGE
|
||||||
internal static void ChangeLanguage(string language)
|
internal static void ChangeLanguage(string language)
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
# Visual Studio Version 17
|
# Visual Studio Version 17
|
||||||
VisualStudioVersion = 17.10.35122.118
|
VisualStudioVersion = 17.10.35122.118
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PvZ Fusion Translator [MelonLoader]", "MelonLoader\PvZ Fusion Translator [MelonLoader].csproj", "{90AA30F8-EFE7-6E1A-3859-0EE79252222A}"
|
|
||||||
EndProject
|
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{8EC462FD-D22E-90A8-E5CE-7E832BA40C5D}"
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{8EC462FD-D22E-90A8-E5CE-7E832BA40C5D}"
|
||||||
ProjectSection(SolutionItems) = preProject
|
ProjectSection(SolutionItems) = preProject
|
||||||
README.md = README.md
|
README.md = README.md
|
||||||
|
|
@ -12,6 +10,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PvZ Fusion Translator [BepInEx]", "BepInEx\PvZ Fusion Translator [BepInEx].csproj", "{395E60A0-A884-61F2-EF18-BC94BB7D9C69}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PvZ Fusion Translator [BepInEx]", "BepInEx\PvZ Fusion Translator [BepInEx].csproj", "{395E60A0-A884-61F2-EF18-BC94BB7D9C69}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PvZ Fusion Translator [MelonLoader]", "MelonLoader\PvZ Fusion Translator [MelonLoader].csproj", "{A058E167-7411-D3CA-0C9F-40F030C12860}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
|
@ -40,54 +40,6 @@ Global
|
||||||
ReleaseOther|x64 = ReleaseOther|x64
|
ReleaseOther|x64 = ReleaseOther|x64
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
{90AA30F8-EFE7-6E1A-3859-0EE79252222A}.Debug|Any CPU.ActiveCfg = Debug|x64
|
|
||||||
{90AA30F8-EFE7-6E1A-3859-0EE79252222A}.Debug|Any CPU.Build.0 = Debug|x64
|
|
||||||
{90AA30F8-EFE7-6E1A-3859-0EE79252222A}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
|
||||||
{90AA30F8-EFE7-6E1A-3859-0EE79252222A}.Debug|ARM64.Build.0 = Debug|ARM64
|
|
||||||
{90AA30F8-EFE7-6E1A-3859-0EE79252222A}.Debug|x64.ActiveCfg = Debug|x64
|
|
||||||
{90AA30F8-EFE7-6E1A-3859-0EE79252222A}.Debug|x64.Build.0 = Debug|x64
|
|
||||||
{90AA30F8-EFE7-6E1A-3859-0EE79252222A}.DebugEnglish|Any CPU.ActiveCfg = DebugEnglish|x64
|
|
||||||
{90AA30F8-EFE7-6E1A-3859-0EE79252222A}.DebugEnglish|Any CPU.Build.0 = DebugEnglish|x64
|
|
||||||
{90AA30F8-EFE7-6E1A-3859-0EE79252222A}.DebugEnglish|ARM64.ActiveCfg = DebugEnglish|ARM64
|
|
||||||
{90AA30F8-EFE7-6E1A-3859-0EE79252222A}.DebugEnglish|ARM64.Build.0 = DebugEnglish|ARM64
|
|
||||||
{90AA30F8-EFE7-6E1A-3859-0EE79252222A}.DebugEnglish|x64.ActiveCfg = DebugEnglish|x64
|
|
||||||
{90AA30F8-EFE7-6E1A-3859-0EE79252222A}.DebugEnglish|x64.Build.0 = DebugEnglish|x64
|
|
||||||
{90AA30F8-EFE7-6E1A-3859-0EE79252222A}.DebugObfuscate|Any CPU.ActiveCfg = Debug|x64
|
|
||||||
{90AA30F8-EFE7-6E1A-3859-0EE79252222A}.DebugObfuscate|Any CPU.Build.0 = Debug|x64
|
|
||||||
{90AA30F8-EFE7-6E1A-3859-0EE79252222A}.DebugObfuscate|ARM64.ActiveCfg = DebugObfuscate|ARM64
|
|
||||||
{90AA30F8-EFE7-6E1A-3859-0EE79252222A}.DebugObfuscate|ARM64.Build.0 = DebugObfuscate|ARM64
|
|
||||||
{90AA30F8-EFE7-6E1A-3859-0EE79252222A}.DebugObfuscate|x64.ActiveCfg = DebugObfuscate|x64
|
|
||||||
{90AA30F8-EFE7-6E1A-3859-0EE79252222A}.DebugObfuscate|x64.Build.0 = DebugObfuscate|x64
|
|
||||||
{90AA30F8-EFE7-6E1A-3859-0EE79252222A}.DebugTesting|Any CPU.ActiveCfg = DebugTesting|Any CPU
|
|
||||||
{90AA30F8-EFE7-6E1A-3859-0EE79252222A}.DebugTesting|Any CPU.Build.0 = DebugTesting|Any CPU
|
|
||||||
{90AA30F8-EFE7-6E1A-3859-0EE79252222A}.DebugTesting|ARM64.ActiveCfg = DebugTesting|ARM64
|
|
||||||
{90AA30F8-EFE7-6E1A-3859-0EE79252222A}.DebugTesting|ARM64.Build.0 = DebugTesting|ARM64
|
|
||||||
{90AA30F8-EFE7-6E1A-3859-0EE79252222A}.DebugTesting|x64.ActiveCfg = DebugTesting|x64
|
|
||||||
{90AA30F8-EFE7-6E1A-3859-0EE79252222A}.DebugTesting|x64.Build.0 = DebugTesting|x64
|
|
||||||
{90AA30F8-EFE7-6E1A-3859-0EE79252222A}.ReleaseEnglish|Any CPU.ActiveCfg = ReleaseEnglish|Any CPU
|
|
||||||
{90AA30F8-EFE7-6E1A-3859-0EE79252222A}.ReleaseEnglish|Any CPU.Build.0 = ReleaseEnglish|Any CPU
|
|
||||||
{90AA30F8-EFE7-6E1A-3859-0EE79252222A}.ReleaseEnglish|ARM64.ActiveCfg = ReleaseEnglish|ARM64
|
|
||||||
{90AA30F8-EFE7-6E1A-3859-0EE79252222A}.ReleaseEnglish|ARM64.Build.0 = ReleaseEnglish|ARM64
|
|
||||||
{90AA30F8-EFE7-6E1A-3859-0EE79252222A}.ReleaseEnglish|x64.ActiveCfg = ReleaseEnglish|x64
|
|
||||||
{90AA30F8-EFE7-6E1A-3859-0EE79252222A}.ReleaseEnglish|x64.Build.0 = ReleaseEnglish|x64
|
|
||||||
{90AA30F8-EFE7-6E1A-3859-0EE79252222A}.ReleaseMulti|Any CPU.ActiveCfg = ReleaseMulti|Any CPU
|
|
||||||
{90AA30F8-EFE7-6E1A-3859-0EE79252222A}.ReleaseMulti|Any CPU.Build.0 = ReleaseMulti|Any CPU
|
|
||||||
{90AA30F8-EFE7-6E1A-3859-0EE79252222A}.ReleaseMulti|ARM64.ActiveCfg = ReleaseMulti|ARM64
|
|
||||||
{90AA30F8-EFE7-6E1A-3859-0EE79252222A}.ReleaseMulti|ARM64.Build.0 = ReleaseMulti|ARM64
|
|
||||||
{90AA30F8-EFE7-6E1A-3859-0EE79252222A}.ReleaseMulti|x64.ActiveCfg = ReleaseMulti|x64
|
|
||||||
{90AA30F8-EFE7-6E1A-3859-0EE79252222A}.ReleaseMulti|x64.Build.0 = ReleaseMulti|x64
|
|
||||||
{90AA30F8-EFE7-6E1A-3859-0EE79252222A}.ReleaseObfuscate|Any CPU.ActiveCfg = ReleaseObfuscate|Any CPU
|
|
||||||
{90AA30F8-EFE7-6E1A-3859-0EE79252222A}.ReleaseObfuscate|Any CPU.Build.0 = ReleaseObfuscate|Any CPU
|
|
||||||
{90AA30F8-EFE7-6E1A-3859-0EE79252222A}.ReleaseObfuscate|ARM64.ActiveCfg = ReleaseObfuscate|ARM64
|
|
||||||
{90AA30F8-EFE7-6E1A-3859-0EE79252222A}.ReleaseObfuscate|ARM64.Build.0 = ReleaseObfuscate|ARM64
|
|
||||||
{90AA30F8-EFE7-6E1A-3859-0EE79252222A}.ReleaseObfuscate|x64.ActiveCfg = ReleaseObfuscate|x64
|
|
||||||
{90AA30F8-EFE7-6E1A-3859-0EE79252222A}.ReleaseObfuscate|x64.Build.0 = ReleaseObfuscate|x64
|
|
||||||
{90AA30F8-EFE7-6E1A-3859-0EE79252222A}.ReleaseOther|Any CPU.ActiveCfg = ReleaseOther|Any CPU
|
|
||||||
{90AA30F8-EFE7-6E1A-3859-0EE79252222A}.ReleaseOther|Any CPU.Build.0 = ReleaseOther|Any CPU
|
|
||||||
{90AA30F8-EFE7-6E1A-3859-0EE79252222A}.ReleaseOther|ARM64.ActiveCfg = ReleaseOther|ARM64
|
|
||||||
{90AA30F8-EFE7-6E1A-3859-0EE79252222A}.ReleaseOther|ARM64.Build.0 = ReleaseOther|ARM64
|
|
||||||
{90AA30F8-EFE7-6E1A-3859-0EE79252222A}.ReleaseOther|x64.ActiveCfg = ReleaseOther|x64
|
|
||||||
{90AA30F8-EFE7-6E1A-3859-0EE79252222A}.ReleaseOther|x64.Build.0 = ReleaseOther|x64
|
|
||||||
{395E60A0-A884-61F2-EF18-BC94BB7D9C69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{395E60A0-A884-61F2-EF18-BC94BB7D9C69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{395E60A0-A884-61F2-EF18-BC94BB7D9C69}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{395E60A0-A884-61F2-EF18-BC94BB7D9C69}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{395E60A0-A884-61F2-EF18-BC94BB7D9C69}.Debug|ARM64.ActiveCfg = Debug|Any CPU
|
{395E60A0-A884-61F2-EF18-BC94BB7D9C69}.Debug|ARM64.ActiveCfg = Debug|Any CPU
|
||||||
|
|
@ -136,6 +88,54 @@ Global
|
||||||
{395E60A0-A884-61F2-EF18-BC94BB7D9C69}.ReleaseOther|ARM64.Build.0 = ReleaseOther|Any CPU
|
{395E60A0-A884-61F2-EF18-BC94BB7D9C69}.ReleaseOther|ARM64.Build.0 = ReleaseOther|Any CPU
|
||||||
{395E60A0-A884-61F2-EF18-BC94BB7D9C69}.ReleaseOther|x64.ActiveCfg = ReleaseOther|x64
|
{395E60A0-A884-61F2-EF18-BC94BB7D9C69}.ReleaseOther|x64.ActiveCfg = ReleaseOther|x64
|
||||||
{395E60A0-A884-61F2-EF18-BC94BB7D9C69}.ReleaseOther|x64.Build.0 = ReleaseOther|x64
|
{395E60A0-A884-61F2-EF18-BC94BB7D9C69}.ReleaseOther|x64.Build.0 = ReleaseOther|x64
|
||||||
|
{A058E167-7411-D3CA-0C9F-40F030C12860}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{A058E167-7411-D3CA-0C9F-40F030C12860}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{A058E167-7411-D3CA-0C9F-40F030C12860}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||||
|
{A058E167-7411-D3CA-0C9F-40F030C12860}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||||
|
{A058E167-7411-D3CA-0C9F-40F030C12860}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{A058E167-7411-D3CA-0C9F-40F030C12860}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{A058E167-7411-D3CA-0C9F-40F030C12860}.DebugEnglish|Any CPU.ActiveCfg = DebugEnglish|Any CPU
|
||||||
|
{A058E167-7411-D3CA-0C9F-40F030C12860}.DebugEnglish|Any CPU.Build.0 = DebugEnglish|Any CPU
|
||||||
|
{A058E167-7411-D3CA-0C9F-40F030C12860}.DebugEnglish|ARM64.ActiveCfg = DebugEnglish|ARM64
|
||||||
|
{A058E167-7411-D3CA-0C9F-40F030C12860}.DebugEnglish|ARM64.Build.0 = DebugEnglish|ARM64
|
||||||
|
{A058E167-7411-D3CA-0C9F-40F030C12860}.DebugEnglish|x64.ActiveCfg = DebugEnglish|x64
|
||||||
|
{A058E167-7411-D3CA-0C9F-40F030C12860}.DebugEnglish|x64.Build.0 = DebugEnglish|x64
|
||||||
|
{A058E167-7411-D3CA-0C9F-40F030C12860}.DebugObfuscate|Any CPU.ActiveCfg = DebugObfuscate|Any CPU
|
||||||
|
{A058E167-7411-D3CA-0C9F-40F030C12860}.DebugObfuscate|Any CPU.Build.0 = DebugObfuscate|Any CPU
|
||||||
|
{A058E167-7411-D3CA-0C9F-40F030C12860}.DebugObfuscate|ARM64.ActiveCfg = DebugObfuscate|ARM64
|
||||||
|
{A058E167-7411-D3CA-0C9F-40F030C12860}.DebugObfuscate|ARM64.Build.0 = DebugObfuscate|ARM64
|
||||||
|
{A058E167-7411-D3CA-0C9F-40F030C12860}.DebugObfuscate|x64.ActiveCfg = DebugObfuscate|x64
|
||||||
|
{A058E167-7411-D3CA-0C9F-40F030C12860}.DebugObfuscate|x64.Build.0 = DebugObfuscate|x64
|
||||||
|
{A058E167-7411-D3CA-0C9F-40F030C12860}.DebugTesting|Any CPU.ActiveCfg = DebugTesting|Any CPU
|
||||||
|
{A058E167-7411-D3CA-0C9F-40F030C12860}.DebugTesting|Any CPU.Build.0 = DebugTesting|Any CPU
|
||||||
|
{A058E167-7411-D3CA-0C9F-40F030C12860}.DebugTesting|ARM64.ActiveCfg = DebugTesting|ARM64
|
||||||
|
{A058E167-7411-D3CA-0C9F-40F030C12860}.DebugTesting|ARM64.Build.0 = DebugTesting|ARM64
|
||||||
|
{A058E167-7411-D3CA-0C9F-40F030C12860}.DebugTesting|x64.ActiveCfg = DebugTesting|x64
|
||||||
|
{A058E167-7411-D3CA-0C9F-40F030C12860}.DebugTesting|x64.Build.0 = DebugTesting|x64
|
||||||
|
{A058E167-7411-D3CA-0C9F-40F030C12860}.ReleaseEnglish|Any CPU.ActiveCfg = ReleaseEnglish|Any CPU
|
||||||
|
{A058E167-7411-D3CA-0C9F-40F030C12860}.ReleaseEnglish|Any CPU.Build.0 = ReleaseEnglish|Any CPU
|
||||||
|
{A058E167-7411-D3CA-0C9F-40F030C12860}.ReleaseEnglish|ARM64.ActiveCfg = ReleaseEnglish|ARM64
|
||||||
|
{A058E167-7411-D3CA-0C9F-40F030C12860}.ReleaseEnglish|ARM64.Build.0 = ReleaseEnglish|ARM64
|
||||||
|
{A058E167-7411-D3CA-0C9F-40F030C12860}.ReleaseEnglish|x64.ActiveCfg = ReleaseEnglish|x64
|
||||||
|
{A058E167-7411-D3CA-0C9F-40F030C12860}.ReleaseEnglish|x64.Build.0 = ReleaseEnglish|x64
|
||||||
|
{A058E167-7411-D3CA-0C9F-40F030C12860}.ReleaseMulti|Any CPU.ActiveCfg = ReleaseMulti|Any CPU
|
||||||
|
{A058E167-7411-D3CA-0C9F-40F030C12860}.ReleaseMulti|Any CPU.Build.0 = ReleaseMulti|Any CPU
|
||||||
|
{A058E167-7411-D3CA-0C9F-40F030C12860}.ReleaseMulti|ARM64.ActiveCfg = ReleaseMulti|ARM64
|
||||||
|
{A058E167-7411-D3CA-0C9F-40F030C12860}.ReleaseMulti|ARM64.Build.0 = ReleaseMulti|ARM64
|
||||||
|
{A058E167-7411-D3CA-0C9F-40F030C12860}.ReleaseMulti|x64.ActiveCfg = ReleaseMulti|x64
|
||||||
|
{A058E167-7411-D3CA-0C9F-40F030C12860}.ReleaseMulti|x64.Build.0 = ReleaseMulti|x64
|
||||||
|
{A058E167-7411-D3CA-0C9F-40F030C12860}.ReleaseObfuscate|Any CPU.ActiveCfg = ReleaseObfuscate|Any CPU
|
||||||
|
{A058E167-7411-D3CA-0C9F-40F030C12860}.ReleaseObfuscate|Any CPU.Build.0 = ReleaseObfuscate|Any CPU
|
||||||
|
{A058E167-7411-D3CA-0C9F-40F030C12860}.ReleaseObfuscate|ARM64.ActiveCfg = ReleaseObfuscate|ARM64
|
||||||
|
{A058E167-7411-D3CA-0C9F-40F030C12860}.ReleaseObfuscate|ARM64.Build.0 = ReleaseObfuscate|ARM64
|
||||||
|
{A058E167-7411-D3CA-0C9F-40F030C12860}.ReleaseObfuscate|x64.ActiveCfg = ReleaseObfuscate|x64
|
||||||
|
{A058E167-7411-D3CA-0C9F-40F030C12860}.ReleaseObfuscate|x64.Build.0 = ReleaseObfuscate|x64
|
||||||
|
{A058E167-7411-D3CA-0C9F-40F030C12860}.ReleaseOther|Any CPU.ActiveCfg = ReleaseOther|Any CPU
|
||||||
|
{A058E167-7411-D3CA-0C9F-40F030C12860}.ReleaseOther|Any CPU.Build.0 = ReleaseOther|Any CPU
|
||||||
|
{A058E167-7411-D3CA-0C9F-40F030C12860}.ReleaseOther|ARM64.ActiveCfg = ReleaseOther|ARM64
|
||||||
|
{A058E167-7411-D3CA-0C9F-40F030C12860}.ReleaseOther|ARM64.Build.0 = ReleaseOther|ARM64
|
||||||
|
{A058E167-7411-D3CA-0C9F-40F030C12860}.ReleaseOther|x64.ActiveCfg = ReleaseOther|x64
|
||||||
|
{A058E167-7411-D3CA-0C9F-40F030C12860}.ReleaseOther|x64.Build.0 = ReleaseOther|x64
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue