oops, copy paste

This commit is contained in:
Az committed 2026-10-15 21:07:17 -04:00
1 parent 04b7701b79
commit 5e12d1f0d6
1 file changed
+4 -6
@@ -41,14 +41,12 @@ public class ModdedPlayerOptionListAttribute(
/// <inheritdoc />
public override object GetValue(int idx)
{
if (HolderOptionList?[idx] is not ModdedNumberOption opt)
throw new InvalidOperationException($"HolderOption for option \"{GetFormattedTitle(idx)}\" is not a ModdedNumberOption");
var value = opt.Value;
if (HolderOptionList?[idx] is not ModdedPlayerOption opt)
throw new InvalidOperationException($"HolderOption for option \"{GetFormattedTitle(idx)}\" is not a ModdedPlayerOption");
if (ValueType == typeof(int))
return (int)Math.Round(value);
return opt.Value;
return value;
return opt.SelectedPlayer!;
}
}