commit a815d097f2d28aebae1a357ebac03fa9b6a17280 Author: Holly McFarland Date: Tue Apr 2 20:45:43 2024 -0400 first commit diff --git a/LevelStatsAlwaysOpen.csproj b/LevelStatsAlwaysOpen.csproj new file mode 100644 index 0000000..f222013 --- /dev/null +++ b/LevelStatsAlwaysOpen.csproj @@ -0,0 +1,34 @@ + + + + netstandard2.0 + LevelStatsAlwaysOpen + My first plugin + 1.0.0 + true + latest + + + + + + + + + + + + + + + + lib\Assembly-CSharp.dll + + + lib\UnityEngine.dll + + + lib\UnityEngine.CoreModule.dll + + + diff --git a/LevelStatsAlwaysOpen.sln b/LevelStatsAlwaysOpen.sln new file mode 100644 index 0000000..5838b91 --- /dev/null +++ b/LevelStatsAlwaysOpen.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.5.002.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LevelStatsAlwaysOpen", "LevelStatsAlwaysOpen.csproj", "{421E7D0A-D413-4DA3-879C-DB3877A7D155}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {421E7D0A-D413-4DA3-879C-DB3877A7D155}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {421E7D0A-D413-4DA3-879C-DB3877A7D155}.Debug|Any CPU.Build.0 = Debug|Any CPU + {421E7D0A-D413-4DA3-879C-DB3877A7D155}.Release|Any CPU.ActiveCfg = Release|Any CPU + {421E7D0A-D413-4DA3-879C-DB3877A7D155}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {94DE0ADB-C0FF-4087-9A5D-3839197939BB} + EndGlobalSection +EndGlobal diff --git a/NuGet.Config b/NuGet.Config new file mode 100644 index 0000000..1864ded --- /dev/null +++ b/NuGet.Config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Plugin.cs b/Plugin.cs new file mode 100644 index 0000000..ce99363 --- /dev/null +++ b/Plugin.cs @@ -0,0 +1,37 @@ +using BepInEx; +using HarmonyLib; +using UnityEngine; + +namespace LevelStatsAlwaysOpen +{ + [BepInPlugin(PluginInfo.PLUGIN_GUID, PluginInfo.PLUGIN_NAME, PluginInfo.PLUGIN_VERSION)] + public class Plugin : BaseUnityPlugin + { + private void Awake() + { + // Plugin startup logic + Logger.LogInfo($"Plugin {PluginInfo.PLUGIN_GUID} is loaded!"); + Logger.LogInfo("Initializing HarmonyLib..."); + Harmony harmony = new Harmony(PluginInfo.PLUGIN_GUID); + harmony.PatchAll(); + } + } + + [HarmonyPatch(typeof(LevelStatsEnabler), "Start")] + public class LevelStatsEnabler_Start_Patch() + { + public static void Postfix(GameObject ___levelStats) + { + ___levelStats.SetActive(true); + } + } + + [HarmonyPatch(typeof(LevelStatsEnabler), "Update")] + public class LevelStatsEnabler_Update_Patch() + { + public static bool Prefix() + { + return false; + } + } +}