From d714045a8aac463f85aa57a3b03089a99ceb558f Mon Sep 17 00:00:00 2001
From: Mister_Nebula <41904486+misternebula@users.noreply.github.com>
Date: Sat, 12 Jun 2021 15:58:34 +0100
Subject: [PATCH] remove "wake up" prompt
---
QSB/Patches/QSBPatchManager.cs | 4 +++-
QSB/QSB.csproj | 1 +
QSB/TimeSync/Patches/TimePatches.cs | 18 ++++++++++++++++++
QSB/TimeSync/WakeUpSync.cs | 1 -
4 files changed, 22 insertions(+), 2 deletions(-)
create mode 100644 QSB/TimeSync/Patches/TimePatches.cs
diff --git a/QSB/Patches/QSBPatchManager.cs b/QSB/Patches/QSBPatchManager.cs
index 14b35a89..3f15b55c 100644
--- a/QSB/Patches/QSBPatchManager.cs
+++ b/QSB/Patches/QSBPatchManager.cs
@@ -17,6 +17,7 @@ using QSB.QuantumSync.Patches;
using QSB.RoastingSync.Patches;
using QSB.ShipSync.Patches;
using QSB.StatueSync.Patches;
+using QSB.TimeSync.Patches;
using QSB.TranslationSync.Patches;
using QSB.Utility;
using System;
@@ -57,7 +58,8 @@ namespace QSB.Patches
new PlayerAnimationPatches(),
new CharacterAnimationPatches(),
new ShipPatches(),
- new InputPatches()
+ new InputPatches(),
+ new TimePatches()
};
DebugLog.DebugWrite("Patch Manager ready.", MessageType.Success);
diff --git a/QSB/QSB.csproj b/QSB/QSB.csproj
index 7330cadb..d7a8ba73 100644
--- a/QSB/QSB.csproj
+++ b/QSB/QSB.csproj
@@ -244,6 +244,7 @@
+
diff --git a/QSB/TimeSync/Patches/TimePatches.cs b/QSB/TimeSync/Patches/TimePatches.cs
new file mode 100644
index 00000000..a46f5020
--- /dev/null
+++ b/QSB/TimeSync/Patches/TimePatches.cs
@@ -0,0 +1,18 @@
+using QSB.Patches;
+
+namespace QSB.TimeSync.Patches
+{
+ class TimePatches : QSBPatch
+ {
+ public override QSBPatchTypes Type => QSBPatchTypes.OnClientConnect;
+
+ public override void DoPatches()
+ => QSBCore.HarmonyHelper.AddPrefix("OnStartOfTimeLoop", typeof(TimePatches), nameof(PlayerCameraEffectController_OnStartOfTimeLoop));
+
+ public override void DoUnpatches()
+ => QSBCore.HarmonyHelper.Unpatch("OnStartOfTimeLoop");
+
+ public static bool PlayerCameraEffectController_OnStartOfTimeLoop()
+ => false;
+ }
+}
diff --git a/QSB/TimeSync/WakeUpSync.cs b/QSB/TimeSync/WakeUpSync.cs
index f9197471..fb0d27b5 100644
--- a/QSB/TimeSync/WakeUpSync.cs
+++ b/QSB/TimeSync/WakeUpSync.cs
@@ -74,7 +74,6 @@ namespace QSB.TimeSync
private void OnSceneLoaded(OWScene scene, bool isInUniverse)
{
- DebugLog.DebugWrite($"ONSCENELOADED");
_hasWokenUp = false;
if (isInUniverse)
{