feat: add witnessed knowledge and wind ambience

This commit is contained in:
Rijad Zuzo
2026-07-11 11:27:40 +02:00
parent 2ed93de6d1
commit 81409650df
72 changed files with 3001 additions and 606 deletions
+28 -1
View File
@@ -21,6 +21,9 @@ SimulationManager tick
### ActionSelectionSystem
- reads NPC and village state;
- queries `RelationshipSystem` after personal survival/schedule overrides, so a
trusted starving acquaintance can redirect ordinary work toward food
gathering while the pantry is low;
- evaluates current utility scores;
- consumes the NPC's deterministic decision RNG;
- returns an action ID, optional urgent-duration override, branch reason,
@@ -67,7 +70,10 @@ targets, and translates presentation callbacks into simulation transitions.
It also publishes the latest `ActionSelectionResult` for presentation; the UI
does not recompute decisions. At completion it atomically pays any
definition-backed stored-resource cost before applying the action effect. A
late shortfall suppresses the effect and records a `task_blocked` fact.
late shortfall suppresses the effect and records a `task_blocked` fact. The
manager also captures actor/nearby knowledge before forwarding newly recorded
events into `RelationshipSystem`. It exposes knowledge, relationship, and cause
queries without moving social authority into UI.
### VillageEconomy
@@ -82,6 +88,27 @@ late shortfall suppresses the effect and records a `task_blocked` fact.
- answers recent-history, actor-history, and consumption-rate queries;
- restores persisted history without performing or replaying transactions.
### EventKnowledgeSystem
- stores stable `(knower_id, event_id)` references separately from objective
history;
- initially observes successful food-deposit events for the actor and living
NPCs within a fixed proximity radius;
- captures evidence only when the event happens, never from current positions
during restore;
- answers deterministic known-event and knower queries without formatting
prose or choosing actions.
### RelationshipSystem
- owns directed familiarity/trust records and stable relationship queries;
- applies a bounded trust gain when a hungry familiar NPC knows about a
contributor's successful food-deposit event;
- stores the exact event ID as the trust cause and ignores replayed or older
events;
- selects trusted starving subjects deterministically for action selection;
- does not choose actions, perform transactions, or format presentation text.
These collaborators are `RefCounted` rule services, not additional scene-tree
managers. Further decomposition should follow measured pressure and a proven
gameplay consumer.