mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2026-03-16 09:53:04 +00:00
feat: more details about which assets are dumped
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#include "Game/IAsset.h"
|
||||
#include "IAssetDumper.h"
|
||||
#include "Pool/AssetPool.h"
|
||||
#include "Utils/Logging/Log.h"
|
||||
|
||||
template<AssetDefinition Asset_t> class AbstractAssetDumper : public IAssetDumper
|
||||
{
|
||||
@@ -21,6 +22,8 @@ public:
|
||||
|
||||
void Dump(AssetDumpingContext& context) override
|
||||
{
|
||||
const auto assetTypeName = IGame::GetGameById(context.m_zone.m_game_id)->GetAssetTypeName(Asset_t::EnumEntry).value_or("unknown");
|
||||
|
||||
for (const auto* assetInfo : context.m_zone.m_pools.PoolAssets<Asset_t>())
|
||||
{
|
||||
if (assetInfo->IsReference() || !ShouldDump(*assetInfo))
|
||||
@@ -30,6 +33,7 @@ public:
|
||||
}
|
||||
|
||||
DumpAsset(context, *assetInfo);
|
||||
con::info("Dumped {} \"{}\"", assetTypeName, assetInfo->m_name);
|
||||
context.IncrementProgress();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user