2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2025-11-23 05:12:05 +00:00

Added map type metadata parsing to zone file

This commit is contained in:
LJW-Dev
2025-11-01 16:16:15 +08:00
parent 208d305cc6
commit eef269f497
5 changed files with 32 additions and 26 deletions

View File

@@ -19,25 +19,9 @@ void ZoneDefinitionParserState::SetGame(const GameId game)
m_asset_name_resolver = IAssetNameResolver::GetResolverForGame(game);
}
void ZoneDefinitionParserState::SetCustomMap()
void ZoneDefinitionParserState::SetMapType(ZoneDefinitionMapType mapType)
{
if (m_definition->is_custom_map == false)
{
m_definition->is_custom_map = true;
if (m_definition->m_game != GameId::T6)
{
printf("ERROR: Custom map linking is only supported on BO2 (T6).\n");
return;
}
printf("Processing zone as a custom map zone.\n");
const auto gfxWorldAssetType = m_asset_name_resolver->GetAssetTypeByName("gfxworld");
_ASSERT(gfxWorldAssetType);
m_definition->m_assets.emplace_back(*gfxWorldAssetType, "gfxworld", false);
}
m_definition->m_map_type = mapType;
}
namespace