feat: let opportunity helpers act autonomously

This commit is contained in:
Rijad Zuzo
2026-07-16 10:58:48 +02:00
parent eaa15c076c
commit 0332c57a89
14 changed files with 253 additions and 30 deletions
+6 -2
View File
@@ -11,6 +11,7 @@ results.
SimulationClock
-> SimulationManager orchestrates one deterministic tick
-> ActionExecutionSystem advances needs and work
-> VillageOpportunitySystem re-derives the current capable helper
-> ActionSelectionSystem chooses an action
-> ActionTargetResolver resolves a stable target ID
-> VillageEconomy performs inventory/storage transactions
@@ -45,7 +46,8 @@ would otherwise obscure that lifecycle:
open/resolved/invalidated lifecycle for the proven pantry-food and blocked-
work wood consumers. It also derives one ephemeral `OpportunityHelperResult`
from knowledge, directed relationships, inventory, action definitions, and
finite-resource state without changing resources or assigning tasks;
finite-resource state without changing resources or assigning tasks. The
ordinary action selector consumes that result only for the matching idle NPC;
- `simulation/persistence/` owns save-slot file safety;
- `simulation/state/` owns versioned serialized record contracts;
- `simulation/definitions/` owns stable IDs and immutable action/profession
@@ -103,7 +105,9 @@ improving ownership.
event IDs rather than object references or prose.
- Opportunity records reference stable NPC, storage, resource, trigger-event,
and resolution-event IDs. Their generator may observe authoritative state
and history, but it does not mutate the economy or command NPC behavior.
and history, but it does not mutate the economy or command NPC behavior. The
manager re-queries capable helpers at idle selection boundaries; any selected
supply task then follows the ordinary persisted NPC-task and target contracts.
- Prefer one tested vertical behavior over a generic framework with no proven
consumers.