feat: add typed pantry storage site

This commit is contained in:
2026-07-07 12:57:47 +02:00
parent 33b9c1bdfb
commit e5bd93d705
16 changed files with 304 additions and 69 deletions
+8 -9
View File
@@ -14,7 +14,7 @@
### Key divergences from the original plan
- **Zone fallback removed** (Phase 3): `gather_food`/`gather_wood` no longer fall back to `FarmZone`/`ForestZone` markers when no resource node is available. The original plan called for a logged fallback; instead, the NPC goes idle (via `navigation_failed` → wander) to guarantee resource conservation. The obsolete farm and forest scene nodes have now also been deleted. The remaining markers are temporary targets for eating, rest, study, and patrol—not resource fallbacks.
- **Zone fallback removed** (Phase 3): `gather_food`/`gather_wood` no longer fall back to `FarmZone`/`ForestZone` markers when no resource node is available. The original plan called for a logged fallback; instead, the NPC goes idle (via `navigation_failed` → wander) to guarantee resource conservation. The obsolete farm and forest scene nodes have now also been deleted. The remaining markers are temporary targets for rest, study, and patrol—not resource fallbacks. Eating and food transfer now target the typed village pantry.
- **`navigation_failed` signal** (discovered during Phase 4): Added a separate signal pathway to distinguish genuine arrival from navigation failure. The original plan treated all "arrivals" uniformly.
- **Stale-path prevention** (discovered during Phase 4): Added `path_request_id` + `path_pending` to reject async path results that arrive after a new target was set or the NPC died.
- **Duplicate node_id detection** (discovered during Phase 4): Added startup validation that disables nodes with duplicate IDs and pushes an error.
@@ -524,15 +524,14 @@ Remove each old zone only when its replacement has:
**Progress:** the `TaskZone` container and obsolete `FarmZone`/`ForestZone`
nodes have been deleted from `main.tscn`. The surviving nodes live under
`ActivityMarkers` to make their transitional role explicit. Task-to-marker
mapping still exists for eating, rest, study, and patrol, so this phase is not
complete.
`LegacyActivityMarkers` to make their transitional role explicit. Task-to-marker
mapping still exists for rest, study, and patrol, so this phase is not complete.
The former `FoodZone` is now `PantryMarker` backed by simulation-owned
`StorageStateRecord` state and explicit deposit/withdraw transactions. A
dedicated authored StorageNode presentation is still pending. Successful food
transfers now emit serializable economic events, and an active NPC visibly
carries food between source, pantry, and consumption.
The former `FoodZone`/`PantryMarker` is now an authored `StorageNode` at
`JajceWorld/WorldObjects/StorageSites/VillagePantry`, backed by
simulation-owned `StorageStateRecord` state and explicit deposit/withdraw/eat
transactions. Successful food transfers emit serializable economic events, and
an active NPC visibly carries food between source, pantry, and consumption.
**Exit:** temporary activity markers and task-to-marker mapping are deleted,
not merely unused.