auto format number option when increment is float.

This commit is contained in:
XtraCube committed 2024-08-20 00:22:10 -04:00
1 parent a37a8a8e1b
commit 26b70ae65e
1 file changed
+1 -1
@@ -37,7 +37,7 @@ public class ModdedNumberOption : ModdedOption<float>
data.Value = Value;
data.Increment = Increment;
data.ValidRange = new FloatRange(Min, Max);
data.FormatString = "0";
data.FormatString = Increment % 1 == 0 ? "0" : "0.0";
data.ZeroIsInfinity = ZeroInfinity;
data.SuffixType = SuffixType;
data.OptionName = FloatOptionNames.Invalid;