Skip to main content

StewRecipePageProvider

A class in Root.Township, the global namespace.

Page provider (identifier 3) that builds recipe pages for stews from glyphs: ingredients, extra effects and effect modifiers. Get it through Instance.

Constructors​

MemberWhat it is
StewRecipePageProvider()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

1 private and internal field
MemberWhat it is
private StewRecipe testRecipeRecipe shown by Test.

Properties​

MemberWhat it is
override int Identifier { get; }Always 3.
static StewRecipePageProvider Instance { get; }The registered provider with identifier 3.

Methods​

MemberWhat it is
override PageData GeneratePage(StewRecipe stewRecipe)Builds the page from the stew page template, adding an ingredient glyph for each ingredient and an effect glyph with circle segments for each effect.
override PageData GetRandom()Picks a random stew recipe and returns its page, or null if the player already has it.
override void Serialize(Stream stream, ref PageData page)Sends the recipe as a hashed reference and rebuilds the page on read.
protected override void Test()Editor test: shows the page for testRecipe.