This commit is contained in:
parent
c4cbceacb4
commit
2fbfec5ded
|
@ -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
|
||||
|
|
|
@ -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<SaveSlotUIButton> ___saveButtuns) {
|
||||
Console.WriteLine("Adjusting save slot count!");
|
||||
if (___saveButtuns.Count < 6 && ___saveButtuns.Count > 0) {
|
||||
SaveSlotUIButton newButton = new SaveSlotUIButton();
|
||||
___saveButtuns.Add(new SaveSlotUIButton());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue