depend on the registry instead of DebrisSystem in the AI path

This commit is contained in:
2026-08-05 07:25:59 +02:00
parent 60260540cd
commit 4c166bf47f
16 changed files with 50 additions and 46 deletions

View File

@@ -38,9 +38,17 @@ public:
// false if the entity is invalid or already empty (REQ-SHP-SALVAGE).
bool collectOne(entt::entity entity);
// Lightweight snapshot for callers that need to iterate all debris.
std::vector<DebrisInfo> getAllDebrisInfo() const;
private:
EntityAdmin& m_admin;
};
// Debris state read and changed straight off the registry — no system needed.
// Lightweight snapshot for callers that need to iterate all debris.
std::vector<DebrisInfo> getAllDebrisInfo(const EntityAdmin& admin);
// Collects a single scrap unit from the debris: decrements its amount by one,
// destroying the entity once depleted. Returns true if a scrap was collected,
// false if the entity is invalid or already empty (REQ-SHP-SALVAGE).
bool collectOne(EntityAdmin& admin, entt::entity entity);