mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 06:19:22 +00:00
[RelativeSync] Fixed buncha stuff, cleanup
This commit is contained in:
parent
b97265ef37
commit
b786ecd51c
11 changed files with 429 additions and 231 deletions
48
RelativeSync/ModSettings.cs
Normal file
48
RelativeSync/ModSettings.cs
Normal file
|
@ -0,0 +1,48 @@
|
|||
using MelonLoader;
|
||||
using NAK.RelativeSync.Networking;
|
||||
|
||||
namespace NAK.RelativeSync;
|
||||
|
||||
internal static class ModSettings
|
||||
{
|
||||
internal const string ModName = nameof(RelativeSync);
|
||||
|
||||
#region Melon Preferences
|
||||
|
||||
private static readonly MelonPreferences_Category Category =
|
||||
MelonPreferences.CreateCategory(ModName);
|
||||
|
||||
private static readonly MelonPreferences_Entry<bool> DebugLogInbound =
|
||||
Category.CreateEntry("DebugLogInbound", false,
|
||||
"Debug Log Inbound", description: "Log inbound network messages.");
|
||||
|
||||
private static readonly MelonPreferences_Entry<bool> DebugLogOutbound =
|
||||
Category.CreateEntry("DebugLogOutbound", false,
|
||||
"Debug Log Outbound", description: "Log outbound network messages.");
|
||||
|
||||
private static readonly MelonPreferences_Entry<bool> ExpSyncedObjectHack =
|
||||
Category.CreateEntry("ExpSyncedObjectHack", false,
|
||||
"Exp Spawnable Sync Fix", description: "Forces CVRSpawnable to update position in FixedUpdate. May help reduce local jitter on synced movement parents.");
|
||||
|
||||
private static readonly MelonPreferences_Entry<bool> ExpNoInterpolationOnBBCC =
|
||||
Category.CreateEntry("ExpNoInterpolationOnBBCC", false,
|
||||
"Exp Disable Interpolation on BBCC", description: "Disable interpolation on Better Better Character Controller. May help reduce local jitter on synced movement parents.");
|
||||
|
||||
#endregion Melon Preferences
|
||||
|
||||
internal static void Initialize()
|
||||
{
|
||||
foreach (MelonPreferences_Entry setting in Category.Entries)
|
||||
setting.OnEntryValueChangedUntyped.Subscribe(OnSettingsChanged);
|
||||
|
||||
OnSettingsChanged();
|
||||
}
|
||||
|
||||
private static void OnSettingsChanged(object oldValue = null, object newValue = null)
|
||||
{
|
||||
ModNetwork.Debug_NetworkInbound = DebugLogInbound.Value;
|
||||
ModNetwork.Debug_NetworkOutbound = DebugLogOutbound.Value;
|
||||
Patches.CVRSpawnablePatches.UseHack = ExpSyncedObjectHack.Value;
|
||||
Patches.BetterBetterCharacterControllerPatches.NoInterpolation = ExpNoInterpolationOnBBCC.Value;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue