From 9f5a62ea4ea39809c1a1ed74a366095744e870bc Mon Sep 17 00:00:00 2001 From: Hide_D Date: Mon, 25 Mar 2024 01:06:38 +0900 Subject: [PATCH] fix CLI.BuildAssetMap `--types` behavior Currently, when using `--map_op AssetMap` in the CLI, if `--types` is not specified, it does not include any information. Consider this behavior a bug and fix it to include all information in the absence of `--types` in the CLI, similar to when creating an AssetMap in the GUI. --- AssetStudio.CLI/Program.cs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/AssetStudio.CLI/Program.cs b/AssetStudio.CLI/Program.cs index df70beef..2cedd10e 100644 --- a/AssetStudio.CLI/Program.cs +++ b/AssetStudio.CLI/Program.cs @@ -163,12 +163,22 @@ public static void Run(Options o) } else { - Task.Run(() => AssetsHelper.BuildAssetMap(files, o.MapName, game, o.Output.FullName, o.MapType, classTypeFilter, o.NameFilter, o.ContainerFilter)).Wait(); + Task.Run(() => AssetsHelper.BuildAssetMap( + files, o.MapName, game, o.Output.FullName, o.MapType, + classTypeFilter.Length > 0 ? classTypeFilter : null, + o.NameFilter.Length > 0 ? o.NameFilter : null, + o.ContainerFilter.Length > 0 ? o.ContainerFilter : null + )).Wait(); } } if (o.MapOp.HasFlag(MapOpType.Both)) { - Task.Run(() => AssetsHelper.BuildBoth(files, o.MapName, o.Input.FullName, game, o.Output.FullName, o.MapType, classTypeFilter, o.NameFilter, o.ContainerFilter)).Wait(); + Task.Run(() => AssetsHelper.BuildBoth( + files, o.MapName, o.Input.FullName, game, o.Output.FullName, o.MapType, + classTypeFilter.Length > 0 ? classTypeFilter : null, + o.NameFilter.Length > 0 ? o.NameFilter : null, + o.ContainerFilter.Length > 0 ? o.ContainerFilter : null + )).Wait(); } if (o.MapOp.Equals(MapOpType.None) || o.MapOp.HasFlag(MapOpType.Load)) {