code wiki / _hdl_build / nx_activities.nx
nx_activities.nx
buildroot/runtime/_hdl_build/nx_activities.nx
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
imports: nx_food_science.nxnx_seg_store.nxnx_syscalls.nx
imported by: nx_activities_gate.nx
structs
| none |
consts
| none |
functions
| 12 | func ac_put(prefix: *u8, key: *u8, val: *u8) -> i64 |
| 21 | func ac_money(dst: *u8, off: i64, cents: i64) -> i64 |
| 33 | func ac_set_ref(prefix: *u8, item: *u8, price_cents: i64, unit: *u8, source: *u8) -> i64 |
| 42 | func ac_ref(prefix: *u8, item: *u8) -> i64 |
| 54 | func ac_value_of(prefix: *u8, activity: *u8, quantity: i64) -> i64 |
| 89 | func 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 } |
| 90 | func 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 } |
| 91 | func ac_logn(prefix: *u8, uid: *u8) -> i64 |
| 98 | func ac_log(prefix: *u8, uid: *u8, activity: *u8, quantity: i64, day: i64, note: *u8) -> i64 |
| 112 | func ac_log_str(prefix: *u8, uid: *u8, seq: i64, f: i64, out: *u8) -> i64 |
| 119 | func ac_log_int(prefix: *u8, uid: *u8, seq: i64, f: i64) -> i64 |
| 127 | func ac_user_value(prefix: *u8, uid: *u8) -> i64 |
| 140 | func ac_activity_label(activity: *u8) -> *u8 |
| 150 | func ac_render(prefix: *u8, uid: *u8, out: *u8) -> i64 |