public override PlayerDialog SetUp(uint player) { var model = new Model(); // This menu can be entered one of two ways: // 1.) From the player's rest menu. // 2.) From using a crafting fabricator. // If the second event happens, we need to skip over the first page. var state = Craft.GetPlayerCraftingState(player); model.SelectedSkill = state.DeviceSkillType; if (model.SelectedSkill != SkillType.Invalid) { model.IsFabricator = true; } var builder = new DialogBuilder() .WithDataModel(model) .AddBackAction(Back) .AddEndAction(End); if (!model.IsFabricator) { builder.AddPage(MainPageId, MainPageInit); } builder.AddPage(CategoryPageId, CategoryPageInit) .AddPage(RecipeListPageId, RecipeListPageInit) .AddPage(RecipePageId, RecipePageInit); return(builder.Build()); }