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
13 lines
325 B
C++
13 lines
325 B
C++
#pragma once
|
|
|
|
class EntityAdmin;
|
|
|
|
// When cargo is not full, finds the nearest debris within sensor range and sets
|
|
// it as the target, scoring high. Scores inactive when cargo is full or no debris
|
|
// is in range (Advance then handles roaming).
|
|
class SalvageScrapEvaluator
|
|
{
|
|
public:
|
|
void evaluate(EntityAdmin& admin);
|
|
};
|