feat: scale village queries and enrich Jajce center

This commit is contained in:
Rijad Zuzo
2026-07-16 23:51:08 +02:00
parent 4be72639d8
commit 2c88ed6ea8
48 changed files with 2059 additions and 280 deletions
+9 -1
View File
@@ -5,6 +5,7 @@
```text
SimulationManager tick
-> ActionExecutionSystem advances needs and working progress
-> SimulationPopulationView refreshes transient living/starving indexes
-> VillageOpportunitySystem re-derives the current capable helper
-> ActionSelectionSystem chooses an action when the NPC is idle
-> SimulationManager stores the selected action
@@ -25,6 +26,8 @@ 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;
- consumes the manager's current `SimulationPopulationView` for that social
query instead of rebuilding an all-NPC lookup for each idle decision;
- 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;
@@ -71,7 +74,10 @@ SimulationManager tick
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
It also owns one disposable `SimulationPopulationView`, rebuilt at tick start
and refreshed after each NPC advances so interleaved decision semantics remain
unchanged.
The manager publishes the latest `ActionSelectionResult` for presentation; the UI
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
@@ -128,6 +134,8 @@ simulation ticks.
- stores the exact event ID as the trust cause and ignores replayed or older
events;
- selects trusted starving subjects deterministically for action selection;
- uses a supplied per-tick population view when available, with a compatibility
fallback for isolated callers;
- does not choose actions, perform transactions, or format presentation text.
These collaborators are `RefCounted` rule services, not additional scene-tree