#include "DebrisScrap.h"

#include <algorithm>

#include "DebrisSystem.h"

int sumDebrisScrap(const EntityAdmin& admin, const std::vector<entt::entity>& debris)
{
    int total = 0;
    for (const DebrisInfo& info : getAllDebrisInfo(admin))
    {
        if (std::find(debris.begin(), debris.end(), info.entity) != debris.end())
        {
            total += info.amount;
        }
    }
    return total;
}
