feat: index loaded resource discovery
This commit is contained in:
@@ -22,6 +22,7 @@ SimulationClock
|
||||
-> VillageOpportunitySystem projects one known unresolved need
|
||||
-> WorldViewManager presents travel, NPC state, and world-state cues
|
||||
-> ActiveWorldAdapter supplies loaded-world positions/capacity
|
||||
-> LoadedResourceSpatialIndex bounds finite-anchor discovery
|
||||
-> NpcVisual performs local navigation, animation, and transient reactions
|
||||
-> PantryStockVisual derives physical stock arrangement from storage state
|
||||
```
|
||||
@@ -62,6 +63,13 @@ would otherwise obscure that lifecycle:
|
||||
- `simulation/definitions/` owns stable IDs and immutable action/profession
|
||||
definitions.
|
||||
|
||||
`world/resource_nodes/LoadedResourceSpatialIndex.gd` is a focused disposable
|
||||
acceleration structure owned by `ActiveWorldAdapter`. It indexes loaded
|
||||
interaction positions by action and horizontal cell, plus authoritative
|
||||
metadata bounds copied at bind time. It does not own amounts, enabled state,
|
||||
reservations, or persistence. `ResourceNode` enter/exit, bind, and transform
|
||||
notifications keep it synchronized with the loaded presentation lifecycle.
|
||||
|
||||
Outside the runtime lifecycle, `simulation/benchmark/` owns reusable,
|
||||
schema-valid workload fixtures. CLI tools and headless scenarios consume those
|
||||
fixtures; production simulation does not depend on benchmark code.
|
||||
@@ -86,9 +94,9 @@ hard to read.
|
||||
| `simulation/state/` | Versioned, serializable mutable records |
|
||||
| `simulation/definitions/` | Stable IDs and immutable gameplay definitions |
|
||||
| `simulation/persistence/` | Validated local save-file storage |
|
||||
| `simulation/benchmark/` | Reproducible full-fidelity headless workloads and metrics |
|
||||
| `simulation/benchmark/` | Reproducible simulation and loaded-world query workloads |
|
||||
| `world/` | Loaded-world interaction geometry and presentation adapters |
|
||||
| `world/resource_nodes/` | Finite resource presentation bound by stable ID |
|
||||
| `world/resource_nodes/` | Finite resource presentation and disposable loaded-anchor index |
|
||||
| `world/storage/` | Storage interaction geometry, never stored quantities |
|
||||
| `world/activity/` | Rest/study/patrol interaction sites and capacity facts |
|
||||
| `player/` | Player input, camera, and active NPC presentation |
|
||||
@@ -127,6 +135,10 @@ improving ownership.
|
||||
- Derived population indexes are disposable acceleration structures. NPC
|
||||
records remain authoritative, and rebuilding the view after initialization,
|
||||
restore, or a tick must produce the same decisions and checksum.
|
||||
- The loaded-resource grid is likewise disposable. `ResourceStateRecord`
|
||||
remains authoritative while its scene node is absent; rebuilding or
|
||||
incrementally refreshing the grid must preserve the linear resolver's exact
|
||||
score winner and stable tie order.
|
||||
- Camera-local grass, ambient butterflies, water animation, smoke, and foliage
|
||||
motion are presentation only. Grass consumes bounded real actor transforms;
|
||||
it does not write NPC positions or become persistent state.
|
||||
|
||||
Reference in New Issue
Block a user