Scaled jump

Minor changes
This commit is contained in:
SDraw 2023-05-07 20:42:52 +03:00
parent 08b1909d52
commit e73dd54e7b
No known key found for this signature in database
GPG key ID: BB95B4DAB2BB8BB5
11 changed files with 435 additions and 216 deletions

View file

@ -21,6 +21,7 @@ namespace ml_amt
FollowHips,
CollisionScale,
ScaledSteps,
ScaledJump,
MassCenter,
OverrideFix
};
@ -37,6 +38,7 @@ namespace ml_amt
public static bool FollowHips { get; private set; } = true;
public static bool MassCenter { get; private set; } = true;
public static bool ScaledSteps { get; private set; } = true;
public static bool ScaledJump { get; private set; } = false;
public static bool CollisionScale { get; private set; } = true;
public static bool OverrideFix { get; private set; } = true;
@ -55,6 +57,7 @@ namespace ml_amt
static public event Action<bool> FollowHipsChange;
static public event Action<bool> MassCenterChange;
static public event Action<bool> ScaledStepsChange;
static public event Action<bool> ScaledJumpChange;
static public event Action<bool> CollisionScaleChange;
static public event Action<bool> OverrideFixChange;
@ -76,11 +79,26 @@ namespace ml_amt
ms_category.CreateEntry(ModSetting.FollowHips.ToString(), FollowHips),
ms_category.CreateEntry(ModSetting.MassCenter.ToString(), MassCenter),
ms_category.CreateEntry(ModSetting.ScaledSteps.ToString(), ScaledSteps),
ms_category.CreateEntry(ModSetting.ScaledJump.ToString(), ScaledJump),
ms_category.CreateEntry(ModSetting.CollisionScale.ToString(), CollisionScale),
ms_category.CreateEntry(ModSetting.OverrideFix.ToString(), OverrideFix)
};
Load();
IKOverrideCrouch = (bool)ms_entries[(int)ModSetting.IKOverrideCrouch].BoxedValue;
CrouchLimit = ((int)ms_entries[(int)ModSetting.CrouchLimit].BoxedValue) * 0.01f;
IKOverrideProne = (bool)ms_entries[(int)ModSetting.IKOverrideProne].BoxedValue;
ProneLimit = ((int)ms_entries[(int)ModSetting.ProneLimit].BoxedValue) * 0.01f;
PoseTransitions = (bool)ms_entries[(int)ModSetting.PoseTransitions].BoxedValue;
AdjustedMovement = (bool)ms_entries[(int)ModSetting.AdjustedMovement].BoxedValue;
IKOverrideFly = (bool)ms_entries[(int)ModSetting.IKOverrideFly].BoxedValue;
IKOverrideJump = (bool)ms_entries[(int)ModSetting.IKOverrideJump].BoxedValue;
DetectEmotes = (bool)ms_entries[(int)ModSetting.DetectEmotes].BoxedValue;
FollowHips = (bool)ms_entries[(int)ModSetting.FollowHips].BoxedValue;
MassCenter = (bool)ms_entries[(int)ModSetting.MassCenter].BoxedValue;
ScaledSteps = (bool)ms_entries[(int)ModSetting.ScaledSteps].BoxedValue;
ScaledJump = (bool)ms_entries[(int)ModSetting.ScaledJump].BoxedValue;
CollisionScale = (bool)ms_entries[(int)ModSetting.CollisionScale].BoxedValue;
OverrideFix = (bool)ms_entries[(int)ModSetting.OverrideFix].BoxedValue;
MelonLoader.MelonCoroutines.Start(WaitMainMenuUi());
}
@ -107,24 +125,6 @@ namespace ml_amt
};
}
static void Load()
{
IKOverrideCrouch = (bool)ms_entries[(int)ModSetting.IKOverrideCrouch].BoxedValue;
CrouchLimit = ((int)ms_entries[(int)ModSetting.CrouchLimit].BoxedValue) * 0.01f;
IKOverrideProne = (bool)ms_entries[(int)ModSetting.IKOverrideProne].BoxedValue;
ProneLimit = ((int)ms_entries[(int)ModSetting.ProneLimit].BoxedValue) * 0.01f;
PoseTransitions = (bool)ms_entries[(int)ModSetting.PoseTransitions].BoxedValue;
AdjustedMovement = (bool)ms_entries[(int)ModSetting.AdjustedMovement].BoxedValue;
IKOverrideFly = (bool)ms_entries[(int)ModSetting.IKOverrideFly].BoxedValue;
IKOverrideJump = (bool)ms_entries[(int)ModSetting.IKOverrideJump].BoxedValue;
DetectEmotes = (bool)ms_entries[(int)ModSetting.DetectEmotes].BoxedValue;
FollowHips = (bool)ms_entries[(int)ModSetting.FollowHips].BoxedValue;
MassCenter = (bool)ms_entries[(int)ModSetting.MassCenter].BoxedValue;
ScaledSteps = (bool)ms_entries[(int)ModSetting.ScaledSteps].BoxedValue;
CollisionScale = (bool)ms_entries[(int)ModSetting.CollisionScale].BoxedValue;
OverrideFix = (bool)ms_entries[(int)ModSetting.OverrideFix].BoxedValue;
}
static void OnSliderUpdate(string p_name, string p_value)
{
if(Enum.TryParse(p_name, out ModSetting l_setting))
@ -226,6 +226,13 @@ namespace ml_amt
}
break;
case ModSetting.ScaledJump:
{
ScaledJump = bool.Parse(p_value);
ScaledJumpChange?.Invoke(ScaledJump);
}
break;
case ModSetting.CollisionScale:
{
CollisionScale = bool.Parse(p_value);