2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2025-11-23 13:12: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

@@ -30,23 +30,18 @@ namespace
return AssetCreationResult::NoAction();
}
void FinalizeZone(AssetCreationContext& context) override
bool FinalizeZone(AssetCreationContext& context) override
{
// custom maps must have a map_gfx file
std::string mapGfxFileName = "map_gfx.fbx";
auto mapGfxFile = m_search_path.Open(BSPUtil::getFileNameForBSPAsset(mapGfxFileName));
if (!mapGfxFile.IsOpen())
return;
std::unique_ptr<BSPData> bsp = BSP::createBSPData(m_zone.m_name, m_search_path);
if (bsp == nullptr)
return;
return false;
BSPLinker linker(m_memory, m_search_path, context);
if (!linker.linkBSP(bsp.get()))
bool result = linker.linkBSP(bsp.get());
if (!result)
con::error("BSP link has failed.");
return;
return result;
}
private: