code wiki / _hdl_build / nx_pantry.nx
nx_pantry.nx
buildroot/runtime/_hdl_build/nx_pantry.nx
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
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
| 12 | func fp_is_expiring(inv_prefix: *u8, domain: *u8, id: *u8, as_of: i64, within: i64) -> i64 |
| 20 | func fp_pantry_avail(food_world: *i64, inv_prefix: *u8, domain: *u8, avail: *i64) -> i64 |
| 32 | func fp_quota(frame: *i64, nframe: i64, rc: i64) -> i64 called by 1: fp_expiring_first |
| 42 | func 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 |
| 76 | func fp_consume_build(inv_prefix: *u8, domain: *u8, food_world: *i64, build: *i64, nb: i64) -> i64 |
| 84 | func fp_total_qty(inv_prefix: *u8, domain: *u8) -> i64 |
| 94 | func fp_choose(food_prefix: *u8, food_world: *i64, avail: *i64, build: *i64, roles: *i64) -> i64 called by 4: hh_render_dashboardmainmainmain calls 5: sys_mmapfd_set_allfd_load_framefd_load_weightsfd_choose |