mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-25 22:27:53 -05:00
ZoneCommon: List zone content in the order it was loaded
This commit is contained in:
@ -7,14 +7,13 @@ ContentPrinter::ContentPrinter(Zone* zone)
|
||||
|
||||
void ContentPrinter::PrintContent() const
|
||||
{
|
||||
const ZoneContent content = m_zone->GetPools()->GetContent();
|
||||
|
||||
printf("Zone '%s' (%s)\n", m_zone->m_name.c_str(), content.m_game_name.c_str());
|
||||
const auto* pools = m_zone->GetPools();
|
||||
printf("Zone '%s' (%s)\n", m_zone->m_name.c_str(), m_zone->m_game->GetName().c_str());
|
||||
puts("Content:");
|
||||
|
||||
for(const auto& asset : content.m_assets)
|
||||
for(const auto& asset : *pools)
|
||||
{
|
||||
printf("%s, %s\n", asset.m_asset_type_name.c_str(), asset.m_asset_name.c_str());
|
||||
printf("%s, %s\n", pools->GetAssetTypeName(asset->m_type).c_str(), asset->m_name.c_str());
|
||||
}
|
||||
|
||||
puts("");
|
||||
|
@ -30,10 +30,10 @@ void AbstractZoneDefWriter::WriteEntry(const std::string& entryKey, const std::s
|
||||
|
||||
void AbstractZoneDefWriter::WriteContent() const
|
||||
{
|
||||
auto zoneContent = m_zone->GetPools()->GetContent();
|
||||
const auto* pools = m_zone->GetPools();
|
||||
|
||||
for(const auto& asset : zoneContent.m_assets)
|
||||
for(const auto& asset : *pools)
|
||||
{
|
||||
WriteEntry(asset.m_asset_type_name, asset.m_asset_name);
|
||||
WriteEntry(pools->GetAssetTypeName(asset->m_type), asset->m_name);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user