Skip to content

SetItemSelection

Namespace Nfty.Core.Output in assembly Nfty.Core.

public static class SetItemSelection

Recovers which variant of which layer an asset in a Set was made from.

Methods

Resolve(LoadedRecipe, SetItem)

public static IReadOnlyList<(string, string)>? Resolve(LoadedRecipe recipe, SetItem item);

Maps a Set item back onto its recipe's layers.

Parameters

  • recipe (LoadedRecipe) - The recipe the Set's book holds for this item.
  • item (SetItem) - The asset, as its metadata records it.

Returns. The present layers' ingredient id and variant id, bottom first, or null when the item is from another recipe or a layer cannot be told apart by name.

Remarks

Names, not ids, because names are all a Set records — the same name-based reading SelectionOdds.Of(SetItem) makes. A layer whose trait matches no variant name, or more than one, cannot be resolved honestly, so the whole answer is null. A layer named in SetItem.AbsentLayers is skipped.