From 6a899ba27d335f47bc386e05b4fb9d43bcd3cd97 Mon Sep 17 00:00:00 2001 From: David Higueros <111460331+TheDavSmasher@users.noreply.github.com> Date: Sat, 20 Jun 2026 01:29:56 -0600 Subject: [PATCH] Removed properties that aren't required --- MiraAPI/GameOptions/IModdedOption.cs | 12 ------- .../OptionTypes/ModdedOptionList.cs | 34 +------------------ 2 files changed, 1 insertion(+), 45 deletions(-) diff --git a/MiraAPI/GameOptions/IModdedOption.cs b/MiraAPI/GameOptions/IModdedOption.cs index 824a832..8d3e751 100644 --- a/MiraAPI/GameOptions/IModdedOption.cs +++ b/MiraAPI/GameOptions/IModdedOption.cs @@ -119,16 +119,4 @@ public interface IModdedOptionList /// Gets the number of options in the list. /// int Count { get; } - - /// - /// Gets the visibility function for the options. - /// Leaving it null will leave the options unchanged. - /// - Func? Visible { get; init; } - - /// - /// Gets a value indicating whether the options should be included with presets. - /// Leaving it null will leave the options unchanged. - /// - bool? IncludeInPreset { get; init; } } diff --git a/MiraAPI/GameOptions/OptionTypes/ModdedOptionList.cs b/MiraAPI/GameOptions/OptionTypes/ModdedOptionList.cs index 12f725e..85f650a 100644 --- a/MiraAPI/GameOptions/OptionTypes/ModdedOptionList.cs +++ b/MiraAPI/GameOptions/OptionTypes/ModdedOptionList.cs @@ -36,47 +36,15 @@ public class ModdedOptionList : IModdedOptionList, IReadOnlyList where T : /// public IReadOnlyList Options { get; } - /// - public Func? Visible - { - get; - init - { - field = value; - if (value == null) return; - foreach (var (option, idx) in Options.Select((o, i) => (o, i))) - { - option.Visible = () => value(idx); - } - } - } - - /// - public bool? IncludeInPreset - { - get; - init - { - field = value; - if (value == null) return; - foreach (var option in Options) - { - option.IncludeInPreset = value.Value; - } - } - } - /// /// Initializes a new instance of the class. /// /// The option list's length. /// The option factory to instantiate the options from. - /// Whether to include the options in the preset. - public ModdedOptionList(int count, Func optionFactory, bool? includeInPreset = true) + public ModdedOptionList(int count, Func optionFactory) { Count = count; Options = Enumerable.Range(0, Count).Select(optionFactory).ToArray(); - IncludeInPreset = includeInPreset; } ///