Fluid handler

This commit is contained in:
2026-10-31 16:54:24 -03:00
parent 23d02c5229
commit 407ed77385
20 changed files with 602 additions and 127 deletions
+2 -2
View File
@@ -4,7 +4,7 @@
// create's processing recipes, the shape its machines' recipe types share, like ProcessingRecipe: item choices in, and
// stacks out, each with a chance, and for the types that can, fluids out as { fluid, amount }. read and checked when the server starts, so a broken one stops it there instead of
// in a machine. no ctx, tests give what it needs
import type { FluidVariant, Id } from "bworld/shared";
import type { FluidStack, Id } from "bworld/shared";
// how many ingredients, item results and fluid results a type takes at most, like getMaxInputCount,
// getMaxOutputCount and getMaxFluidOutputCount
@@ -31,7 +31,7 @@ export interface ProcessingRecipe {
ingredients: Id[][];
results: ProcessingResult[];
// in mB
fluid_results: { fluid: FluidVariant; amount: number }[];
fluid_results: FluidStack[];
}
// what reading recipes needs from the game