@@ -9,10 +9,8 @@ namespace FEZRepacker.Interface.Actions
99{
1010 internal abstract class UnpackAction : CommandLineAction
1111 {
12- private const string PakPath = "pak-path" ;
13- private const string DestinationFolder = "destination-folder" ;
14- private const string UseLegacyAo = "use-legacy-ao" ;
15- private const string UseLegacyTs = "use-legacy-ts" ;
12+ protected const string PakPath = "pak-path" ;
13+ protected const string DestinationFolder = "destination-folder" ;
1614
1715 public enum UnpackingMode
1816 {
@@ -24,23 +22,12 @@ public enum UnpackingMode
2422 public abstract string Name { get ; }
2523 public abstract string Description { get ; }
2624 public abstract string [ ] Aliases { get ; }
27-
28- public CommandLineArgument [ ] Arguments => new [ ] {
29- new CommandLineArgument ( PakPath ) ,
30- new CommandLineArgument ( DestinationFolder ) ,
31- new CommandLineArgument ( UseLegacyAo , ArgumentType . Flag ) ,
32- new CommandLineArgument ( UseLegacyTs , ArgumentType . Flag )
33- } ;
34-
25+ public abstract IEnumerable < CommandLineArgument > Arguments { get ; }
3526 public void Execute ( Dictionary < string , string > args )
3627 {
3728 var pakPath = args [ PakPath ] ;
3829 var outputDir = args [ DestinationFolder ] ;
39- var settings = new FormatConverterSettings
40- {
41- UseLegacyArtObjectBundle = args . ContainsKey ( UseLegacyAo ) ,
42- UseLegacyTrileSetBundle = args . ContainsKey ( UseLegacyTs )
43- } ;
30+ var settings = FormatConverterSettingsFlags . ReadFromArguments ( args ) ;
4431
4532 UnpackPackage ( pakPath , outputDir , Mode , settings ) ;
4633 }
0 commit comments