Recipe viewer for crabpots

This commit is contained in:
2026-10-12 02:39:25 -03:00
parent 726a52b91a
commit 2ebcf55ad3
9 changed files with 201 additions and 13 deletions
+9 -2
View File
@@ -3,7 +3,14 @@
// many recipes as fit, one under the other. the item list stays on the right. escape or the inventory key go back to
// the inventory, and backspace to what was shown before
import type { ClientContext, Graphics, Screen } from "bworld/client";
import { fishing_recipes, make_categories, type RecipeCategory, type RecipeLayout, SLOT } from "./categories.ts";
import {
crabpot_recipes,
fishing_recipes,
make_categories,
type RecipeCategory,
type RecipeLayout,
SLOT,
} from "./categories.ts";
import { BUTTON, item_cell, ItemList, LABEL_COLOR, type Mode, SLOT_COLOR } from "./item_list.ts";
import { type Ingredient, inputs, outputs, type Recipe } from "./recipes.ts";
@@ -32,7 +39,7 @@ export class RecipeIndex {
get categories(): RecipeCategory[] {
if (!this.#categories) {
this.#recipes = [...this.ctx.recipes.list(), ...fishing_recipes(this.ctx)];
this.#recipes = [...this.ctx.recipes.list(), ...fishing_recipes(this.ctx), ...crabpot_recipes(this.ctx)];
this.#categories = make_categories(this.ctx, this.#recipes);
}
return this.#categories;