From 13927f1d6790b95a329ce87bccfe324c346e5d4c Mon Sep 17 00:00:00 2001 From: NotAKidoS <37721153+NotAKidOnSteam@users.noreply.github.com> Date: Wed, 14 Jun 2023 12:51:02 -0500 Subject: [PATCH] [HeadBobbingFix] Rename from DesktopCameraFix confusing name for some --- DesktopCameraFix/format.json | 23 ------------------- .../HarmonyPatches.cs | 4 ++-- .../HeadBobbingFix.csproj | 0 {DesktopCameraFix => HeadBobbingFix}/Main.cs | 10 ++++---- .../Properties/AssemblyInfo.cs | 18 +++++++-------- .../README.md | 4 ++-- HeadBobbingFix/format.json | 23 +++++++++++++++++++ NAK_CVR_Mods.sln | 10 ++++---- 8 files changed, 46 insertions(+), 46 deletions(-) delete mode 100644 DesktopCameraFix/format.json rename {DesktopCameraFix => HeadBobbingFix}/HarmonyPatches.cs (90%) rename DesktopCameraFix/DesktopCameraFix.csproj => HeadBobbingFix/HeadBobbingFix.csproj (100%) rename {DesktopCameraFix => HeadBobbingFix}/Main.cs (73%) rename {DesktopCameraFix => HeadBobbingFix}/Properties/AssemblyInfo.cs (67%) rename {DesktopCameraFix => HeadBobbingFix}/README.md (86%) create mode 100644 HeadBobbingFix/format.json diff --git a/DesktopCameraFix/format.json b/DesktopCameraFix/format.json deleted file mode 100644 index 92cc892..0000000 --- a/DesktopCameraFix/format.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "_id": -1, - "name": "DesktopCameraFix", - "modversion": "1.0.0", - "gameversion": "2022r170", - "loaderversion": "0.5.7", - "modtype": "Mod", - "author": "NotAKidoS", - "description": "Fixes Desktop camera pivoting in place. Please view the README for more info: [README](https://github.com/NotAKidOnSteam/NAK_CVR_Mods/blob/main/DesktopCameraFix/README.md)", - "searchtags": [ - "desktop", - "camera", - "pivot", - "fix" - ], - "requirements": [ - "None" - ], - "downloadlink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/releases/download/r10/DesktopCameraFix.dll", - "sourcelink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/tree/main/DesktopCameraFix/", - "changelog": "- Initial Release", - "embedcolor": "#9b59b6" -} \ No newline at end of file diff --git a/DesktopCameraFix/HarmonyPatches.cs b/HeadBobbingFix/HarmonyPatches.cs similarity index 90% rename from DesktopCameraFix/HarmonyPatches.cs rename to HeadBobbingFix/HarmonyPatches.cs index 9d4d0c8..f482466 100644 --- a/DesktopCameraFix/HarmonyPatches.cs +++ b/HeadBobbingFix/HarmonyPatches.cs @@ -3,7 +3,7 @@ using ABI_RC.Systems.MovementSystem; using HarmonyLib; using UnityEngine; -namespace NAK.DesktopCameraFix.HarmonyPatches; +namespace NAK.HeadBobbingFix.HarmonyPatches; class PlayerSetupPatches { @@ -11,7 +11,7 @@ class PlayerSetupPatches [HarmonyPatch(typeof(PlayerSetup), nameof(PlayerSetup.HandleDesktopCameraPosition))] public static void Postfix_PlayerSetup_HandleDesktopCameraPosition(bool ignore, ref PlayerSetup __instance, ref MovementSystem ____movementSystem, ref int ___headBobbingLevel) { - if (!DesktopCameraFix.EntryEnabled.Value) + if (!HeadBobbingFix.EntryEnabled.Value) return; // this would be much simplier if I bothered with transpilers diff --git a/DesktopCameraFix/DesktopCameraFix.csproj b/HeadBobbingFix/HeadBobbingFix.csproj similarity index 100% rename from DesktopCameraFix/DesktopCameraFix.csproj rename to HeadBobbingFix/HeadBobbingFix.csproj diff --git a/DesktopCameraFix/Main.cs b/HeadBobbingFix/Main.cs similarity index 73% rename from DesktopCameraFix/Main.cs rename to HeadBobbingFix/Main.cs index 172ec03..c54d7fc 100644 --- a/DesktopCameraFix/Main.cs +++ b/HeadBobbingFix/Main.cs @@ -1,15 +1,15 @@ using ABI_RC.Core.Player; using MelonLoader; -namespace NAK.DesktopCameraFix; +namespace NAK.HeadBobbingFix; -public class DesktopCameraFix : MelonMod +public class HeadBobbingFix : MelonMod { public static readonly MelonPreferences_Category Category = - MelonPreferences.CreateCategory(nameof(DesktopCameraFix)); + MelonPreferences.CreateCategory(nameof(HeadBobbingFix)); public static readonly MelonPreferences_Entry EntryEnabled = - Category.CreateEntry("Enabled", true, description: "Toggle DesktopCameraFix entirely."); + Category.CreateEntry("Enabled", true, description: "Toggle HeadBobbingFix entirely. You need full headbobbing enabled for the mod to take effect."); public override void OnInitializeMelon() { @@ -19,7 +19,7 @@ public class DesktopCameraFix : MelonMod void OnEntryEnabledChanged(bool newValue, bool oldValue) { - if (newValue) PlayerSetup.Instance.SetViewPointOffset(); + if (newValue) PlayerSetup.Instance?.SetViewPointOffset(); } void ApplyPatches(Type type) diff --git a/DesktopCameraFix/Properties/AssemblyInfo.cs b/HeadBobbingFix/Properties/AssemblyInfo.cs similarity index 67% rename from DesktopCameraFix/Properties/AssemblyInfo.cs rename to HeadBobbingFix/Properties/AssemblyInfo.cs index bdb1575..5ddca21 100644 --- a/DesktopCameraFix/Properties/AssemblyInfo.cs +++ b/HeadBobbingFix/Properties/AssemblyInfo.cs @@ -1,20 +1,20 @@ -using DesktopCameraFix.Properties; -using MelonLoader; +using MelonLoader; +using NAK.HeadBobbingFix.Properties; using System.Reflection; [assembly: AssemblyVersion(AssemblyInfoParams.Version)] [assembly: AssemblyFileVersion(AssemblyInfoParams.Version)] [assembly: AssemblyInformationalVersion(AssemblyInfoParams.Version)] -[assembly: AssemblyTitle(nameof(NAK.DesktopCameraFix))] +[assembly: AssemblyTitle(nameof(NAK.HeadBobbingFix))] [assembly: AssemblyCompany(AssemblyInfoParams.Author)] -[assembly: AssemblyProduct(nameof(NAK.DesktopCameraFix))] +[assembly: AssemblyProduct(nameof(NAK.HeadBobbingFix))] [assembly: MelonInfo( - typeof(NAK.DesktopCameraFix.DesktopCameraFix), - nameof(NAK.DesktopCameraFix), + typeof(NAK.HeadBobbingFix.HeadBobbingFix), + nameof(NAK.HeadBobbingFix), AssemblyInfoParams.Version, AssemblyInfoParams.Author, - downloadLink: "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/tree/main/DesktopCameraFix" + downloadLink: "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/tree/main/HeadBobbingFix" )] [assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")] @@ -22,9 +22,9 @@ using System.Reflection; [assembly: MelonPlatformDomain(MelonPlatformDomainAttribute.CompatibleDomains.MONO)] [assembly: HarmonyDontPatchAll] -namespace DesktopCameraFix.Properties; +namespace NAK.HeadBobbingFix.Properties; internal static class AssemblyInfoParams { - public const string Version = "1.0.0"; + public const string Version = "1.0.1"; public const string Author = "NotAKidoS"; } \ No newline at end of file diff --git a/DesktopCameraFix/README.md b/HeadBobbingFix/README.md similarity index 86% rename from DesktopCameraFix/README.md rename to HeadBobbingFix/README.md index df78b5d..be0e3c2 100644 --- a/DesktopCameraFix/README.md +++ b/HeadBobbingFix/README.md @@ -1,5 +1,5 @@ -## DesktopCameraFix -Makes the Desktop camera pivot correctly with the viewpoint. +## HeadBobbingFix +Makes the Desktop camera pivot correctly with the viewpoint when full head bobbing is enabled. https://github.com/NotAKidOnSteam/NAK_CVR_Mods/assets/37721153/d2b0f918-b4a9-408a-b25f-4c68761ad1c7 diff --git a/HeadBobbingFix/format.json b/HeadBobbingFix/format.json new file mode 100644 index 0000000..d66fc46 --- /dev/null +++ b/HeadBobbingFix/format.json @@ -0,0 +1,23 @@ +{ + "_id": 165, + "name": "HeadBobbingFix", + "modversion": "1.0.1", + "gameversion": "2022r170", + "loaderversion": "0.5.7", + "modtype": "Mod", + "author": "NotAKidoS", + "description": "Fixes Desktop camera pivoting in place when full head bobbing is enabled. Please view the README for more info: [README](https://github.com/NotAKidOnSteam/NAK_CVR_Mods/blob/main/HeadBobbingFix/README.md)", + "searchtags": [ + "desktop", + "camera", + "pivot", + "fix" + ], + "requirements": [ + "None" + ], + "downloadlink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/releases/download/r11/HeadBobbingFix.dll", + "sourcelink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/tree/main/HeadBobbingFix/", + "changelog": "- Initial Release\n- Rename to HeadBobbingFix to prevent confusion", + "embedcolor": "#e33b24" +} \ No newline at end of file diff --git a/NAK_CVR_Mods.sln b/NAK_CVR_Mods.sln index 2ae5ab5..9ecb5b1 100644 --- a/NAK_CVR_Mods.sln +++ b/NAK_CVR_Mods.sln @@ -59,7 +59,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SmoothRay", "SmoothRay\Smoo EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TrackedPointFix", "TrackedPointFix\TrackedPointFix.csproj", "{0A6788A8-89E9-4FC4-B4FE-27FE8B39926C}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DesktopCameraFix", "DesktopCameraFix\DesktopCameraFix.csproj", "{E17F78BF-90FB-44F7-A919-EDDF0BC1AF01}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HeadBobbingFix", "HeadBobbingFix\HeadBobbingFix.csproj", "{EFE40A43-3FA4-4B61-8A7E-78789792F127}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -179,10 +179,10 @@ Global {0A6788A8-89E9-4FC4-B4FE-27FE8B39926C}.Debug|Any CPU.Build.0 = Debug|Any CPU {0A6788A8-89E9-4FC4-B4FE-27FE8B39926C}.Release|Any CPU.ActiveCfg = Release|Any CPU {0A6788A8-89E9-4FC4-B4FE-27FE8B39926C}.Release|Any CPU.Build.0 = Release|Any CPU - {E17F78BF-90FB-44F7-A919-EDDF0BC1AF01}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E17F78BF-90FB-44F7-A919-EDDF0BC1AF01}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E17F78BF-90FB-44F7-A919-EDDF0BC1AF01}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E17F78BF-90FB-44F7-A919-EDDF0BC1AF01}.Release|Any CPU.Build.0 = Release|Any CPU + {EFE40A43-3FA4-4B61-8A7E-78789792F127}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EFE40A43-3FA4-4B61-8A7E-78789792F127}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EFE40A43-3FA4-4B61-8A7E-78789792F127}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EFE40A43-3FA4-4B61-8A7E-78789792F127}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE