[AvatarScaleMod] Add settings & cleanup.

why do i obsess with making my mods look pretty when staring them down in dnspy
This commit is contained in:
NotAKidoS 2023-06-23 01:02:46 -05:00
parent e8d3183bc3
commit f92e842f41
7 changed files with 111 additions and 4 deletions

View file

@ -0,0 +1,23 @@
namespace NAK.AvatarScaleMod;
// Another thing i stole from Kafe, this organizes stuff so much moreee
// Should I move the entries here too?
static class ModSettings
{
public static void InitializeModSettings()
{
AvatarScaleMod.EntryEnabled.OnEntryValueChanged.Subscribe(OnEntryEnabledChanged);
AvatarScaleMod.EntryUseScaleGesture.OnEntryValueChanged.Subscribe(OnEntryUseScaleGestureChanged);
}
static void OnEntryEnabledChanged(bool newValue, bool oldValue)
{
if (AvatarScaleManager.LocalAvatar != null)
AvatarScaleManager.LocalAvatar.enabled = newValue;
}
static void OnEntryUseScaleGestureChanged(bool newValue, bool oldValue)
{
AvatarScaleGesture.GestureEnabled = newValue;
}
}