Skip to content

IngredientManifest

Namespace Nfty.Core.Model in assembly Nfty.Ticket.

public record IngredientManifest : ISchemaVersioned

One layer, or trait-category: a kind, how it is colored, and its weighted variants.

Constructors

IngredientManifest(string, string, LayerKind, Colorization?, IReadOnlyList<Variant>, int, bool)

public IngredientManifest(string Id, string Name, LayerKind Kind, Colorization? Colorization, IReadOnlyList<Variant> Variants, int SchemaVersion = 2, bool PartialAlpha = false);

Parameters

  • Id (string) - Stable identifier, unique within its Recipe. Becomes the archive entry name.
  • Name (string) - Display name. Also the trait type published in the asset metadata, which is why Validator reserves the name "Type" — that is the Recipe's own pseudo-trait.
  • Kind (LayerKind) - Whether the layer rolls a color, applies one fixed color, or is composited as-is; see LayerKind.
  • Colorization (Colorization?) - How a Dynamic or Static layer is colored. Must be null for LayerKind.Custom, and must be present for the other two.
  • Variants (IReadOnlyList<Variant>) - The weighted images this layer can roll.
  • SchemaVersion (int) - The manifest format version; see Schema.
  • PartialAlpha (bool) - Whether any variant under this manifest carries a partial-alpha pixel — the book-level value is what the UI calls "2D only". A listing cache: writers stamp it from the pixels on every write, and anything that decoded the pixels recomputes it rather than reading it.

Properties

Colorization

public Colorization? Colorization { get; init; }

How a Dynamic or Static layer is colored. Must be null for LayerKind.Custom, and must be present for the other two.

Id

public string Id { get; init; }

Stable identifier, unique within its Recipe. Becomes the archive entry name.

Kind

public LayerKind Kind { get; init; }

Whether the layer rolls a color, applies one fixed color, or is composited as-is; see LayerKind.

Name

public string Name { get; init; }

Display name. Also the trait type published in the asset metadata, which is why Validator reserves the name "Type" — that is the Recipe's own pseudo-trait.

PartialAlpha

public bool PartialAlpha { get; init; }

Whether any variant under this manifest carries a partial-alpha pixel — the book-level value is what the UI calls "2D only". A listing cache: writers stamp it from the pixels on every write, and anything that decoded the pixels recomputes it rather than reading it.

SchemaVersion

public int SchemaVersion { get; init; }

The manifest format version; see Schema.

Variants

public IReadOnlyList<Variant> Variants { get; init; }

The weighted images this layer can roll.