fix: enforce village resource invariants
This commit is contained in:
@@ -18,17 +18,21 @@ world only when consumed.
|
||||
|
||||
## Authority
|
||||
|
||||
- `StorageStateRecord` owns pantry contents and capacity.
|
||||
- `StorageStateRecord` owns pantry and woodpile contents and capacity.
|
||||
- `SimNPC.inventory` owns carried item amounts.
|
||||
- `SimulationManager` performs deposit, withdrawal, and consumption
|
||||
transactions.
|
||||
- `village.food` is a synchronized aggregate view used by the existing UI,
|
||||
priorities, and utility scoring. It is not a second mutation path.
|
||||
- `village.food` and `village.wood` are synchronized aggregate views used by
|
||||
the existing UI, priorities, and utility scoring. They are not second
|
||||
mutation paths.
|
||||
- `StorageNode` supplies the active-world interaction position and presentation
|
||||
for deposit, withdrawal, eating, and current player pantry interaction.
|
||||
|
||||
The village pantry has stable ID `village_pantry`. Storage and NPC inventory
|
||||
are included in versioned state and deterministic checksums.
|
||||
The village pantry has stable ID `village_pantry`; the woodpile has stable ID
|
||||
`village_woodpile`. Storage and NPC inventory are included in versioned state
|
||||
and deterministic checksums. Patrol and study require one wood on completion:
|
||||
the effect is applied only when that unit can be withdrawn, and selection does
|
||||
not choose those actions while the woodpile is empty.
|
||||
|
||||
Successful extraction, deposit, withdrawal, and consumption also append
|
||||
structured economic facts. See [the economic event stream](ECONOMIC_EVENTS.md).
|
||||
|
||||
Reference in New Issue
Block a user