mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-12 03:39:45 +00:00
22 lines
666 B
C#
22 lines
666 B
C#
using OWML.ModHelper.Events;
|
|
|
|
namespace QSB.TimeSync
|
|
{
|
|
public static class WakeUpPatches
|
|
{
|
|
public static void AddPatches()
|
|
{
|
|
QSB.Helper.HarmonyHelper.AddPrefix<PlayerCameraEffectController>("OnStartOfTimeLoop", typeof(WakeUpPatches), nameof(OnStartOfTimeLoopPrefix));
|
|
}
|
|
|
|
public static bool OnStartOfTimeLoopPrefix(ref PlayerCameraEffectController __instance)
|
|
{
|
|
if (__instance.gameObject.CompareTag("MainCamera") && LoadManager.GetCurrentScene() != OWScene.EyeOfTheUniverse)
|
|
{
|
|
__instance.Invoke("WakeUp");
|
|
}
|
|
return false;
|
|
}
|
|
}
|
|
}
|