Recipe viewer for fishing

This commit is contained in:
2026-10-11 22:58:28 -03:00
parent 3c80938e91
commit 935c0df7af
7 changed files with 113 additions and 5 deletions
+2 -2
View File
@@ -3,7 +3,7 @@
// 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 { make_categories, type RecipeCategory, type RecipeLayout, SLOT } from "./categories.ts";
import { 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 +32,7 @@ export class RecipeIndex {
get categories(): RecipeCategory[] {
if (!this.#categories) {
this.#recipes = this.ctx.recipes.list();
this.#recipes = [...this.ctx.recipes.list(), ...fishing_recipes(this.ctx)];
this.#categories = make_categories(this.ctx, this.#recipes);
}
return this.#categories;