code wiki / _hdl_build / nx_pantry.nx

nx_pantry.nx

buildroot/runtime/_hdl_build/nx_pantry.nx

4714 B105 linesdepth 4pulls 6 transitivereach 4 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_pantry.nx -- LIB: bridges the universal INVENTORY (a person's pantry stock) to the FOOD-SCIENCE engine. "What can I make" = run the chooser over ONLY the ingredients you actually have (qty>0); "cook what's expiring first" = bias the build toward soon-to-expire items to cut waste; "meal planning" = choose a meal then CONSUME its ingredients from inventory so the next meal sees the depleted pantry. One engine, two stores: the food store (knowledge/store/food-) holds the science; the inventory store holds the stock. license_tier: ORIGINAL

dependencies 3 imports · 3 importers

nx_inventory.nx nx_food_science.nx nx_syscalls.nx nx_pantry.nx nx_household.nx nx_pantry_meal_gate.nx nx_reorder_gate.nx

imports: nx_inventory.nxnx_food_science.nxnx_syscalls.nx

imported by: nx_household.nxnx_pantry_meal_gate.nxnx_reorder_gate.nx

structs

none

consts

none

functions

12func fp_is_expiring(inv_prefix: *u8, domain: *u8, id: *u8, as_of: i64, within: i64) -> i64
called by 2: fp_expiring_firstmain calls 1: iv_expiry
20func fp_pantry_avail(food_world: *i64, inv_prefix: *u8, domain: *u8, avail: *i64) -> i64
32func fp_quota(frame: *i64, nframe: i64, rc: i64) -> i64
called by 1: fp_expiring_first
42func fp_expiring_first(food_world: *i64, inv_prefix: *u8, domain: *u8, food_prefix: *u8, as_of: i64, within: i64, avail_in: *i64, avail_out: *i64) -> i64
76func fp_consume_build(inv_prefix: *u8, domain: *u8, food_world: *i64, build: *i64, nb: i64) -> i64
called by 2: mainmain calls 1: iv_consume
84func fp_total_qty(inv_prefix: *u8, domain: *u8) -> i64
called by 1: main calls 3: sys_mmapiv_listiv_qty
94func fp_choose(food_prefix: *u8, food_world: *i64, avail: *i64, build: *i64, roles: *i64) -> i64