mirror of
https://github.com/All-Of-Us-Mods/MiraAPI.git
synced 2026-10-19 15:51:48 +00:00
oops, copy paste
This commit is contained in:
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!;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user