1
0
Fork 0

Refactor: Make State an internal class of JesterPatch class

This commit is contained in:
ivan tkachenko 2025-08-02 15:55:12 +03:00
parent b6f2ca355b
commit 76e9ca3595
1 changed files with 10 additions and 9 deletions

View File

@ -1772,14 +1772,21 @@ namespace MuzikaGromche
#if DEBUG
[HarmonyPatch(nameof(JesterAI.SetJesterInitialValues))]
[HarmonyPostfix]
public static void AlmostInstantFollowTimerPostfix(JesterAI __instance)
static void AlmostInstantFollowTimerPostfix(JesterAI __instance)
{
__instance.beginCrankingTimer = 1f;
}
#endif
class State
{
public required AudioSource farAudio;
public required int previousState;
}
[HarmonyPatch(nameof(JesterAI.Update))]
[HarmonyPrefix]
public static void DoNotStopTheMusicPrefix(JesterAI __instance, out State __state)
static void DoNotStopTheMusicPrefix(JesterAI __instance, out State __state)
{
__state = new State
{
@ -1801,7 +1808,7 @@ namespace MuzikaGromche
[HarmonyPatch(nameof(JesterAI.Update))]
[HarmonyPostfix]
public static void DoNotStopTheMusic(JesterAI __instance, State __state)
static void DoNotStopTheMusic(JesterAI __instance, State __state)
{
if (__instance.previousState == 1 && __state.previousState != 1)
{
@ -1911,10 +1918,4 @@ namespace MuzikaGromche
}
}
}
internal class State
{
public required AudioSource farAudio;
public required int previousState;
}
}