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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user