mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-12 07:48:16 -05:00
ZoneLoading: Properly link assets as dependencies instead of only saving the name of the dependency
This commit is contained in:
@ -19,13 +19,15 @@ public:
|
||||
{
|
||||
for(auto assetInfo : *pool)
|
||||
{
|
||||
T* asset = assetInfo->Asset();
|
||||
|
||||
if(assetInfo->m_name[0] == ','
|
||||
|| !ShouldDump(assetInfo->m_asset))
|
||||
|| !ShouldDump(asset))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
std::string assetFilePath = utils::Path::Combine(basePath, GetFileNameForAsset(zone, assetInfo->m_asset));
|
||||
std::string assetFilePath = utils::Path::Combine(basePath, GetFileNameForAsset(zone, asset));
|
||||
|
||||
FileAPI::DirectoryCreate(utils::Path::GetDirectory(assetFilePath));
|
||||
|
||||
@ -33,7 +35,7 @@ public:
|
||||
|
||||
if(file.IsOpen())
|
||||
{
|
||||
DumpAsset(zone, assetInfo->m_asset, &file);
|
||||
DumpAsset(zone, asset, &file);
|
||||
|
||||
file.Close();
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ std::string AssetDumperLocalizeEntry::GetNameOfLanguage(GameLanguage language)
|
||||
|
||||
void AssetDumperLocalizeEntry::DumpPool(Zone* zone, AssetPool<LocalizeEntry>* pool, const std::string& basePath)
|
||||
{
|
||||
if (pool->m_asset_lookup.size() == 0)
|
||||
if (pool->m_asset_lookup.empty())
|
||||
return;
|
||||
|
||||
const std::string language = GetNameOfLanguage(zone->m_language);
|
||||
@ -84,7 +84,7 @@ void AssetDumperLocalizeEntry::DumpPool(Zone* zone, AssetPool<LocalizeEntry>* po
|
||||
|
||||
for(auto localizeEntry : *pool)
|
||||
{
|
||||
stringFileDumper.WriteLocalizeEntry(localizeEntry->m_asset->name, localizeEntry->m_asset->value);
|
||||
stringFileDumper.WriteLocalizeEntry(localizeEntry->m_name, localizeEntry->Asset()->value);
|
||||
}
|
||||
|
||||
stringFileDumper.Finalize();
|
||||
|
Reference in New Issue
Block a user