feat: let opportunity helpers act autonomously
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
```text
|
||||
SimulationManager tick
|
||||
-> ActionExecutionSystem advances needs and working progress
|
||||
-> VillageOpportunitySystem re-derives the current capable helper
|
||||
-> ActionSelectionSystem chooses an action when the NPC is idle
|
||||
-> SimulationManager stores the selected action
|
||||
-> npc_target_requested
|
||||
@@ -24,6 +25,9 @@ SimulationManager tick
|
||||
- queries `RelationshipSystem` after personal survival/schedule overrides, so a
|
||||
trusted starving acquaintance can redirect ordinary work toward food
|
||||
gathering while the pantry is low;
|
||||
- accepts the current ephemeral `OpportunityHelperResult` and, only for its
|
||||
matching NPC, selects the reported ordinary gather/deposit action after
|
||||
urgent self-care and sleep/meal schedule branches;
|
||||
- evaluates current utility scores;
|
||||
- consumes the NPC's deterministic decision RNG;
|
||||
- returns an action ID, optional urgent-duration override, branch reason,
|
||||
@@ -68,9 +72,10 @@ SimulationManager remains the orchestrator and event boundary. It owns
|
||||
simulation records, invokes the focused systems, stores selected actions and
|
||||
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. The
|
||||
does not recompute decisions. Each idle selection re-derives the capable helper
|
||||
instead of consulting persisted assignment state. 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. The
|
||||
manager also captures actor/nearby knowledge before forwarding newly recorded
|
||||
events into `RelationshipSystem`. When an NPC arrives beside a worker at the
|
||||
same non-storage activity site, the manager may transfer one direct known fact
|
||||
|
||||
Reference in New Issue
Block a user