@@ -20,6 +20,7 @@ internal enum HelpGroups
20
20
21
21
internal enum WorkMode
22
22
{
23
+ Extract ,
23
24
Export ,
24
25
ExportRaw ,
25
26
Dump ,
@@ -136,7 +137,7 @@ private static void OptionGrouping(string name, string desc, string example, Hel
136
137
}
137
138
138
139
var optionDesc = desc + example . Color ( ColorConsole . BrightBlack ) ;
139
- var optionDict = new Dictionary < string , string > ( ) { { name , optionDesc } } ;
140
+ var optionDict = new Dictionary < string , string > { { name , optionDesc } } ;
140
141
if ( optionGroups . TryGetValue ( helpGroup , out Dictionary < string , string > groupDict ) )
141
142
{
142
143
groupDict . Add ( name , optionDesc ) ;
@@ -188,7 +189,8 @@ private static void InitOptions()
188
189
optionDefaultValue : WorkMode . Export ,
189
190
optionName : "-m, --mode <value>" ,
190
191
optionDescription : "Specify working mode\n " +
191
- "<Value: export(default) | exportRaw | dump | info | live2d | splitObjects>\n " +
192
+ "<Value: extract | export(default) | exportRaw | dump | info | live2d | splitObjects>\n " +
193
+ "Extract - Extracts(Decompresses) asset bundles\n " +
192
194
"Export - Exports converted assets\n " +
193
195
"ExportRaw - Exports raw data\n " +
194
196
"Dump - Makes asset dumps\n " +
@@ -551,6 +553,9 @@ public static void ParseArgs(string[] args)
551
553
var value = resplittedArgs [ workModeOptionIndex + 1 ] ;
552
554
switch ( value . ToLower ( ) )
553
555
{
556
+ case "extract" :
557
+ o_workMode . Value = WorkMode . Extract ;
558
+ break ;
554
559
case "export" :
555
560
o_workMode . Value = WorkMode . Export ;
556
561
break ;
@@ -649,7 +654,7 @@ public static void ParseArgs(string[] args)
649
654
#endregion
650
655
651
656
#region Parse Options
652
- for ( int i = 0 ; i < resplittedArgs . Count ; i ++ )
657
+ for ( var i = 0 ; i < resplittedArgs . Count ; i ++ )
653
658
{
654
659
var option = resplittedArgs [ i ] . ToLower ( ) ;
655
660
try
@@ -1084,7 +1089,10 @@ public static void ParseArgs(string[] args)
1084
1089
}
1085
1090
if ( o_outputFolder . Value == o_outputFolder . DefaultValue )
1086
1091
{
1087
- var fullPath = Path . Combine ( AppDomain . CurrentDomain . BaseDirectory , o_outputFolder . DefaultValue + Path . DirectorySeparatorChar ) ;
1092
+ var defaultFolder = o_workMode . Value == WorkMode . Extract
1093
+ ? "ASExtract"
1094
+ : o_outputFolder . DefaultValue ;
1095
+ var fullPath = Path . Combine ( AppDomain . CurrentDomain . BaseDirectory , defaultFolder + Path . DirectorySeparatorChar ) ;
1088
1096
if ( ! Directory . Exists ( fullPath ) )
1089
1097
{
1090
1098
Directory . CreateDirectory ( fullPath ) ;
@@ -1205,14 +1213,20 @@ public static void ShowCurrentOptions()
1205
1213
{
1206
1214
sb . AppendLine ( $ "# Custom Compression Type: { o_customCompressionType } ") ;
1207
1215
}
1208
- sb . AppendLine ( $ "# Parse Assets Using TypeTree: { ! f_avoidLoadingViaTypetree . Value } ") ;
1216
+ if ( o_workMode . Value != WorkMode . Extract )
1217
+ {
1218
+ sb . AppendLine ( $ "# Parse Assets Using TypeTree: { ! f_avoidLoadingViaTypetree . Value } ") ;
1219
+ }
1209
1220
sb . AppendLine ( $ "# Input Path: \" { inputPath } \" ") ;
1221
+ if ( o_workMode . Value != WorkMode . Info )
1222
+ {
1223
+ sb . AppendLine ( $ "# Output Path: \" { o_outputFolder } \" ") ;
1224
+ }
1210
1225
switch ( o_workMode . Value )
1211
1226
{
1212
1227
case WorkMode . Export :
1213
1228
case WorkMode . ExportRaw :
1214
1229
case WorkMode . Dump :
1215
- sb . AppendLine ( $ "# Output Path: \" { o_outputFolder } \" ") ;
1216
1230
if ( o_workMode . Value != WorkMode . Export )
1217
1231
{
1218
1232
sb . AppendLine ( $ "# Load All Assets: { f_loadAllAssets } ") ;
@@ -1248,7 +1262,6 @@ public static void ShowCurrentOptions()
1248
1262
break ;
1249
1263
case WorkMode . Live2D :
1250
1264
case WorkMode . SplitObjects :
1251
- sb . AppendLine ( $ "# Output Path: \" { o_outputFolder } \" ") ;
1252
1265
sb . AppendLine ( $ "# Log Level: { o_logLevel } ") ;
1253
1266
sb . AppendLine ( $ "# Log Output: { o_logOutput } ") ;
1254
1267
sb . AppendLine ( $ "# Export Asset List: { o_exportAssetList } ") ;
@@ -1260,7 +1273,7 @@ public static void ShowCurrentOptions()
1260
1273
else
1261
1274
{
1262
1275
sb . AppendLine ( $ "# Model Group Option: { o_l2dGroupOption } ") ;
1263
- sb . AppendFormat ( "# Search model -related assets by: {0}\n " , f_l2dAssetSearchByFilename . Value ? "FileName" : "Container" ) ;
1276
+ sb . AppendFormat ( "# Search Model -related Assets by: {0}\n " , f_l2dAssetSearchByFilename . Value ? "FileName" : "Container" ) ;
1264
1277
sb . AppendLine ( $ "# Motion Export Method: { o_l2dMotionMode } ") ;
1265
1278
sb . AppendLine ( $ "# Force Bezier: { f_l2dForceBezier } ") ;
1266
1279
sb . AppendLine ( $ "# Assembly Path: \" { o_assemblyPath } \" ") ;
0 commit comments