2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2025-11-24 21:52:06 +00:00

The FinalizeZone step can now fail and the zone link will not ouput a fastfile if the FinalizeZone step fails.

This commit is contained in:
LJW-Dev
2025-11-01 17:25:14 +08:00
parent 81e0331252
commit 56186d1d80
8 changed files with 30 additions and 19 deletions

View File

@@ -32,12 +32,12 @@ namespace
return AssetCreationResult::NoAction();
}
void FinalizeZone(AssetCreationContext& context) override
bool FinalizeZone(AssetCreationContext& context) override
{
m_kvp_creator.Finalize(m_zone_definition);
const auto commonKvps = m_kvp_creator.GetFinalKeyValuePairs();
if (commonKvps.empty())
return;
return true;
auto* gameKvps = m_memory.Alloc<KeyValuePairs>();
gameKvps->name = m_memory.Dup(m_zone.m_name.c_str());
@@ -61,6 +61,8 @@ namespace
}
context.AddAsset(AssetRegistration<AssetKeyValuePairs>(m_zone.m_name, gameKvps));
return true;
}
private: