mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-01 03:32:38 +00:00
make it update wake fraction even not in dream world
This commit is contained in:
parent
43acb32288
commit
8ec1547453
@ -49,6 +49,25 @@ public class AlarmSequenceControllerPatches : QSBPatch
|
||||
return false;
|
||||
}
|
||||
|
||||
[HarmonyPrefix]
|
||||
[HarmonyPatch(nameof(AlarmSequenceController.Update))]
|
||||
private static bool Update(AlarmSequenceController __instance)
|
||||
{
|
||||
__instance.UpdateWakeFraction();
|
||||
if (__instance._playing)
|
||||
{
|
||||
__instance.UpdateChimes();
|
||||
}
|
||||
__instance.UpdatePulse();
|
||||
if (!__instance._playing && __instance._alarmCounter == 0 && __instance._pulse <= 0.01f)
|
||||
{
|
||||
__instance._pulse = 0f;
|
||||
__instance._targetPulse = 0f;
|
||||
__instance.enabled = false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
[HarmonyPrefix]
|
||||
[HarmonyPatch(nameof(AlarmSequenceController.PlaySingleChime))]
|
||||
private static bool PlaySingleChime(AlarmSequenceController __instance)
|
||||
|
Loading…
Reference in New Issue
Block a user