Juicer recipes
This commit is contained in:
@@ -9,12 +9,13 @@ import type { ClientContext, Graphics, Screen } from "bworld/client";
|
||||
import {
|
||||
crabpot_recipes,
|
||||
fishing_recipes,
|
||||
juicing_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 { BUTTON, fluid_cell, item_cell, ItemList, LABEL_COLOR, type Mode, SLOT_COLOR } from "./item_list.ts";
|
||||
import { type Ingredient, inputs, outputs, type Recipe } from "./recipes.ts";
|
||||
|
||||
// jei's sizes, in gui pixels
|
||||
@@ -42,7 +43,12 @@ export class RecipeIndex {
|
||||
|
||||
get categories(): RecipeCategory[] {
|
||||
if (!this.#categories) {
|
||||
this.#recipes = [...this.ctx.recipes.list(), ...fishing_recipes(this.ctx), ...crabpot_recipes(this.ctx)];
|
||||
this.#recipes = [
|
||||
...this.ctx.recipes.list(),
|
||||
...fishing_recipes(this.ctx),
|
||||
...crabpot_recipes(this.ctx),
|
||||
...juicing_recipes(this.ctx),
|
||||
];
|
||||
this.#categories = make_categories(this.ctx, this.#recipes);
|
||||
}
|
||||
return this.#categories;
|
||||
@@ -208,6 +214,7 @@ export class RecipesScreen implements Screen {
|
||||
const options = { slot: true, count: ingredient.count, tooltip: [...any, ...tooltip] };
|
||||
if (this.#cell(g, id, x + dx, y + dy, options)) hovered = id;
|
||||
},
|
||||
fluid: (fluid, amount, dx, dy, tooltip) => fluid_cell(g, this.ctx, fluid, amount, x + dx, y + dy, tooltip),
|
||||
texture: (id, dx, dy, w, h) => g.texture(id, x + dx, y + dy, w, h),
|
||||
text: (text, dx, dy) => g.text(text, x + dx, y + dy, { color: LABEL_COLOR }),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user