Every recipe type registered from shared scripts

This commit is contained in:
2026-11-03 15:34:41 -03:00
committed by paula
parent 65113862f7
commit b329a61d96
25 changed files with 334 additions and 371 deletions
+5
View File
@@ -5,6 +5,7 @@
// placed against, and chain drives join into lines
import type { BlockPlacement, Face, Id, SharedContext } from "bworld/shared";
import { chain_update, type ChainState } from "./kinetics/chains.ts";
import { COMPACTING, PRESSING, processing_type } from "./recipes/processing.ts";
import {
AXES,
type Axis,
@@ -20,6 +21,10 @@ import {
} from "./kinetics/connections.ts";
export function setup(ctx: SharedContext) {
const lookup = { expand: ctx.tags.expand, item_exists: ctx.items.exists, fluid_exists: ctx.fluids.exists };
ctx.recipes.register_type(PRESSING.id, processing_type(PRESSING, lookup));
ctx.recipes.register_type(COMPACTING.id, processing_type(COMPACTING, lookup));
// what turns at x y z, undefined when nothing does
const kinetic_at = (x: number, y: number, z: number): KineticShape | undefined => {
const id = ctx.world.get_block(x, y, z);