mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2026-06-25 07:48:23 +00:00
[NAK_CVR_Mods] Unfucked for 2026r182
This commit is contained in:
parent
c13dc8375a
commit
281403d68b
209 changed files with 3936 additions and 1122 deletions
|
|
@ -1,37 +0,0 @@
|
|||
using ABI.CCK.Components;
|
||||
using ABI_RC.Core.Player;
|
||||
using MelonLoader;
|
||||
using System.Reflection;
|
||||
using static NAK.ThirdPerson.CameraLogic;
|
||||
using ABI_RC.Core;
|
||||
|
||||
namespace NAK.ThirdPerson;
|
||||
|
||||
internal static class Patches
|
||||
{
|
||||
internal static void Apply(HarmonyLib.Harmony harmony)
|
||||
{
|
||||
harmony.Patch(
|
||||
typeof(PlayerSetup).GetMethod(nameof(PlayerSetup.SetDefaultCamValues), BindingFlags.Public | BindingFlags.Instance),
|
||||
postfix: typeof(Patches).GetMethod(nameof(OnPostWorldStart), BindingFlags.NonPublic | BindingFlags.Static).ToNewHarmonyMethod()
|
||||
);
|
||||
harmony.Patch(
|
||||
typeof(PlayerSetup).GetMethod(nameof(PlayerSetup.CopyRefCamValues), BindingFlags.Public | BindingFlags.Instance),
|
||||
postfix: typeof(Patches).GetMethod(nameof(OnPostWorldStart), BindingFlags.NonPublic | BindingFlags.Static).ToNewHarmonyMethod()
|
||||
);
|
||||
harmony.Patch(
|
||||
typeof(PlayerSetup).GetMethod(nameof(PlayerSetup.SetupIKScaling), BindingFlags.NonPublic | BindingFlags.Instance),
|
||||
postfix: typeof(Patches).GetMethod(nameof(OnScaleAdjusted), BindingFlags.NonPublic | BindingFlags.Static).ToNewHarmonyMethod()
|
||||
);
|
||||
harmony.Patch(
|
||||
typeof(CVRTools).GetMethod(nameof(CVRTools.ConfigureHudAffinity), BindingFlags.Public | BindingFlags.Static),
|
||||
postfix: typeof(Patches).GetMethod(nameof(OnConfigureHudAffinity), BindingFlags.NonPublic | BindingFlags.Static).ToNewHarmonyMethod()
|
||||
);
|
||||
}
|
||||
|
||||
//Copy camera settings & postprocessing components
|
||||
private static void OnPostWorldStart() => CopyPlayerCamValues();
|
||||
//Adjust camera distance with height as modifier
|
||||
private static void OnScaleAdjusted(ref float ____avatarScaleRelation) => AdjustScale(____avatarScaleRelation);
|
||||
private static void OnConfigureHudAffinity() => CheckVRMode();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue