Split into multiple files
This commit is contained in:
parent
c6851be43e
commit
1bea15968d
4 changed files with 191 additions and 131 deletions
|
|
@ -1,25 +1,4 @@
|
||||||
global using UnityEngine;
|
#if BEPINEX
|
||||||
#if MELONLOADER
|
|
||||||
global using MelonLoader;
|
|
||||||
global using MelonLoader.Logging;
|
|
||||||
global using MelonLoader.Utils;
|
|
||||||
global using Il2Cpp;
|
|
||||||
global using Il2CppAlmanacData;
|
|
||||||
global using Il2CppCore;
|
|
||||||
global using Il2CppGameLevel; // ReSharper disable once RedundantUsingDirective.Global
|
|
||||||
global using Il2CppGameLevel.Abyss;
|
|
||||||
global using Il2CppGameLevel.EventNodes;
|
|
||||||
global using Il2CppGameLevel.RogueShooting;
|
|
||||||
global using Il2CppPVPScaryPot;
|
|
||||||
global using Il2CppRhythmGame;
|
|
||||||
global using Il2CppRhythmGameEditor;
|
|
||||||
global using Il2CppTMPro;
|
|
||||||
global using Il2CppZenGarden;
|
|
||||||
global using AudioImportLibAPI = AudioImportLib.API;
|
|
||||||
global using Il2CppAlmanacDataClass = Il2CppAlmanacData.AlmanacData;
|
|
||||||
global using Il2CppLevelData = Il2Cpp.LevelData;
|
|
||||||
global using Il2CppPlantInfo = Il2CppAlmanacData.PlantInfo;
|
|
||||||
#elif BEPINEX
|
|
||||||
global using AlmanacData;
|
global using AlmanacData;
|
||||||
global using BepInEx;
|
global using BepInEx;
|
||||||
global using BepInEx.Configuration;
|
global using BepInEx.Configuration;
|
||||||
|
|
@ -27,7 +6,7 @@ global using BepInEx.Logging;
|
||||||
global using BepInEx.Unity.IL2CPP;
|
global using BepInEx.Unity.IL2CPP;
|
||||||
global using BepInEx.Unity.IL2CPP.Utils;
|
global using BepInEx.Unity.IL2CPP.Utils;
|
||||||
global using Core;
|
global using Core;
|
||||||
global using GameLevel;
|
global using GameLevel; // ReSharper disable once RedundantUsingDirective.Global
|
||||||
global using GameLevel.Abyss;
|
global using GameLevel.Abyss;
|
||||||
global using GameLevel.EventNodes;
|
global using GameLevel.EventNodes;
|
||||||
global using GameLevel.RogueShooting;
|
global using GameLevel.RogueShooting;
|
||||||
|
|
@ -35,37 +14,21 @@ global using PVPScaryPot;
|
||||||
global using RhythmGame;
|
global using RhythmGame;
|
||||||
global using RhythmGameEditor;
|
global using RhythmGameEditor;
|
||||||
global using TMPro;
|
global using TMPro;
|
||||||
|
global using UnityEngine;
|
||||||
global using ZenGarden;
|
global using ZenGarden;
|
||||||
global using AudioImportLibAPI = AudioImportLib.BepInEx.API;
|
global using AudioImportLibAPI = AudioImportLib.BepInEx.API;
|
||||||
global using Il2CppAlmanacDataClass = AlmanacData.AlmanacData;
|
global using Il2CppAlmanacDataClass = AlmanacData.AlmanacData;
|
||||||
global using Il2CppLevelData = LevelData;
|
global using Il2CppLevelData = LevelData;
|
||||||
global using Il2CppPlantInfo = AlmanacData.PlantInfo;
|
global using Il2CppPlantInfo = AlmanacData.PlantInfo;
|
||||||
#endif
|
|
||||||
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.Super_Editor;
|
using PvZ_Fusion_Translator.Patches.Modes.Super_Editor;
|
||||||
|
|
||||||
#if MELONLOADER
|
|
||||||
[assembly:
|
|
||||||
MelonGame("LanPiaoPiao", "PlantsVsZombiesRH"),
|
|
||||||
MelonInfo(
|
|
||||||
typeof(PvZ_Fusion_Translator.Core),
|
|
||||||
"PvZ Fusion Translator",
|
|
||||||
"231.0.0",
|
|
||||||
"dynaslash / arifrios1st / lancerx0 / JustNull / Dakosha / Mamoru-kun / cassidy / Teyliu / Emik"
|
|
||||||
)]
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace PvZ_Fusion_Translator;
|
namespace PvZ_Fusion_Translator;
|
||||||
#pragma warning disable CA1822 // ReSharper disable once ClassNeverInstantiated.Global
|
#pragma warning disable CA1822 // ReSharper disable once ClassNeverInstantiated.Global
|
||||||
#if MELONLOADER
|
|
||||||
public class Core : MelonMod
|
|
||||||
#elif BEPINEX
|
|
||||||
[BepInPlugin("PVZFusionTranslator_BepInEx", "PvZ Fusion Translator", "3.1.1"), BepInProcess("PlantsVsZombiesRH.exe")]
|
[BepInPlugin("PVZFusionTranslator_BepInEx", "PvZ Fusion Translator", "3.1.1"), BepInProcess("PlantsVsZombiesRH.exe")]
|
||||||
public class Core : BasePlugin
|
public class Core : BasePlugin
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
#if BEPINEX
|
|
||||||
public sealed class UnityCoroutineHelper : MonoBehaviour
|
public sealed class UnityCoroutineHelper : MonoBehaviour
|
||||||
{
|
{
|
||||||
// ReSharper disable once MemberHidesStaticFromOuterClass
|
// ReSharper disable once MemberHidesStaticFromOuterClass
|
||||||
|
|
@ -73,23 +36,13 @@ public class Core : BasePlugin
|
||||||
|
|
||||||
public void Awake() => Instance = this;
|
public void Awake() => Instance = this;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
public static string ModDirectory =>
|
public static string ModDirectory => Path.Combine(Paths.PluginPath, "PvZ_Fusion_Translator");
|
||||||
#if MELONLOADER
|
|
||||||
Path.Combine(MelonEnvironment.ModsDirectory, "PvZ_Fusion_Translator");
|
|
||||||
#elif BEPINEX
|
|
||||||
Path.Combine(Paths.PluginPath, "PvZ_Fusion_Translator");
|
|
||||||
#endif
|
|
||||||
public static bool IsInitialized { get; set; }
|
public static bool IsInitialized { get; set; }
|
||||||
|
|
||||||
public static Core Instance { get; private set; }
|
public static Core Instance { get; private set; }
|
||||||
#if MELONLOADER
|
|
||||||
public MelonPreferences_Entry<bool> ConfigDefaultAudio, ConfigDefaultTextures, ConfigUseLocal;
|
|
||||||
|
|
||||||
public MelonPreferences_Entry<string> ConfigLanguage;
|
|
||||||
|
|
||||||
private object _replaceTextureRoutine;
|
|
||||||
#elif BEPINEX
|
|
||||||
public static MonoBehaviour MonoInstance { get; private set; }
|
public static MonoBehaviour MonoInstance { get; private set; }
|
||||||
|
|
||||||
public ConfigEntry<bool> ConfigDefaultAudio, ConfigDefaultTextures, ConfigUseLocal;
|
public ConfigEntry<bool> ConfigDefaultAudio, ConfigDefaultTextures, ConfigUseLocal;
|
||||||
|
|
@ -99,22 +52,15 @@ public class Core : BasePlugin
|
||||||
public new static ManualLogSource Log { get; private set; }
|
public new static ManualLogSource Log { get; private set; }
|
||||||
|
|
||||||
private Coroutine _replaceTextureRoutine;
|
private Coroutine _replaceTextureRoutine;
|
||||||
#endif
|
|
||||||
private static DateTime? s_dtStartToast;
|
private static DateTime? s_dtStartToast;
|
||||||
|
|
||||||
private static string s_toastText;
|
private static string s_toastText;
|
||||||
#if MELONLOADER
|
|
||||||
public static object Coroutine(System.Collections.IEnumerator enumerator) =>
|
|
||||||
MelonCoroutines.Start(enumerator);
|
|
||||||
#elif BEPINEX
|
|
||||||
public static Coroutine Coroutine(System.Collections.IEnumerator enumerator) =>
|
public static Coroutine Coroutine(System.Collections.IEnumerator enumerator) =>
|
||||||
MonoInstance.StartCoroutine(enumerator);
|
MonoInstance.StartCoroutine(enumerator);
|
||||||
#endif
|
|
||||||
#if MELONLOADER
|
|
||||||
public override void OnInitializeMelon()
|
|
||||||
#elif BEPINEX
|
|
||||||
public override void Load()
|
public override void Load()
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
Instance = this;
|
Instance = this;
|
||||||
LoadConfig();
|
LoadConfig();
|
||||||
|
|
@ -127,31 +73,13 @@ public class Core : BasePlugin
|
||||||
StringStore.Init();
|
StringStore.Init();
|
||||||
AudioStore.Init();
|
AudioStore.Init();
|
||||||
FontStore.Init();
|
FontStore.Init();
|
||||||
#if MELONLOADER
|
|
||||||
base.OnInitializeMelon();
|
|
||||||
#elif BEPINEX
|
|
||||||
Log = base.Log;
|
Log = base.Log;
|
||||||
Utils.RegisterPlantIndices();
|
Utils.RegisterPlantIndices();
|
||||||
MonoInstance = AddComponent<UnityCoroutineHelper>();
|
MonoInstance = AddComponent<UnityCoroutineHelper>();
|
||||||
HarmonyLib.Harmony.CreateAndPatchAll(System.Reflection.Assembly.GetExecutingAssembly());
|
HarmonyLib.Harmony.CreateAndPatchAll(System.Reflection.Assembly.GetExecutingAssembly());
|
||||||
#endif
|
|
||||||
IsInitialized = true;
|
IsInitialized = true;
|
||||||
}
|
}
|
||||||
#if MELONLOADER
|
|
||||||
public override void OnLateInitializeMelon()
|
|
||||||
{
|
|
||||||
FileLoader.LoadTravelBuffs();
|
|
||||||
Utils.RegisterPlantIndices();
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void OnDeinitializeMelon()
|
|
||||||
{
|
|
||||||
MelonCoroutines.Stop(_replaceTextureRoutine);
|
|
||||||
|
|
||||||
if (ModFeatures.IsMultiLanguage)
|
|
||||||
FileLoader.SaveLanguage();
|
|
||||||
}
|
|
||||||
#elif BEPINEX
|
|
||||||
public override bool Unload()
|
public override bool Unload()
|
||||||
{
|
{
|
||||||
if (_replaceTextureRoutine != null)
|
if (_replaceTextureRoutine != null)
|
||||||
|
|
@ -163,17 +91,14 @@ public class Core : BasePlugin
|
||||||
FileLoader.SaveLanguage();
|
FileLoader.SaveLanguage();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
public static void ShowToast(string message)
|
public static void ShowToast(string message)
|
||||||
{
|
{
|
||||||
s_toastText = message;
|
s_toastText = message;
|
||||||
s_dtStartToast = new(DateTime.Now.Ticks);
|
s_dtStartToast = new(DateTime.Now.Ticks);
|
||||||
}
|
}
|
||||||
#if MELONLOADER
|
|
||||||
public override void OnLateUpdate()
|
|
||||||
#elif BEPINEX
|
|
||||||
public void OnUpdate()
|
public void OnUpdate()
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
if (ModFeatures.IsDebug)
|
if (ModFeatures.IsDebug)
|
||||||
ModFeatures.OnLateUpdate();
|
ModFeatures.OnLateUpdate();
|
||||||
|
|
@ -194,11 +119,8 @@ public class Core : BasePlugin
|
||||||
if (CustomLevelMenu_Patch.RequestTimer < 0)
|
if (CustomLevelMenu_Patch.RequestTimer < 0)
|
||||||
CustomLevelMenu_Patch.RequestTimer = 0;
|
CustomLevelMenu_Patch.RequestTimer = 0;
|
||||||
}
|
}
|
||||||
#if MELONLOADER
|
|
||||||
public override void OnGUI()
|
|
||||||
#elif BEPINEX
|
|
||||||
public void OnGUI()
|
public void OnGUI()
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
if (!ModFeatures.IsDebug)
|
if (!ModFeatures.IsDebug)
|
||||||
return;
|
return;
|
||||||
|
|
@ -213,19 +135,7 @@ public class Core : BasePlugin
|
||||||
if (timeSpan > t)
|
if (timeSpan > t)
|
||||||
s_dtStartToast = null;
|
s_dtStartToast = null;
|
||||||
}
|
}
|
||||||
#if MELONLOADER
|
|
||||||
private void LoadConfig()
|
|
||||||
{
|
|
||||||
var category = MelonPreferences.CreateCategory("PvZ_Fusion_Translator", "Fusion Translator Settings");
|
|
||||||
|
|
||||||
ConfigDefaultTextures = category.CreateEntry("DefaultTextures", false);
|
|
||||||
ConfigDefaultAudio = category.CreateEntry("DefaultAudio", false);
|
|
||||||
ConfigUseLocal = category.CreateEntry("UseLocal", false);
|
|
||||||
ConfigLanguage = category.CreateEntry("Language", "English");
|
|
||||||
|
|
||||||
MelonPreferences.Save();
|
|
||||||
}
|
|
||||||
#elif BEPINEX
|
|
||||||
private void LoadConfig()
|
private void LoadConfig()
|
||||||
{
|
{
|
||||||
const string MainCategory = "PvZ_Fusion_Translator";
|
const string MainCategory = "PvZ_Fusion_Translator";
|
||||||
|
|
@ -272,5 +182,5 @@ public class Core : BasePlugin
|
||||||
|
|
||||||
Debug.Assert(Config.TryGetEntry(new(MainCategory, "Language"), out ConfigLanguage));
|
Debug.Assert(Config.TryGetEntry(new(MainCategory, "Language"), out ConfigLanguage));
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
146
Source/Core.MelonLoader.cs
Normal file
146
Source/Core.MelonLoader.cs
Normal file
|
|
@ -0,0 +1,146 @@
|
||||||
|
#if MELONLOADER
|
||||||
|
global using MelonLoader;
|
||||||
|
global using MelonLoader.Logging;
|
||||||
|
global using MelonLoader.Utils;
|
||||||
|
global using Il2Cpp;
|
||||||
|
global using Il2CppAlmanacData;
|
||||||
|
global using Il2CppCore;
|
||||||
|
global using Il2CppGameLevel; // ReSharper disable once RedundantUsingDirective.Global
|
||||||
|
global using Il2CppGameLevel.Abyss;
|
||||||
|
global using Il2CppGameLevel.EventNodes;
|
||||||
|
global using Il2CppGameLevel.RogueShooting;
|
||||||
|
global using Il2CppPVPScaryPot;
|
||||||
|
global using Il2CppRhythmGame;
|
||||||
|
global using Il2CppRhythmGameEditor;
|
||||||
|
global using Il2CppTMPro;
|
||||||
|
global using Il2CppZenGarden;
|
||||||
|
global using AudioImportLibAPI = AudioImportLib.API;
|
||||||
|
global using Il2CppAlmanacDataClass = Il2CppAlmanacData.AlmanacData;
|
||||||
|
global using Il2CppLevelData = Il2Cpp.LevelData;
|
||||||
|
global using Il2CppPlantInfo = Il2CppAlmanacData.PlantInfo;
|
||||||
|
global using UnityEngine;
|
||||||
|
using PvZ_Fusion_Translator.AssetStore;
|
||||||
|
using PvZ_Fusion_Translator.Patches.Managers;
|
||||||
|
using PvZ_Fusion_Translator.Patches.Modes.Super_Editor;
|
||||||
|
|
||||||
|
[assembly:
|
||||||
|
MelonGame("LanPiaoPiao", "PlantsVsZombiesRH"),
|
||||||
|
MelonInfo(
|
||||||
|
typeof(PvZ_Fusion_Translator.Core),
|
||||||
|
"PvZ Fusion Translator",
|
||||||
|
"231.0.0",
|
||||||
|
"dynaslash / arifrios1st / lancerx0 / JustNull / Dakosha / Mamoru-kun / cassidy / Teyliu / Emik"
|
||||||
|
)]
|
||||||
|
|
||||||
|
namespace PvZ_Fusion_Translator;
|
||||||
|
#pragma warning disable CA1822 // ReSharper disable once ClassNeverInstantiated.Global
|
||||||
|
public class Core : MelonMod
|
||||||
|
{
|
||||||
|
public static string ModDirectory =>
|
||||||
|
Path.Combine(MelonEnvironment.ModsDirectory, "PvZ_Fusion_Translator");
|
||||||
|
|
||||||
|
public static bool IsInitialized { get; set; }
|
||||||
|
|
||||||
|
public static Core Instance { get; private set; }
|
||||||
|
|
||||||
|
public MelonPreferences_Entry<bool> ConfigDefaultAudio, ConfigDefaultTextures, ConfigUseLocal;
|
||||||
|
|
||||||
|
public MelonPreferences_Entry<string> ConfigLanguage;
|
||||||
|
|
||||||
|
private object _replaceTextureRoutine;
|
||||||
|
|
||||||
|
private static DateTime? s_dtStartToast;
|
||||||
|
|
||||||
|
private static string s_toastText;
|
||||||
|
|
||||||
|
public static object Coroutine(System.Collections.IEnumerator enumerator) =>
|
||||||
|
MelonCoroutines.Start(enumerator);
|
||||||
|
|
||||||
|
public override void OnInitializeMelon()
|
||||||
|
{
|
||||||
|
Instance = this;
|
||||||
|
LoadConfig();
|
||||||
|
|
||||||
|
if (ModFeatures.IsMultiLanguage)
|
||||||
|
FileLoader.LoadLanguage();
|
||||||
|
|
||||||
|
_replaceTextureRoutine = Coroutine(TextureStore.ReplaceTexturesCoroutine());
|
||||||
|
TextureStore.Init();
|
||||||
|
StringStore.Init();
|
||||||
|
AudioStore.Init();
|
||||||
|
FontStore.Init();
|
||||||
|
base.OnInitializeMelon();
|
||||||
|
IsInitialized = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnLateInitializeMelon()
|
||||||
|
{
|
||||||
|
FileLoader.LoadTravelBuffs();
|
||||||
|
Utils.RegisterPlantIndices();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnDeinitializeMelon()
|
||||||
|
{
|
||||||
|
MelonCoroutines.Stop(_replaceTextureRoutine);
|
||||||
|
|
||||||
|
if (ModFeatures.IsMultiLanguage)
|
||||||
|
FileLoader.SaveLanguage();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void ShowToast(string message)
|
||||||
|
{
|
||||||
|
s_toastText = message;
|
||||||
|
s_dtStartToast = new(DateTime.Now.Ticks);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnLateUpdate()
|
||||||
|
{
|
||||||
|
if (ModFeatures.IsDebug)
|
||||||
|
ModFeatures.OnLateUpdate();
|
||||||
|
|
||||||
|
if (Input.GetKeyDown(KeyCode.Insert))
|
||||||
|
Utils.OpenSaveDirectory();
|
||||||
|
|
||||||
|
if (Input.GetKeyDown(KeyCode.PageUp))
|
||||||
|
Utils.OpenOnlineAlmanac();
|
||||||
|
|
||||||
|
TowerManager_Patch.UpdateText();
|
||||||
|
|
||||||
|
if (CustomLevelMenu_Patch.RequestTimer <= 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
CustomLevelMenu_Patch.RequestTimer -= Time.deltaTime;
|
||||||
|
|
||||||
|
if (CustomLevelMenu_Patch.RequestTimer < 0)
|
||||||
|
CustomLevelMenu_Patch.RequestTimer = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnGUI()
|
||||||
|
{
|
||||||
|
if (!ModFeatures.IsDebug)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (s_dtStartToast is null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
GUI.Button(new(10, 10, 200, 20), $"\n{s_toastText}\n");
|
||||||
|
var timeSpan = DateTime.Now - s_dtStartToast;
|
||||||
|
TimeSpan t = new(0, 0, 0, 2);
|
||||||
|
|
||||||
|
if (timeSpan > t)
|
||||||
|
s_dtStartToast = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void LoadConfig()
|
||||||
|
{
|
||||||
|
var category = MelonPreferences.CreateCategory("PvZ_Fusion_Translator", "Fusion Translator Settings");
|
||||||
|
|
||||||
|
ConfigDefaultTextures = category.CreateEntry("DefaultTextures", false);
|
||||||
|
ConfigDefaultAudio = category.CreateEntry("DefaultAudio", false);
|
||||||
|
ConfigUseLocal = category.CreateEntry("UseLocal", false);
|
||||||
|
ConfigLanguage = category.CreateEntry("Language", "English");
|
||||||
|
|
||||||
|
MelonPreferences.Save();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
30
Source/Log.BepInEx.cs
Normal file
30
Source/Log.BepInEx.cs
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
#if BEPINEX
|
||||||
|
namespace PvZ_Fusion_Translator;
|
||||||
|
|
||||||
|
internal static class Log
|
||||||
|
{
|
||||||
|
public static void LogDebug(object txt) => Core.Log.LogDebug(txt);
|
||||||
|
|
||||||
|
public static void LogDebug(string txt) => Core.Log.LogDebug(txt);
|
||||||
|
|
||||||
|
public static void LogDebug(string txt, params object[] args) => Core.Log.LogDebug(string.Format(txt, args));
|
||||||
|
|
||||||
|
public static void LogInfo(object txt) => Core.Log.LogInfo(txt);
|
||||||
|
|
||||||
|
public static void LogInfo(string txt) => Core.Log.LogInfo(txt);
|
||||||
|
|
||||||
|
public static void LogInfo(string txt, params object[] args) => Core.Log.LogInfo(string.Format(txt, args));
|
||||||
|
|
||||||
|
public static void LogWarning(object txt) => Core.Log.LogWarning(txt);
|
||||||
|
|
||||||
|
public static void LogWarning(string txt) => Core.Log.LogWarning(txt);
|
||||||
|
|
||||||
|
public static void LogWarning(string txt, params object[] args) => Core.Log.LogWarning(string.Format(txt, args));
|
||||||
|
|
||||||
|
public static void LogError(object txt) => Core.Log.LogError(txt);
|
||||||
|
|
||||||
|
public static void LogError(string txt) => Core.Log.LogError(txt);
|
||||||
|
|
||||||
|
public static void LogError(string txt, params object[] args) => Core.Log.LogError(string.Format(txt, args));
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
@ -1,11 +1,10 @@
|
||||||
// ReSharper disable once RedundantUsingDirective
|
#if MELONLOADER
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
|
|
||||||
namespace PvZ_Fusion_Translator;
|
namespace PvZ_Fusion_Translator;
|
||||||
|
|
||||||
internal static class Log
|
internal static class Log
|
||||||
{
|
{
|
||||||
#if MELONLOADER
|
|
||||||
public static void LogDebug(object txt) => Melon<Core>.Logger.Msg(ColorARGB.Gray, txt);
|
public static void LogDebug(object txt) => Melon<Core>.Logger.Msg(ColorARGB.Gray, txt);
|
||||||
|
|
||||||
public static void LogDebug(string txt) => Melon<Core>.Logger.Msg(ColorARGB.Gray, txt);
|
public static void LogDebug(string txt) => Melon<Core>.Logger.Msg(ColorARGB.Gray, txt);
|
||||||
|
|
@ -31,30 +30,5 @@ internal static class Log
|
||||||
public static void LogError(string txt) => Melon<Core>.Logger.Error(txt);
|
public static void LogError(string txt) => Melon<Core>.Logger.Error(txt);
|
||||||
|
|
||||||
public static void LogError(string txt, params object[] args) => Melon<Core>.Logger.Error(txt, args);
|
public static void LogError(string txt, params object[] args) => Melon<Core>.Logger.Error(txt, args);
|
||||||
#elif BEPINEX
|
|
||||||
|
|
||||||
public static void LogDebug(object txt) => Core.Log.LogDebug(txt);
|
|
||||||
|
|
||||||
public static void LogDebug(string txt) => Core.Log.LogDebug(txt);
|
|
||||||
|
|
||||||
public static void LogDebug(string txt, params object[] args) => Core.Log.LogDebug(string.Format(txt, args));
|
|
||||||
|
|
||||||
public static void LogInfo(object txt) => Core.Log.LogInfo(txt);
|
|
||||||
|
|
||||||
public static void LogInfo(string txt) => Core.Log.LogInfo(txt);
|
|
||||||
|
|
||||||
public static void LogInfo(string txt, params object[] args) => Core.Log.LogInfo(string.Format(txt, args));
|
|
||||||
|
|
||||||
public static void LogWarning(object txt) => Core.Log.LogWarning(txt);
|
|
||||||
|
|
||||||
public static void LogWarning(string txt) => Core.Log.LogWarning(txt);
|
|
||||||
|
|
||||||
public static void LogWarning(string txt, params object[] args) => Core.Log.LogWarning(string.Format(txt, args));
|
|
||||||
|
|
||||||
public static void LogError(object txt) => Core.Log.LogError(txt);
|
|
||||||
|
|
||||||
public static void LogError(string txt) => Core.Log.LogError(txt);
|
|
||||||
|
|
||||||
public static void LogError(string txt, params object[] args) => Core.Log.LogError(string.Format(txt, args));
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
Loading…
Add table
Reference in a new issue