From 0ec34e596e4a266d1058b27863bfeba6aa0edf9f Mon Sep 17 00:00:00 2001 From: Mister_Nebula <41904486+misternebula@users.noreply.github.com> Date: Sun, 18 Apr 2021 09:29:12 +0100 Subject: [PATCH] fix crushing bugs --- .gitignore | 1 + QSB/Patches/QSBPatchManager.cs | 4 +++- QSB/Player/Patches/PlayerPatches.cs | 20 ++++++++++++++++++++ QSB/QSB.csproj | 3 ++- QSB/QSB.csproj.user | 2 +- QSB/manifest.json | 2 +- 6 files changed, 28 insertions(+), 4 deletions(-) create mode 100644 QSB/Player/Patches/PlayerPatches.cs diff --git a/.gitignore b/.gitignore index cb9fb082..eeca698c 100644 --- a/.gitignore +++ b/.gitignore @@ -361,3 +361,4 @@ QSB.csproj.user GameAssets/ Chert/ Riebeck/ +OWML.Config.json diff --git a/QSB/Patches/QSBPatchManager.cs b/QSB/Patches/QSBPatchManager.cs index 9fb4c77b..43f37552 100644 --- a/QSB/Patches/QSBPatchManager.cs +++ b/QSB/Patches/QSBPatchManager.cs @@ -8,6 +8,7 @@ using QSB.GeyserSync.Patches; using QSB.ItemSync.Patches; using QSB.LogSync.Patches; using QSB.OrbSync.Patches; +using QSB.Player.Patches; using QSB.PoolSync.Patches; using QSB.QuantumSync.Patches; using QSB.RoastingSync.Patches; @@ -49,7 +50,8 @@ namespace QSB.Patches new GeyserPatches(), new PoolPatches(), new CampfirePatches(), - new RoastingPatches() + new RoastingPatches(), + new PlayerPatches() }; DebugLog.DebugWrite("Patch Manager ready.", MessageType.Success); diff --git a/QSB/Player/Patches/PlayerPatches.cs b/QSB/Player/Patches/PlayerPatches.cs new file mode 100644 index 00000000..4506de19 --- /dev/null +++ b/QSB/Player/Patches/PlayerPatches.cs @@ -0,0 +1,20 @@ +using QSB.Patches; + +namespace QSB.Player.Patches +{ + internal class PlayerPatches : QSBPatch + { + public override QSBPatchTypes Type => QSBPatchTypes.OnClientConnect; + + public override void DoPatches() => QSBCore.HarmonyHelper.AddPrefix("CrushPlayer", typeof(PlayerPatches), nameof(PlayerCrushedController_CrushPlayer)); + public override void DoUnpatches() => QSBCore.HarmonyHelper.Unpatch("CrushPlayer"); + + public static bool PlayerCrushedController_CrushPlayer() + { + // #CrushIt https://www.twitch.tv/videos/846916781?t=00h03m51s + // this is what you get from me when you mix tiredness and a headache - jokes and references only i will get + Locator.GetDeathManager().KillPlayer(DeathType.Crushed); + return false; + } + } +} diff --git a/QSB/QSB.csproj b/QSB/QSB.csproj index 9c0a9055..40cc54d7 100644 --- a/QSB/QSB.csproj +++ b/QSB/QSB.csproj @@ -74,7 +74,7 @@ False - D:\EpicGames\OuterWilds\OuterWilds_Data\Managed\UnityEngine.ParticleSystemModule.dll + $(GameDir)\OuterWilds_Data\Managed\UnityEngine.ParticleSystemModule.dll False @@ -142,6 +142,7 @@ + diff --git a/QSB/QSB.csproj.user b/QSB/QSB.csproj.user index 7bf6c3df..9f1e3257 100644 --- a/QSB/QSB.csproj.user +++ b/QSB/QSB.csproj.user @@ -1,7 +1,7 @@  - D:\EpicGames\OuterWilds + E:\Epic\Epic Games\OuterWilds C:\Users\Henry\AppData\Roaming\OuterWildsModManager\OWML ShowAllFiles diff --git a/QSB/manifest.json b/QSB/manifest.json index cfd60e4a..fc9a65be 100644 --- a/QSB/manifest.json +++ b/QSB/manifest.json @@ -4,6 +4,6 @@ "name": "Quantum Space Buddies", "description": "Adds online multiplayer to the game.", "uniqueName": "Raicuparta.QuantumSpaceBuddies", - "version": "0.10.0", + "version": "0.10.1", "owmlVersion": "1.1.8" } \ No newline at end of file