From 629403a74d85dec7ece06d34257114fd0938b742 Mon Sep 17 00:00:00 2001 From: sinaioutlander <49360850+sinaioutlander@users.noreply.github.com> Date: Sun, 27 Sep 2020 22:52:08 +1000 Subject: [PATCH] 1.8.0 cleanup --- src/Explorer.csproj | 12 +++++------ src/ExplorerCore.cs | 28 +++++++++++++------------- src/Menu/MainMenu/Pages/ConsolePage.cs | 13 +++++++++--- 3 files changed, 30 insertions(+), 23 deletions(-) diff --git a/src/Explorer.csproj b/src/Explorer.csproj index 294d43b..57c5698 100644 --- a/src/Explorer.csproj +++ b/src/Explorer.csproj @@ -34,7 +34,7 @@ false none false - ..\Release\ML_Cpp\ + ..\Release\Explorer.MelonLoader.Il2Cpp\ CPP,ML prompt 4 @@ -49,7 +49,7 @@ false none false - ..\Release\ML_Mono\ + ..\Release\Explorer.MelonLoader.Mono\ MONO,ML prompt 4 @@ -64,7 +64,7 @@ false none false - ..\Release\ML_Mono_NET35\ + ..\Release\Explorer.MelonLoader.Mono.NET35\ MONO,ML,NET35 prompt 4 @@ -79,7 +79,7 @@ false none false - ..\Release\BIE_Cpp\ + ..\Release\Explorer.BepInEx.Il2Cpp\ CPP,BIE prompt 4 @@ -94,7 +94,7 @@ false none false - ..\Release\BIE_Mono\ + ..\Release\Explorer.BepInEx.Mono\ MONO,BIE prompt 4 @@ -109,7 +109,7 @@ false none false - ..\Release\BIE_Mono_NET35\ + ..\Release\Explorer.BepInEx.Mono.NET35\ MONO,BIE,NET35 prompt 4 diff --git a/src/ExplorerCore.cs b/src/ExplorerCore.cs index b6ab8d8..0dbbdb6 100644 --- a/src/ExplorerCore.cs +++ b/src/ExplorerCore.cs @@ -4,24 +4,24 @@ namespace Explorer { public class ExplorerCore { - public const string NAME = -#if ML -#if CPP - "Explorer (Il2Cpp, MelonLoader)"; -#else - "Explorer (Mono, MelonLoader)"; -#endif -#else -#if CPP - "Explorer (Il2Cpp, BepInEx)"; -#else - "Explorer (Mono, BepInEx)"; -#endif -#endif + public const string NAME = "Explorer (" + PLATFORM + ", " + MODLOADER + ")"; public const string VERSION = "1.8.0"; public const string AUTHOR = "Sinai"; public const string GUID = "com.sinai.explorer"; + public const string MODLOADER = +#if ML + "MelonLoader"; +#else + "BepInEx"; +#endif + public const string PLATFORM = +#if CPP + "Il2Cpp"; +#else + "Mono"; +#endif + public static ExplorerCore Instance { get; private set; } public ExplorerCore() diff --git a/src/Menu/MainMenu/Pages/ConsolePage.cs b/src/Menu/MainMenu/Pages/ConsolePage.cs index 8ab52d0..3c74c3f 100644 --- a/src/Menu/MainMenu/Pages/ConsolePage.cs +++ b/src/Menu/MainMenu/Pages/ConsolePage.cs @@ -30,7 +30,9 @@ namespace Explorer "System.Collections", "System.Collections.Generic", "System.Reflection", +#if ML "MelonLoader" +#endif }; public override void Init() @@ -42,9 +44,14 @@ namespace Explorer { MethodInput = @"// This is a basic C# console. // Some common using directives are added by default, you can add more below. -// If you want to return some output, Debug.Log() it. - -Debug.Log(""hello world"");"; +// If you want to return some output, Debug.Log() or MelonLogger.Log() it. +" +#if ML ++ @"MelonLogger.Log(""hello world"");"; +#else ++ @"Debug.Log(""hello world"");"; +#endif + ; ResetConsole();