From d4dc8fba4445ab15fd02bdbd1beff9c9357c67d6 Mon Sep 17 00:00:00 2001 From: NotAKidoS <37721153+NotAKidoS@users.noreply.github.com> Date: Tue, 31 Dec 2024 11:14:39 -0600 Subject: [PATCH] LegacyContentMitigation: prepare for submission --- .../Integrations/BtkUiAddon.cs | 2 +- LegacyContentMitigation/Patches.cs | 5 +++- LegacyContentMitigation/README.md | 18 +++++++++++++++ LegacyContentMitigation/format.json | 23 +++++++++++++++++++ 4 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 LegacyContentMitigation/README.md create mode 100644 LegacyContentMitigation/format.json diff --git a/LegacyContentMitigation/Integrations/BtkUiAddon.cs b/LegacyContentMitigation/Integrations/BtkUiAddon.cs index 7a11187..db20f11 100644 --- a/LegacyContentMitigation/Integrations/BtkUiAddon.cs +++ b/LegacyContentMitigation/Integrations/BtkUiAddon.cs @@ -41,7 +41,7 @@ public static class BtkUiAddon string.Empty, "Records Camera events & logs them next frame. Useful for determining camera render order shenanigans."); printCameraCallbacksButton.OnPress += () => CameraCallbackLogger.Instance.LogCameraEvents(); - OnCurrentStateToggled(FakeMultiPassHack.Instance.IsEnabled); + OnMultiPassActiveChanged(FakeMultiPassHack.Instance.IsEnabled); FakeMultiPassHack.OnMultiPassActiveChanged += OnMultiPassActiveChanged; } diff --git a/LegacyContentMitigation/Patches.cs b/LegacyContentMitigation/Patches.cs index 8fb82c5..e2dabaf 100644 --- a/LegacyContentMitigation/Patches.cs +++ b/LegacyContentMitigation/Patches.cs @@ -9,6 +9,7 @@ using ABI.CCK.Components; using HarmonyLib; using UnityEngine; using UnityEngine.Rendering.PostProcessing; +using UnityEngine.SceneManagement; namespace NAK.LegacyContentMitigation.Patches; @@ -27,8 +28,10 @@ internal static class SceneLoaded_Patches { [HarmonyPrefix] [HarmonyPatch(typeof(SceneLoaded), nameof(SceneLoaded.OnSceneLoadedHandleJob))] - private static void Prefix_SceneLoaded_OnSceneLoadedHandleJob() + private static void Prefix_SceneLoaded_OnSceneLoadedHandleJob(Scene scene, LoadSceneMode mode) { + if (mode == LoadSceneMode.Additive) return; + if (!ModSettings.EntryAutoForLegacyWorlds.Value) { LegacyContentMitigationMod.Logger.Msg("LegacyContentMitigationMod is disabled."); diff --git a/LegacyContentMitigation/README.md b/LegacyContentMitigation/README.md new file mode 100644 index 0000000..0236abe --- /dev/null +++ b/LegacyContentMitigation/README.md @@ -0,0 +1,18 @@ +# LegacyContentMitigation + +Experimental mod that manually renders both VR eyes separately while in Legacy Worlds. + +The mod will automatically kick-in when loading NonSpi Worlds & prevent Shader Replacement for all content while active. You can also manually toggle it within the BTKUI Misc tab for experimenting. + +-# There is an obvious performance penalty with rendering the world 2x & toggling the head hiding per eye, so enabling the mod outside of Legacy Worlds is not recommended. + +--- + +Here is the block of text where I tell you this mod is not affiliated with or endorsed by ABI. +https://documentation.abinteractive.net/official/legal/tos/#7-modding-our-games + +> This mod is an independent creation not affiliated with, supported by, or approved by Alpha Blend Interactive. + +> Use of this mod is done so at the user's own risk and the creator cannot be held responsible for any issues arising from its use. + +> To the best of my knowledge, I have adhered to the Modding Guidelines established by Alpha Blend Interactive. diff --git a/LegacyContentMitigation/format.json b/LegacyContentMitigation/format.json new file mode 100644 index 0000000..65e88b1 --- /dev/null +++ b/LegacyContentMitigation/format.json @@ -0,0 +1,23 @@ +{ + "_id": -1, + "name": "LegacyContentMitigation", + "modversion": "1.0.0", + "gameversion": "2024r177", + "loaderversion": "0.6.1", + "modtype": "Mod", + "author": "NotAKidoS", + "description": "Experimental mod that manually renders both VR eyes separately while in Legacy Worlds.\n\nThe mod will automatically kick-in when loading NonSpi Worlds & prevent Shader Replacement for all content while active. You can also manually toggle it within the BTKUI Misc tab for experimenting.\n\n-# There is an obvious performance penalty with rendering the world 2x & toggling the head hiding per eye, so enabling the mod outside of Legacy Worlds is not recommended.", + "searchtags": [ + "legacy", + "content", + "spi", + "shaders" + ], + "requirements": [ + "BTKUILib" + ], + "downloadlink": "https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r44/LegacyContentMitigation.dll", + "sourcelink": "https://github.com/NotAKidoS/NAK_CVR_Mods/tree/main/LegacyContentMitigation/", + "changelog": "- Initial release", + "embedcolor": "#507e64" +} \ No newline at end of file