refactor: clarify simulation ownership
This commit is contained in:
@@ -20,8 +20,10 @@ world only when consumed.
|
||||
|
||||
- `StorageStateRecord` owns pantry and woodpile contents and capacity.
|
||||
- `SimNPC.inventory` owns carried item amounts.
|
||||
- `SimulationManager` performs deposit, withdrawal, and consumption
|
||||
transactions.
|
||||
- `VillageEconomy` performs deposit, withdrawal, consumption, and
|
||||
definition-backed completion-cost transactions.
|
||||
- `SimulationManager` coordinates action lifecycle and exposes the transaction
|
||||
results to presentation.
|
||||
- `village.food` and `village.wood` are synchronized aggregate views used by
|
||||
the existing UI, priorities, and utility scoring. They are not second
|
||||
mutation paths.
|
||||
@@ -45,6 +47,8 @@ Transactions apply the amount actually available:
|
||||
|
||||
- extraction cannot exceed the source;
|
||||
- deposit cannot exceed storage capacity;
|
||||
- player extraction is limited to storage capacity until player inventory
|
||||
exists, so overflow remains at the source;
|
||||
- withdrawal cannot exceed pantry contents;
|
||||
- eating succeeds only when the NPC carries one food.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user