[AvatarScaleMod] Implement scaled components.

implemented scaling for specific components that Avatar Scale Tool would

they conflict, if you ran your avatar through Avatar Scale Tool then the animations will add on top
This commit is contained in:
NotAKidoS 2023-06-22 23:56:01 -05:00
parent 44d5c7762b
commit e8d3183bc3
7 changed files with 367 additions and 70 deletions

View file

@ -4,28 +4,22 @@ namespace NAK.AvatarScaleMod;
public class AvatarScaleMod : MelonMod
{
internal const string ParameterName = "AvatarScale";
internal const float MinimumHeight = 0.25f;
internal const float MaximumHeight = 2.5f;
internal static MelonLogger.Instance Logger;
public static readonly MelonPreferences_Category Category =
MelonPreferences.CreateCategory(nameof(AvatarScaleMod));
public static readonly MelonPreferences_Entry<bool> EntryEnabled =
Category.CreateEntry("Enabled", true, description: "Should there be persistant avatar scaling? This only works properly across supported avatars.");
Category.CreateEntry("Enabled", true, description: "Toggle AvatarScaleMod entirely.");
public static readonly MelonPreferences_Entry<bool> EntryPersistAnyways =
Category.CreateEntry("Persist From Unsupported", true, description: "Should avatar scale persist even from unsupported avatars?");
public static readonly MelonPreferences_Entry<float> HiddenAvatarScale =
Category.CreateEntry("Last Avatar Scale", -1f, is_hidden: true);
public static readonly MelonPreferences_Entry<bool> EntryUseScaleGesture =
Category.CreateEntry("Scale Gesture", true, description: "Use two fists to scale yourself easily.");
public override void OnInitializeMelon()
{
Logger = LoggerInstance;
ApplyPatches(typeof(HarmonyPatches.PlayerSetupPatches));
ApplyPatches(typeof(HarmonyPatches.GesturePlaneTestPatches));
}
void ApplyPatches(Type type)