Allow giantess fetish rsp scaling values.

This commit is contained in:
Ottermandias 2023-05-25 21:25:45 +02:00
parent 575c1e2118
commit edcfea5701
2 changed files with 5 additions and 3 deletions

View file

@ -11,7 +11,9 @@ namespace Penumbra.Meta.Manipulations;
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public readonly struct RspManipulation : IMetaManipulation<RspManipulation>
{
public float Entry { get; private init; }
public const float MinValue = 0.01f;
public const float MaxValue = 512f;
public float Entry { get; private init; }
[JsonConverter(typeof(StringEnumConverter))]
public SubRace SubRace { get; private init; }
@ -68,7 +70,7 @@ public readonly struct RspManipulation : IMetaManipulation<RspManipulation>
return false;
if (!Enum.IsDefined(Attribute))
return false;
if (Entry is <= 1e-2f or > 8f)
if (Entry is < MinValue or > MaxValue)
return false;
return true;

View file

@ -790,7 +790,7 @@ public partial class ModEditWindow
using var color = ImRaii.PushColor(ImGuiCol.FrameBg,
def < value ? ColorId.IncreasedMetaValue.Value() : ColorId.DecreasedMetaValue.Value(),
def != value);
if (ImGui.DragFloat("##rspValue", ref value, 0.001f, 0.01f, 8f) && value is >= 0.01f and <= 8f)
if (ImGui.DragFloat("##rspValue", ref value, 0.001f, RspManipulation.MinValue, RspManipulation.MaxValue) && value is >= RspManipulation.MinValue and <= RspManipulation.MaxValue)
editor.MetaEditor.Change(meta.Copy(value));
ImGuiUtil.HoverTooltip($"Default Value: {def:0.###}");