code wiki / _hdl_build / nx_activities.nx

nx_activities.nx

buildroot/runtime/_hdl_build/nx_activities.nx

9606 B171 linesdepth 4pulls 5 transitivereach 1 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_activities.nx -- LIB: the REAL VALUE of popular homestead activities (operator: "gamification for LOTS of these popular activities but not dumb rewards but real rewards and real positives and real capabilities"). For each activity a person does, this computes the REAL, MEASURED positive -- money kept or value created -- from REFERENCE PRICES (grounded, each with a source), NEVER an invented number. The output feeds nx_rewards as a real VALUE reward. Activities: compost (fertilizer not bought), cook-from-pantry (takeout not bought), seed-saving (seed packets not bought), preserve/can (out-of-season value), rainwater (water not bought). Sovereign seg-store (knowledge/store/act-*, NO TSV), integer cents. license_tier: ORIGINAL

dependencies 3 imports · 1 importers

nx_food_science.nx nx_seg_store.nx nx_syscalls.nx nx_activities.nx nx_activities_gate.nx

imports: nx_food_science.nxnx_seg_store.nxnx_syscalls.nx

imported by: nx_activities_gate.nx

structs

none

consts

none

functions

12func ac_put(prefix: *u8, key: *u8, val: *u8) -> i64
21func ac_money(dst: *u8, off: i64, cents: i64) -> i64
called by 1: ac_render calls 1: fd_apnum
33func ac_set_ref(prefix: *u8, item: *u8, price_cents: i64, unit: *u8, source: *u8) -> i64
42func ac_ref(prefix: *u8, item: *u8) -> i64
54func ac_value_of(prefix: *u8, activity: *u8, quantity: i64) -> i64
89func ac_logn_key(uid: *u8, out: *u8) -> i64 { var o: i64 = 0; o = as_append(out, o, "act:logn:" as *u8); o = as_append(out, o, uid); out[o] = 0 as u8; return o }
called by 2: ac_lognac_log calls 1: as_append
90func ac_log_key(uid: *u8, seq: i64, out: *u8) -> i64 { var o: i64 = 0; o = as_append(out, o, "act:log:" as *u8); o = as_append(out, o, uid); out[o] = 58 as u8; o = o + 1; o = fd_apnum(out, o, seq); out[o] = 0 as u8; return o }
called by 2: ac_logac_log_str calls 2: as_appendfd_apnum
91func ac_logn(prefix: *u8, uid: *u8) -> i64
98func ac_log(prefix: *u8, uid: *u8, activity: *u8, quantity: i64, day: i64, note: *u8) -> i64
112func ac_log_str(prefix: *u8, uid: *u8, seq: i64, f: i64, out: *u8) -> i64
119func ac_log_int(prefix: *u8, uid: *u8, seq: i64, f: i64) -> i64
127func ac_user_value(prefix: *u8, uid: *u8) -> i64
140func ac_activity_label(activity: *u8) -> *u8
called by 1: ac_render calls 1: fd_streq
150func ac_render(prefix: *u8, uid: *u8, out: *u8) -> i64