mirror of
https://github.com/SDraw/ml_mods_cvr.git
synced 2026-06-23 23:08:26 +00:00
PRM fix for build 2026r181
This commit is contained in:
parent
49987b5d72
commit
e357f83227
9 changed files with 88 additions and 142 deletions
|
|
@ -23,7 +23,6 @@ namespace ml_prm
|
|||
AngularDrag,
|
||||
Gravity,
|
||||
PointersReaction,
|
||||
IgnoreLocal,
|
||||
CombatReaction,
|
||||
AutoRecover,
|
||||
RecoverDelay,
|
||||
|
|
@ -34,8 +33,7 @@ namespace ml_prm
|
|||
Buoyancy,
|
||||
FallDamage,
|
||||
FallLimit,
|
||||
GestureGrab,
|
||||
FriendsGrab
|
||||
GestureGrab
|
||||
}
|
||||
|
||||
public static bool Hotkey { get; private set; } = true;
|
||||
|
|
@ -45,7 +43,6 @@ namespace ml_prm
|
|||
public static float AngularDrag { get; private set; } = 2f;
|
||||
public static bool Gravity { get; private set; } = true;
|
||||
public static bool PointersReaction { get; private set; } = true;
|
||||
public static bool IgnoreLocal { get; private set; } = true;
|
||||
public static bool CombatReaction { get; private set; } = true;
|
||||
public static bool AutoRecover { get; private set; } = false;
|
||||
public static float RecoverDelay { get; private set; } = 3f;
|
||||
|
|
@ -57,8 +54,6 @@ namespace ml_prm
|
|||
public static bool FallDamage { get; private set; } = true;
|
||||
public static float FallLimit { get; private set; } = 9.899494f;
|
||||
public static bool GestureGrab { get; private set; } = false;
|
||||
public static bool FriendsGrab { get; private set; } = true;
|
||||
public static float GrabDistance { get; private set; } = 0.1f;
|
||||
|
||||
public static readonly SettingEvent<bool> OnHotkeyChanged = new SettingEvent<bool>();
|
||||
public static readonly SettingEvent<KeyCode> OnHotkeyKeyChanged = new SettingEvent<KeyCode>();
|
||||
|
|
@ -67,7 +62,6 @@ namespace ml_prm
|
|||
public static readonly SettingEvent<float> OnAngularDragChanged = new SettingEvent<float>();
|
||||
public static readonly SettingEvent<bool> OnGravityChanged = new SettingEvent<bool>();
|
||||
public static readonly SettingEvent<bool> OnPointersReactionChanged = new SettingEvent<bool>();
|
||||
public static readonly SettingEvent<bool> OnIgnoreLocalChanged = new SettingEvent<bool>();
|
||||
public static readonly SettingEvent<bool> OnCombatReactionChanged = new SettingEvent<bool>();
|
||||
public static readonly SettingEvent<bool> OnAutoRecoverChanged = new SettingEvent<bool>();
|
||||
public static readonly SettingEvent<float> OnRecoverDelayChanged = new SettingEvent<float>();
|
||||
|
|
@ -79,8 +73,6 @@ namespace ml_prm
|
|||
public static readonly SettingEvent<bool> OnFallDamageChanged = new SettingEvent<bool>();
|
||||
public static readonly SettingEvent<float> OnFallLimitChanged = new SettingEvent<float>();
|
||||
public static readonly SettingEvent<bool> OnGestureGrabChanged = new SettingEvent<bool>();
|
||||
public static readonly SettingEvent<bool> OnFriendsGrabChanged = new SettingEvent<bool>();
|
||||
public static readonly SettingEvent<float> OnGrabDistanceChanged = new SettingEvent<float>();
|
||||
|
||||
static MelonLoader.MelonPreferences_Category ms_category = null;
|
||||
static List<MelonLoader.MelonPreferences_Entry> ms_entries = null;
|
||||
|
|
@ -98,7 +90,6 @@ namespace ml_prm
|
|||
ms_category.CreateEntry(ModSetting.AngularDrag.ToString(), AngularDrag, null, null, true),
|
||||
ms_category.CreateEntry(ModSetting.Gravity.ToString(), Gravity, null, null, true),
|
||||
ms_category.CreateEntry(ModSetting.PointersReaction.ToString(), PointersReaction, null, null, true),
|
||||
ms_category.CreateEntry(ModSetting.IgnoreLocal.ToString(), IgnoreLocal, null, null, true),
|
||||
ms_category.CreateEntry(ModSetting.CombatReaction.ToString(), CombatReaction, null, null, true),
|
||||
ms_category.CreateEntry(ModSetting.AutoRecover.ToString(), AutoRecover, null, null, true),
|
||||
ms_category.CreateEntry(ModSetting.RecoverDelay.ToString(), RecoverDelay, null, null, true),
|
||||
|
|
@ -109,8 +100,7 @@ namespace ml_prm
|
|||
ms_category.CreateEntry(ModSetting.Buoyancy.ToString(), Buoyancy, null, null, true),
|
||||
ms_category.CreateEntry(ModSetting.FallDamage.ToString(), FallDamage, null, null, true),
|
||||
ms_category.CreateEntry(ModSetting.FallLimit.ToString(), FallLimit, null, null, true),
|
||||
ms_category.CreateEntry(ModSetting.GestureGrab.ToString(), GestureGrab, null, null, true),
|
||||
ms_category.CreateEntry(ModSetting.FriendsGrab.ToString(), FriendsGrab, null, null, true)
|
||||
ms_category.CreateEntry(ModSetting.GestureGrab.ToString(), GestureGrab, null, null, true)
|
||||
};
|
||||
|
||||
ms_entries[(int)ModSetting.HotkeyKey].OnEntryValueChangedUntyped.Subscribe(OnMelonSettingSave_HotkeyKey);
|
||||
|
|
@ -122,7 +112,6 @@ namespace ml_prm
|
|||
AngularDrag = Mathf.Clamp((float)ms_entries[(int)ModSetting.AngularDrag].BoxedValue, 0f, 50f);
|
||||
Gravity = (bool)ms_entries[(int)ModSetting.Gravity].BoxedValue;
|
||||
PointersReaction = (bool)ms_entries[(int)ModSetting.PointersReaction].BoxedValue;
|
||||
IgnoreLocal = (bool)ms_entries[(int)ModSetting.IgnoreLocal].BoxedValue;
|
||||
CombatReaction = (bool)ms_entries[(int)ModSetting.CombatReaction].BoxedValue;
|
||||
AutoRecover = (bool)ms_entries[(int)ModSetting.AutoRecover].BoxedValue;
|
||||
RecoverDelay = Mathf.Clamp((float)ms_entries[(int)ModSetting.RecoverDelay].BoxedValue, 1f, 10f);
|
||||
|
|
@ -134,7 +123,6 @@ namespace ml_prm
|
|||
FallDamage = (bool)ms_entries[(int)ModSetting.FallDamage].BoxedValue;
|
||||
FallLimit = Mathf.Clamp((float)ms_entries[(int)ModSetting.FallLimit].BoxedValue, 4.5f, 44.5f);
|
||||
GestureGrab = (bool)ms_entries[(int)ModSetting.GestureGrab].BoxedValue;
|
||||
FriendsGrab = (bool)ms_entries[(int)ModSetting.FriendsGrab].BoxedValue;
|
||||
}
|
||||
|
||||
static void OnMelonSettingSave_HotkeyKey(object p_oldValue, object p_newValue)
|
||||
|
|
@ -181,13 +169,6 @@ namespace ml_prm
|
|||
}
|
||||
break;
|
||||
|
||||
case ModSetting.IgnoreLocal:
|
||||
{
|
||||
IgnoreLocal = (bool)p_value;
|
||||
OnIgnoreLocalChanged.Invoke(IgnoreLocal);
|
||||
}
|
||||
break;
|
||||
|
||||
case ModSetting.CombatReaction:
|
||||
{
|
||||
CombatReaction = (bool)p_value;
|
||||
|
|
@ -251,13 +232,6 @@ namespace ml_prm
|
|||
}
|
||||
break;
|
||||
|
||||
case ModSetting.FriendsGrab:
|
||||
{
|
||||
FriendsGrab = (bool)p_value;
|
||||
OnFriendsGrabChanged.Invoke(FriendsGrab);
|
||||
}
|
||||
break;
|
||||
|
||||
// Floats
|
||||
case ModSetting.VelocityMultiplier:
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue