2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2026-05-25 02:51:43 +00:00

feat: accept aliases for asset type names

This commit is contained in:
Jan Laupetin
2026-05-02 17:42:55 +02:00
parent 0cbe0c2891
commit 08c128addd
20 changed files with 175 additions and 251 deletions
+1 -3
View File
@@ -9,7 +9,6 @@
#include "UnlinkerArgs.h"
#include "UnlinkerPaths.h"
#include "Utils/Logging/Log.h"
#include "Zone/AssetNameResolver.h"
#include "Zone/Definition/ZoneDefWriter.h"
#include "ZoneLoading.h"
@@ -105,11 +104,10 @@ namespace
ObjWriting::Configuration.AssetTypesToHandleBitfield = std::vector(assetTypeCount, initialValue);
std::vector<bool> handledSpecifiedAssets(m_args.m_specified_asset_types.size());
const AssetNameResolver assetNameResolver(gameId);
auto anySpecifiedValueInvalid = false;
for (const auto& specifiedValue : m_args.m_specified_asset_types)
{
const auto maybeAssetType = assetNameResolver.GetAssetTypeByName(specifiedValue);
const auto maybeAssetType = game->FindAssetTypeByName(specifiedValue);
if (!maybeAssetType)
{
con::error("Unknown asset type \"{}\"", specifiedValue);