From 2fbfec5ded20e8d6f95ad1d374d2afba902d8993 Mon Sep 17 00:00:00 2001 From: Sakimori Date: Fri, 18 Apr 2025 18:55:29 -0400 Subject: [PATCH] poked around, giving up for now lmao --- ExtraSaves.sln | 2 +- Source/Plugin.cs | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/ExtraSaves.sln b/ExtraSaves.sln index c14ba38..2f0d15c 100644 --- a/ExtraSaves.sln +++ b/ExtraSaves.sln @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.10.34928.147 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GlitchRestore", "Source\GlitchRestore.csproj", "{FC7FF0C4-8F9F-43B9-963F-5C8B3B8920AF}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ExtraSaves", "Source\ExtraSaves.csproj", "{FC7FF0C4-8F9F-43B9-963F-5C8B3B8920AF}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/Source/Plugin.cs b/Source/Plugin.cs index 7eeef18..13ba000 100644 --- a/Source/Plugin.cs +++ b/Source/Plugin.cs @@ -1,6 +1,8 @@ using BepInEx; using BepInEx.Configuration; using HarmonyLib; +using System; +using System.Collections.Generic; namespace GlitchRestore; @@ -8,16 +10,14 @@ namespace GlitchRestore; public class Plugin : BaseUnityPlugin { private Harmony harmony = null!; - [HarmonyPatch(typeof(PlayerHurtState), nameof(PlayerHurtState.OnStateEnter))] - internal static class RopeRestore { - private static void Prefix(Player ___player, out ClimbableRope __state) { - __state = ___player.touchingRope; - } - - private static void Postfix(ClimbableRope __state, ref Player ___player) { - if (__state != null) { - ___player.touchingRope = __state; - } + [HarmonyPatch(typeof(StartMenuLogic), "Start")] + internal static class ExtraSlots { + private static void Prefix(ref List ___saveButtuns) { + Console.WriteLine("Adjusting save slot count!"); + if (___saveButtuns.Count < 6 && ___saveButtuns.Count > 0) { + SaveSlotUIButton newButton = new SaveSlotUIButton(); + ___saveButtuns.Add(new SaveSlotUIButton()); + } } }