- [CLI] added export_type option, #35.

This commit is contained in:
Razmoth
2023-11-18 18:24:12 +04:00
parent 727374ac2f
commit 43f3f52be3
5 changed files with 43 additions and 20 deletions

View File

@@ -32,6 +32,7 @@ namespace AssetStudio.CLI
optionsBinder.MapName,
optionsBinder.UnityVersion,
optionsBinder.GroupAssetsType,
optionsBinder.AssetExportType,
optionsBinder.Model,
optionsBinder.Key,
optionsBinder.AIFile,
@@ -59,6 +60,7 @@ namespace AssetStudio.CLI
public string MapName { get; set; }
public string UnityVersion { get; set; }
public AssetGroupOption GroupAssetsType { get; set; }
public ExportType AssetExportType { get; set; }
public bool Model { get; set; }
public byte Key { get; set; }
public FileInfo AIFile { get; set; }
@@ -81,6 +83,7 @@ namespace AssetStudio.CLI
public readonly Option<string> MapName;
public readonly Option<string> UnityVersion;
public readonly Option<AssetGroupOption> GroupAssetsType;
public readonly Option<ExportType> AssetExportType;
public readonly Option<bool> Model;
public readonly Option<byte> Key;
public readonly Option<FileInfo> AIFile;
@@ -103,6 +106,7 @@ namespace AssetStudio.CLI
MapName = new Option<string>("--map_name", () => "assets_map", "Specify AssetMap file name.");
UnityVersion = new Option<string>("--unity_version", "Specify Unity version.");
GroupAssetsType = new Option<AssetGroupOption>("--group_assets", "Specify how exported assets should be grouped.");
AssetExportType = new Option<ExportType>("--export_type", "Specify how assets should be exported.");
Model = new Option<bool>("--models", "Enable to export models only");
AIFile = new Option<FileInfo>("--ai_file", "Specify asset_index json file path (to recover GI containers).").LegalFilePathsOnly();
DummyDllFolder = new Option<DirectoryInfo>("--dummy_dlls", "Specify DummyDll path.").LegalFilePathsOnly();
@@ -150,6 +154,7 @@ namespace AssetStudio.CLI
GameName.FromAmong(GameManager.GetGameNames());
GroupAssetsType.SetDefaultValue(AssetGroupOption.ByType);
AssetExportType.SetDefaultValue(ExportType.Convert);
MapOp.SetDefaultValue(MapOpType.None);
MapType.SetDefaultValue(ExportListType.XML);
KeyIndex.SetDefaultValue(0);
@@ -193,6 +198,7 @@ namespace AssetStudio.CLI
MapName = bindingContext.ParseResult.GetValueForOption(MapName),
UnityVersion = bindingContext.ParseResult.GetValueForOption(UnityVersion),
GroupAssetsType = bindingContext.ParseResult.GetValueForOption(GroupAssetsType),
AssetExportType = bindingContext.ParseResult.GetValueForOption(AssetExportType),
Model = bindingContext.ParseResult.GetValueForOption(Model),
Key = bindingContext.ParseResult.GetValueForOption(Key),
AIFile = bindingContext.ParseResult.GetValueForOption(AIFile),