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:
2026-08-05 07:16:36 +02:00
parent a86ba3428a
commit 72d85d681c
16 changed files with 50 additions and 46 deletions

View File

@@ -101,14 +101,14 @@ struct Fixture
void decide()
{
ships.clearMovementIntents();
ai.tick(admin, state, scraps);
ai.tick(admin, state);
}
// World mutation: collection/delivery and healing.
void runModules()
{
beamEvents.clear();
salvager.tick(tick, scraps, state, beamEvents);
salvager.tick(tick, state, beamEvents);
repair.tick(tick, beamEvents);
}
@@ -141,7 +141,7 @@ struct Fixture
void salvageTick()
{
beamEvents.clear();
salvager.tick(tick, scraps, state, beamEvents);
salvager.tick(tick, state, beamEvents);
++tick;
}