This commit is contained in:
JohnCorby 2022-11-17 19:05:06 -08:00
parent ab165efb88
commit 5987529442
2 changed files with 9 additions and 4 deletions

View File

@ -15,8 +15,10 @@ public class AlarmTotemManager : WorldObjectManager
public override async UniTask BuildWorldObjects(OWScene scene, CancellationToken ct)
{
AlarmBells = QSBWorldSync.GetUnityObjects<AlarmBell>().ToArray();
QSBWorldSync.Init<QSBAlarmTotem, AlarmTotem>();
QSBWorldSync.Init<QSBAlarmBell, AlarmBell>();
AlarmBells = QSBWorldSync.GetUnityObjects<AlarmBell>()
.Where(x => x._oneShotSource && x._animation && x._bellTrigger && x._lightController)
.ToArray();
QSBWorldSync.Init<QSBAlarmBell, AlarmBell>(AlarmBells);
}
}

View File

@ -56,11 +56,14 @@ public class AlarmSequenceControllerPatches : QSBPatch
foreach (var alarmBell in AlarmTotemManager.AlarmBells)
{
alarmBell.PlaySingleChime(__instance._chimeIndex);
if (!__instance._animationStarted && !__instance._dreamWorldController.IsInDream())
}
if (!__instance._animationStarted && !__instance._dreamWorldController.IsInDream())
{
foreach (var alarmBell in AlarmTotemManager.AlarmBells)
{
alarmBell.PlayAnimation();
__instance._animationStarted = true;
}
__instance._animationStarted = true;
}
if (__instance._dreamWorldController.IsInDream() && !__instance._dreamWorldController.IsExitingDream())
{