Every recipe type registered from shared scripts
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user