ChoicesOfAttribute
namespace Griff.Scenes;
public sealed class ChoicesOfAttribute : FieldEditorAttributeMarks a string property as several names picked from what another member of its component lists (an AI fighter’s Use Moves, from its fighter’s moves), separated by commas: the Inspector ticks them from a list, and flags a name that isn’t one.
Properties
Section titled “Properties”Member
Section titled “Member”public string Member { get; }The member of the component that lists the choices.
public string? None { get; init; }What none ticked means, e.g. “every one”.
public string? Noun { get; init; }What the choices are, for component_describe, e.g. “its fighter’s moves”.
Methods
Section titled “Methods”Choices
Section titled “Choices”public IReadOnlyList<string> Choices(Component component)What component lists to pick from now.
Describe
Section titled “Describe”public override string Describe()Problem
Section titled “Problem”public override string? Problem(Component component, object? value)public static IReadOnlyList<string> Read(object? value)The names value holds, in order.