depend on the registry instead of DebrisSystem in the AI path
getAllDebrisInfo and collectOne only ever touched EntityAdmin — DebrisSystem holds nothing else — so they become free functions over the registry. That lets AiSystem, SalvagerSystem and SalvageScrapEvaluator drop their DebrisSystem& parameters entirely; SalvagerSystem already held the admin, and the other two were handed it alongside. No system in lib/ecs/system takes another system now. Every tick signature names the data it works on: the registry, the factory state, or both. DebrisSystem keeps spawn, tickDespawn and consume — the first two are genuine tick behaviour rather than lookups. Verified with a golden-checksum capture before and after — all four sample ticks identical. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YHcUerKAZKWNvSKJxYKbnG
This commit is contained in:
@@ -268,10 +268,10 @@ void Simulation::tick()
|
||||
m_shipSystem->clearMovementIntents();
|
||||
// Score-based behavior selection: evaluate, select winner, execute (sets
|
||||
// movement intent + preferred module targets only — no world mutation).
|
||||
m_aiSystem->tick(m_admin, m_factoryState, *m_debrisSystem);
|
||||
m_aiSystem->tick(m_admin, m_factoryState);
|
||||
// Module systems perform the world mutation (collection/delivery, healing).
|
||||
// Each emits its tool beams and applies its own delayed (mid-beam) effects.
|
||||
m_salvagerSystem->tick(m_currentTick, *m_debrisSystem, m_factoryState, m_beamFiredEvents);
|
||||
m_salvagerSystem->tick(m_currentTick, m_factoryState, m_beamFiredEvents);
|
||||
m_repairSystem->tick(m_currentTick, m_beamFiredEvents);
|
||||
|
||||
// Step 8: combat resolution
|
||||
|
||||
Reference in New Issue
Block a user