-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRunManagerHook.cs
More file actions
22 lines (20 loc) · 810 Bytes
/
RunManagerHook.cs
File metadata and controls
22 lines (20 loc) · 810 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
using System.Diagnostics.CodeAnalysis;
using HarmonyLib;
#pragma warning disable CS8618
namespace LoomConfig
{
[HarmonyPatch(typeof(RunManager))]
[SuppressMessage("ReSharper", "InconsistentNaming")]
internal static class RunManagerHook
{
[HarmonyPostfix, HarmonyPatch(nameof(RunManager.ChangeLevel))]
public static void ChangeLevelPostfix(RunManager __instance, bool _levelFailed)
{
// To avoid getting spammed by the Arena, or by Imperium if "Disable Game Over" is enabled
if (_levelFailed || SemiFunc.IsLevelArena(RunManager.instance.levelCurrent)) return;
// EnemyShadowAnimPatch.inLevel = false;
// EnemyShadowAnimPatch.neckRefs.Clear();
LoomProperties.SetLoomProperties();
}
}
}