Some other fixes

This commit is contained in:
VaDiM
2025-08-27 05:23:50 +03:00
parent 521e2f3bbc
commit ae3b5169df
13 changed files with 204 additions and 196 deletions

View File

@ -107,19 +107,18 @@ namespace AssetStudioCLI
{
var m_TextAsset = (TextAsset)item.Asset;
var extension = ".txt";
var assetExtension = Path.GetExtension(m_TextAsset.m_Name);
if (!CLIOptions.f_notRestoreExtensionName.Value)
{
if (!string.IsNullOrEmpty(assetExtension))
if (Path.HasExtension(m_TextAsset.m_Name))
{
extension = "";
}
else if (!string.IsNullOrEmpty(item.Container))
else
{
var ext = Path.GetExtension(item.Container);
if (!string.IsNullOrEmpty(item.Container))
var extFromContainer = Path.GetExtension(item.Container);
if (!string.IsNullOrEmpty(extFromContainer))
{
extension = ext;
extension = extFromContainer;
}
}
}

View File

@ -94,7 +94,7 @@ namespace AssetStudioCLI.Options
public static Option<FilenameFormat> o_filenameFormat;
public static Option<string> o_outputFolder;
public static Option<bool> f_overwriteExisting;
public static Option<bool> o_displayHelp;
public static Option<bool> f_displayHelp;
//logger
public static Option<LoggerEvent> o_logLevel;
public static Option<LogOutputMode> o_logOutput;
@ -264,13 +264,14 @@ namespace AssetStudioCLI.Options
optionHelpGroup: HelpGroups.General,
isFlag: true
);
o_displayHelp = new GroupedOption<bool>
f_displayHelp = new GroupedOption<bool>
(
optionDefaultValue: false,
optionName: "-h, --help",
optionDescription: "Display help and exit",
optionExample: "",
optionHelpGroup: HelpGroups.General
optionHelpGroup: HelpGroups.General,
isFlag: true
);
#endregion
@ -533,7 +534,7 @@ namespace AssetStudioCLI.Options
(
optionDefaultValue: false,
optionName: "--decompress-to-disk",
optionDescription: "(Flag) If not specified, only bundles larger than 2GB will be decompressed to disk\ninstead of memory\n",
optionDescription: "(Flag) If not specified, only bundles larger than 2GB will be decompressed to disk\ninstead of RAM\n",
optionExample: "",
optionHelpGroup: HelpGroups.Advanced,
isFlag: true
@ -577,7 +578,7 @@ namespace AssetStudioCLI.Options
if (args.Length == 0 || args.Any(x => x.ToLower() == "-h" || x.ToLower() == "--help" || x.ToLower() == "-?"))
{
o_displayHelp.Value = true;
f_displayHelp.Value = true;
return;
}
@ -1030,6 +1031,7 @@ namespace AssetStudioCLI.Options
case "monobehaviour":
o_l2dMotionMode.Value = CubismLive2DExtractor.Live2DMotionMode.MonoBehaviour;
break;
case "clip":
case "animationclip":
case "animationclipv2":
o_l2dMotionMode.Value = CubismLive2DExtractor.Live2DMotionMode.AnimationClipV2;

View File

@ -13,7 +13,7 @@ namespace AssetStudioCLI
{
CLIRun();
}
else if (CLIOptions.o_displayHelp.Value)
else if (CLIOptions.f_displayHelp.Value)
{
CLIOptions.ShowHelp();
}

View File

@ -30,7 +30,7 @@ namespace AssetStudioCLI
{
Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-US");
Progress.Default = new Progress<int>(ShowCurProgressValue);
assetsManager.LoadingViaTypeTreeEnabled = !CLIOptions.f_avoidLoadingViaTypetree.Value;
assetsManager.LoadViaTypeTree = !CLIOptions.f_avoidLoadingViaTypetree.Value;
assetsManager.Options.CustomUnityVersion = CLIOptions.o_unityVersion.Value;
assetsManager.Options.BundleOptions.CustomBlockInfoCompression = CLIOptions.o_bundleBlockInfoCompression.Value;
assetsManager.Options.BundleOptions.CustomBlockCompression = CLIOptions.o_bundleBlockCompression.Value;