mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-11 07:18:11 -05:00
Unlinker: Do not list localized strings one by one in the zone file and do not include keyvaluepairs at all because they should be in the meta data
This commit is contained in:
@ -5,6 +5,7 @@
|
||||
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
#include <cassert>
|
||||
|
||||
using namespace T6;
|
||||
|
||||
@ -47,6 +48,35 @@ class ZoneDefWriterT6Impl final : public AbstractZoneDefWriter
|
||||
WriteMetaData(str.str(), kvp->value);
|
||||
}
|
||||
|
||||
void WriteContent() const
|
||||
{
|
||||
const auto* pools = dynamic_cast<GameAssetPoolT6*>(m_zone->GetPools());
|
||||
|
||||
assert(pools);
|
||||
if (!pools)
|
||||
return;
|
||||
|
||||
// Localized strings are all collected in one string file. So only add this to the zone file.
|
||||
if(!pools->m_localize->m_asset_lookup.empty())
|
||||
{
|
||||
WriteEntry(pools->GetAssetTypeName(ASSET_TYPE_LOCALIZE_ENTRY), m_zone->m_name);
|
||||
}
|
||||
|
||||
for (const auto& asset : *pools)
|
||||
{
|
||||
switch (asset->m_type)
|
||||
{
|
||||
case ASSET_TYPE_LOCALIZE_ENTRY:
|
||||
case ASSET_TYPE_KEYVALUEPAIRS: // KeyValuePairs should be included as zone file metadata and not as content
|
||||
break;
|
||||
|
||||
default:
|
||||
WriteEntry(pools->GetAssetTypeName(asset->m_type), asset->m_name);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public:
|
||||
ZoneDefWriterT6Impl(Zone* zone, FileAPI::IFile* file)
|
||||
: AbstractZoneDefWriter(zone, file)
|
||||
|
Reference in New Issue
Block a user