Refactor: Make State an internal class of JesterPatch class
This commit is contained in:
		
							parent
							
								
									b6f2ca355b
								
							
						
					
					
						commit
						76e9ca3595
					
				|  | @ -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; | ||||
|     } | ||||
| } | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue