mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 14:29:25 +00:00
Move mods to Depricated folder.
This commit is contained in:
parent
e61f119f32
commit
5d1cb2ebec
70 changed files with 44 additions and 119 deletions
30
.DepricatedMods/HeadBobbingFix/HarmonyPatches.cs
Normal file
30
.DepricatedMods/HeadBobbingFix/HarmonyPatches.cs
Normal file
|
@ -0,0 +1,30 @@
|
|||
using ABI_RC.Core.Player;
|
||||
using ABI_RC.Systems.MovementSystem;
|
||||
using HarmonyLib;
|
||||
using UnityEngine;
|
||||
|
||||
namespace NAK.HeadBobbingFix.HarmonyPatches;
|
||||
|
||||
class PlayerSetupPatches
|
||||
{
|
||||
[HarmonyPostfix]
|
||||
[HarmonyPatch(typeof(PlayerSetup), nameof(PlayerSetup.HandleDesktopCameraPosition))]
|
||||
public static void Postfix_PlayerSetup_HandleDesktopCameraPosition(bool ignore, ref PlayerSetup __instance, ref MovementSystem ____movementSystem, ref int ___headBobbingLevel)
|
||||
{
|
||||
if (!HeadBobbingFix.EntryEnabled.Value)
|
||||
return;
|
||||
|
||||
// this would be much simplier if I bothered with transpilers
|
||||
if (____movementSystem.disableCameraControl && !ignore)
|
||||
return;
|
||||
|
||||
if (___headBobbingLevel != 2)
|
||||
return;
|
||||
|
||||
Transform viewpointTransform = __instance._viewPoint.pointer.transform;
|
||||
if (viewpointTransform != null)
|
||||
{
|
||||
__instance.desktopCamera.transform.position = viewpointTransform.position;
|
||||
}
|
||||
}
|
||||
}
|
2
.DepricatedMods/HeadBobbingFix/HeadBobbingFix.csproj
Normal file
2
.DepricatedMods/HeadBobbingFix/HeadBobbingFix.csproj
Normal file
|
@ -0,0 +1,2 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project Sdk="Microsoft.NET.Sdk"/>
|
37
.DepricatedMods/HeadBobbingFix/Main.cs
Normal file
37
.DepricatedMods/HeadBobbingFix/Main.cs
Normal file
|
@ -0,0 +1,37 @@
|
|||
using ABI_RC.Core.Player;
|
||||
using MelonLoader;
|
||||
|
||||
namespace NAK.HeadBobbingFix;
|
||||
|
||||
public class HeadBobbingFix : MelonMod
|
||||
{
|
||||
public static readonly MelonPreferences_Category Category =
|
||||
MelonPreferences.CreateCategory(nameof(HeadBobbingFix));
|
||||
|
||||
public static readonly MelonPreferences_Entry<bool> EntryEnabled =
|
||||
Category.CreateEntry("Enabled", true, description: "Toggle HeadBobbingFix entirely. You need full headbobbing enabled for the mod to take effect.");
|
||||
|
||||
public override void OnInitializeMelon()
|
||||
{
|
||||
EntryEnabled.OnEntryValueChanged.Subscribe(OnEntryEnabledChanged);
|
||||
ApplyPatches(typeof(HarmonyPatches.PlayerSetupPatches));
|
||||
}
|
||||
|
||||
void OnEntryEnabledChanged(bool newValue, bool oldValue)
|
||||
{
|
||||
if (newValue) PlayerSetup.Instance?.SetViewPointOffset();
|
||||
}
|
||||
|
||||
void ApplyPatches(Type type)
|
||||
{
|
||||
try
|
||||
{
|
||||
HarmonyInstance.PatchAll(type);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
LoggerInstance.Msg($"Failed while patching {type.Name}!");
|
||||
LoggerInstance.Error(e);
|
||||
}
|
||||
}
|
||||
}
|
30
.DepricatedMods/HeadBobbingFix/Properties/AssemblyInfo.cs
Normal file
30
.DepricatedMods/HeadBobbingFix/Properties/AssemblyInfo.cs
Normal file
|
@ -0,0 +1,30 @@
|
|||
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.HeadBobbingFix))]
|
||||
[assembly: AssemblyCompany(AssemblyInfoParams.Author)]
|
||||
[assembly: AssemblyProduct(nameof(NAK.HeadBobbingFix))]
|
||||
|
||||
[assembly: MelonInfo(
|
||||
typeof(NAK.HeadBobbingFix.HeadBobbingFix),
|
||||
nameof(NAK.HeadBobbingFix),
|
||||
AssemblyInfoParams.Version,
|
||||
AssemblyInfoParams.Author,
|
||||
downloadLink: "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/tree/main/HeadBobbingFix"
|
||||
)]
|
||||
|
||||
[assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")]
|
||||
[assembly: MelonPlatform(MelonPlatformAttribute.CompatiblePlatforms.WINDOWS_X64)]
|
||||
[assembly: MelonPlatformDomain(MelonPlatformDomainAttribute.CompatibleDomains.MONO)]
|
||||
[assembly: HarmonyDontPatchAll]
|
||||
|
||||
namespace NAK.HeadBobbingFix.Properties;
|
||||
internal static class AssemblyInfoParams
|
||||
{
|
||||
public const string Version = "1.0.1";
|
||||
public const string Author = "NotAKidoS";
|
||||
}
|
18
.DepricatedMods/HeadBobbingFix/README.md
Normal file
18
.DepricatedMods/HeadBobbingFix/README.md
Normal file
|
@ -0,0 +1,18 @@
|
|||
## 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
|
||||
|
||||
## Relevant Feedback Posts:
|
||||
https://feedback.abinteractive.net/p/pivot-desktop-camera-with-head
|
||||
|
||||
---
|
||||
|
||||
Here is the block of text where I tell you this mod is not affiliated or endorsed by ABI.
|
||||
https://documentation.abinteractive.net/official/legal/tos/#7-modding-our-games
|
||||
|
||||
> This mod is an independent creation and is 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.
|
23
.DepricatedMods/HeadBobbingFix/format.json
Normal file
23
.DepricatedMods/HeadBobbingFix/format.json
Normal file
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"_id": 165,
|
||||
"name": "HeadBobbingFix",
|
||||
"modversion": "1.0.1",
|
||||
"gameversion": "2022r170p1",
|
||||
"loaderversion": "0.6.1",
|
||||
"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"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue