mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 14:29:25 +00:00
[AvatarScaleMod] Mod Network attempt 2.
I lost the first attempt when switching branches. Lot of this still needs to be redone, as it is just quickly slapped together atm.
This commit is contained in:
parent
69cb3b7804
commit
d599f57973
13 changed files with 850 additions and 544 deletions
|
@ -8,32 +8,68 @@ internal static class ModSettings
|
|||
{
|
||||
public static readonly MelonPreferences_Category Category =
|
||||
MelonPreferences.CreateCategory(nameof(AvatarScaleMod));
|
||||
|
||||
|
||||
// AvatarScaleTool supported scaling settings
|
||||
public static readonly MelonPreferences_Entry<bool> EntryEnabled =
|
||||
Category.CreateEntry("Enabled", true, description: "Toggle AvatarScaleMod entirely for Local user. Kinda.");
|
||||
|
||||
Category.CreateEntry("AvatarScaleTool Scaling", true, description: "Should there be persistant avatar scaling? This only works properly across supported avatars.");
|
||||
public static readonly MelonPreferences_Entry<bool> EntryPersistAnyways =
|
||||
Category.CreateEntry("Persist From Unsupported", true, description: "Should avatar scale persist even from unsupported avatars?");
|
||||
|
||||
// Universal scaling settings (Mod Network, requires others to have mod)
|
||||
public static readonly MelonPreferences_Entry<bool> EntryUniversalScaling =
|
||||
Category.CreateEntry("Force Universal Scaling", false, description: "Should the mod use Mod Network for scaling? This makes it work on all avatars, but others need the mod.");
|
||||
public static readonly MelonPreferences_Entry<bool> EntryScaleConstraints =
|
||||
Category.CreateEntry("Scale Constraints", false, description: "Should constraints be scaled with Universal Scaling?");
|
||||
public static readonly MelonPreferences_Entry<bool> EntryScaleLights =
|
||||
Category.CreateEntry("Scale Lights", false, description: "Should lights be scaled with Universal Scaling?");
|
||||
public static readonly MelonPreferences_Entry<bool> EntryScaleAudioSources =
|
||||
Category.CreateEntry("Scale Audio Sources", false, description: "Should audio sources be scaled with Universal Scaling?");
|
||||
|
||||
// General scaling settings
|
||||
public static readonly MelonPreferences_Entry<bool> EntryUseScaleGesture =
|
||||
Category.CreateEntry("Scale Gesture", false, description: "Use two fists to scale yourself easily.");
|
||||
|
||||
|
||||
// Internal settings
|
||||
public static readonly MelonPreferences_Entry<float> HiddenLastAvatarScale =
|
||||
Category.CreateEntry("Last Avatar Scale", -1f, is_hidden: true);
|
||||
|
||||
static ModSettings()
|
||||
{
|
||||
EntryEnabled.OnEntryValueChanged.Subscribe(OnEntryEnabledChanged);
|
||||
EntryUseScaleGesture.OnEntryValueChanged.Subscribe(OnEntryUseScaleGestureChanged);
|
||||
}
|
||||
|
||||
public static void InitializeModSettings()
|
||||
{
|
||||
AvatarScaleManager.GlobalEnabled = EntryEnabled.Value;
|
||||
AvatarScaleGesture.GestureEnabled = EntryUseScaleGesture.Value;
|
||||
EntryPersistAnyways.OnEntryValueChanged.Subscribe(OnEntryPersistAnywaysChanged);
|
||||
EntryUniversalScaling.OnEntryValueChanged.Subscribe(OnEntryUniversalScalingChanged);
|
||||
EntryScaleConstraints.OnEntryValueChanged.Subscribe(OnEntryScaleConstraintsChanged);
|
||||
}
|
||||
|
||||
private static void OnEntryEnabledChanged(bool oldValue, bool newValue)
|
||||
{
|
||||
AvatarScaleManager.GlobalEnabled = newValue;
|
||||
//AvatarScaleManager.UseUniversalScaling = newValue;
|
||||
}
|
||||
|
||||
private static void OnEntryUseScaleGestureChanged(bool oldValue, bool newValue)
|
||||
{
|
||||
AvatarScaleGesture.GestureEnabled = newValue;
|
||||
//AvatarScaleGesture.GestureEnabled = newValue;
|
||||
}
|
||||
|
||||
private static void OnEntryPersistAnywaysChanged(bool oldValue, bool newValue)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private static void OnEntryUniversalScalingChanged(bool oldValue, bool newValue)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private static void OnEntryScaleConstraintsChanged(bool oldValue, bool newValue)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public static void InitializeModSettings()
|
||||
{
|
||||
//AvatarScaleManager.UseUniversalScaling = EntryEnabled.Value;
|
||||
//AvatarScaleGesture.GestureEnabled = EntryUseScaleGesture.Value;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue