Skip to content

CountsAttribute

namespace Griff.Scenes;
public sealed class CountsAttribute : RowsAttribute

Marks a string as names and how many of each, separated by commas: “Coin 3, Map” (a count of 1 left out). The Inspector lists them a row each, the name picked from what the project has (Kind) and the count set.

public override IReadOnlyList<RowColumn> Columns { get; }
public bool CountFirst { get; init; }

The count comes first, “150 Gold”, rather than after, “Gold 150”.

public bool Defines { get; init; }

They’re where the names come from (what’s given), so they’re offered to the project’s other fields.

public override string Example { get; }
public NameKind Kind { get; }

What the names are.

public override string Noun { get; }
public string? Scope { get; init; }

For a Kind: what they’re kinds of (“Resource”).

public string What { get; init; }

What the name column is called: “Item” unless it says.

public override string Describe()
public override IReadOnlyList<string>? Read(string row)
public override string Write(IReadOnlyList<string> cells)