docs(rust): the Economics spike and its design — D335, D336 (PLAN_REDESIGNS §11.2) #338
Reference in New Issue
Block a user
No description provided.
Delete Branch "docs/rust-economics-decisions"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What & why
This is the first item of
PLAN_REDESIGNS.md§11 (§9 item 7): the source pull and rig spike that §11.1 asks for before any Economics code, plus the two decisions the spike raised. It adds no code.§11.2.1, the spike. Economics 3.9.2 was pulled from
umod.org/plugins/Economics.cson 2026-10-12. A throwaway plugin called its API and logged its hooks on both rigs (Rust 25877464, Oxide 2.0.7826, Carbon 2.0.262), and both frameworks answered identically. What it found that the design depends on:Depositreturnstruewhile adding less than asked, because of rounding and the balance limit. What was paid has to be measured as the balance after less the balance before.Withdrawis all or nothing.intmatches no overload, and nothing happens. Amounts must be boxed asdouble.OnEconomicsDataWipedis raised in two shapes, and one(IPlayer)method binds both.Decisions (org lead, 2026-10-12):
rust.coins.payisreversible: 'none', like Module-uo'suo.item.grant.§11.2.2, the design to build. Everything below is on protocol 14:
integrations.economics;economics.pay(key-remembered, never pays twice, an optional in-game message);economics.balances;economics.adjustfor staff;player.tally.balance, sent as a value;economics.wipedevent;The installer and the egg are untouched (D199). §11.2.3 lists the walk rows for the end-of-plan walk (D331). §7's protocol table gains the three rows.
How it was tested
Checklist
AI-assisted contributions (required)
Claude Code (Claude Opus 5.5). I have reviewed and understandevery change, and take responsibility for it. AI-authored commits are
marked with a
Co-Authored-By/Assisted-Bytrailer.License
(GNU GPL v3.0 or later), and I have the right to contribute it.
🤖 Generated with Claude Code
https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY