Function craft

Source
pub fn craft<const N: usize>(
    inventory: &mut Inventory<N>,
    inputs: &[(u32, u32)],
    outputs: &[Stack],
) -> Result<(), LoopError>
Expand description

Inputs/outputs are host-authored trusted recipe data, never client prices. Repeated ingredients are summed by sequential removal. At most 32 of each. Output capacity is evaluated after consuming inputs, allowing slot reuse. See preview for a non-mutating availability check and usage example.