Dna¶
Namespace Nfty.Core.Generation in assembly Nfty.Ticket.
An asset's identity: SHA-256 over the recipe id, each layer's variant id, and — for colorized layers — the QUANTIZED color. Quantizing is what makes uniqueness decidable at all; without it two assets a pixel apart in hue would count as different.
Methods¶
Compute(string, IReadOnlyList<LayerSelection>)¶
Computes an asset's DNA.
Parameters
recipeId(string) - The recipe rolled.selections(IReadOnlyList<LayerSelection>) - One entry per layer, in any order — they are sorted ordinally here, which is why the same selection hashes the same on every machine.
Returns. Lowercase hex SHA-256.