Skip to content

Commit

Permalink
v0.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
ArifRios1st committed Oct 10, 2024
1 parent 8f2a3eb commit ef7f33a
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 12 deletions.
8 changes: 4 additions & 4 deletions AssetStore/StringStore.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#if USE_TRANSLATE
using Il2CppTMPro;
using Il2CppTMPro;
using MelonLoader;
using UnityEngine;
using Il2Cpp;
using System.Text.RegularExpressions;

namespace PVZ_Hyper_Fusion.AssetStore
{
#if USE_TRANSLATE
public static class StringStore
{
internal static Dictionary<string, string> stringsDict = new Dictionary<string, string>();
Expand Down Expand Up @@ -507,5 +507,5 @@ public static void LogAll()
Log.LogInfo("String Entries: {0}", translationString.Count);
}
}
}
#endif
#endif
}
8 changes: 4 additions & 4 deletions AssetStore/TextureStore.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#if USE_TEXTURE
using System.Collections;
using System.Collections;
using UnityEngine;

namespace PVZ_Hyper_Fusion.AssetStore
{
#if USE_TEXTURE
public static class TextureStore
{
internal static Dictionary<string, string> textureDict = new Dictionary<string, string>();
Expand Down Expand Up @@ -49,5 +49,5 @@ public static void LogAll()
}
}
}
}
#endif
#endif
}
2 changes: 1 addition & 1 deletion Core.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using Il2CppTMPro;
using PVZ_Hyper_Fusion.AssetStore;

[assembly: MelonInfo(typeof(PVZ_Hyper_Fusion.Core), "PVZ Hyper Fusion", "0.0.2", "arifrios1st", null)]
[assembly: MelonInfo(typeof(PVZ_Hyper_Fusion.Core), "PVZ Hyper Fusion", "0.0.3", "arifrios1st", null)]
[assembly: MelonGame("LanPiaoPiao", "PlantsVsZombiesRH")]

namespace PVZ_Hyper_Fusion
Expand Down
4 changes: 2 additions & 2 deletions FileLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,15 @@ internal static void SaveStrings()
string translationStringRegex = JsonSerializer.Serialize(StringStore.translationStringRegex, new JsonSerializerOptions
{
WriteIndented = true,
Encoder = JavaScriptEncoder.Create(UnicodeRanges.All)
Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping
});

File.WriteAllText(Path.Combine(stringDir, "translation_regexs.json"), translationStringRegex);

string translationString = JsonSerializer.Serialize(StringStore.translationString, new JsonSerializerOptions
{
WriteIndented = true,
Encoder = JavaScriptEncoder.Create(UnicodeRanges.All)
Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping
});

File.WriteAllText(Path.Combine(stringDir, "translation_strings.json"), translationString);
Expand Down
4 changes: 3 additions & 1 deletion Patches/IZEMgr_Patch.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using HarmonyLib;
#if USE_TRANSLATE
using HarmonyLib;
using Il2Cpp;
using Il2CppTMPro;
using PVZ_Hyper_Fusion.AssetStore;
Expand All @@ -24,3 +25,4 @@ public static void Start(IZEMgr __instance)
}
}
}
#endif

0 comments on commit ef7f33a

Please sign in to comment.