diff options
| author | 2019-06-28 23:13:43 +0200 | |
|---|---|---|
| committer | 2019-06-28 23:13:43 +0200 | |
| commit | e1b780ae6d60bd6a9635f6f1197dc26d2b31e3a8 (patch) | |
| tree | af8afb3822c06d50a9d42fb2500b0ff378c0f973 /src/main/java/cuchaz/enigma/command/ConvertMappingsCommand.java | |
| parent | fix inner class handling in TinyMappingsReader (diff) | |
| download | enigma-fork-e1b780ae6d60bd6a9635f6f1197dc26d2b31e3a8.tar.gz enigma-fork-e1b780ae6d60bd6a9635f6f1197dc26d2b31e3a8.tar.xz enigma-fork-e1b780ae6d60bd6a9635f6f1197dc26d2b31e3a8.zip | |
Profile option for mappings to be saved by-obf instead of by-deobf
Diffstat (limited to 'src/main/java/cuchaz/enigma/command/ConvertMappingsCommand.java')
| -rw-r--r-- | src/main/java/cuchaz/enigma/command/ConvertMappingsCommand.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main/java/cuchaz/enigma/command/ConvertMappingsCommand.java b/src/main/java/cuchaz/enigma/command/ConvertMappingsCommand.java index 775bd3e..689df02 100644 --- a/src/main/java/cuchaz/enigma/command/ConvertMappingsCommand.java +++ b/src/main/java/cuchaz/enigma/command/ConvertMappingsCommand.java | |||
| @@ -2,6 +2,8 @@ package cuchaz.enigma.command; | |||
| 2 | 2 | ||
| 3 | import cuchaz.enigma.throwables.MappingParseException; | 3 | import cuchaz.enigma.throwables.MappingParseException; |
| 4 | import cuchaz.enigma.translation.mapping.EntryMapping; | 4 | import cuchaz.enigma.translation.mapping.EntryMapping; |
| 5 | import cuchaz.enigma.translation.mapping.MappingFileNameFormat; | ||
| 6 | import cuchaz.enigma.translation.mapping.MappingSaveParameters; | ||
| 5 | import cuchaz.enigma.translation.mapping.tree.EntryTree; | 7 | import cuchaz.enigma.translation.mapping.tree.EntryTree; |
| 6 | import cuchaz.enigma.utils.Utils; | 8 | import cuchaz.enigma.utils.Utils; |
| 7 | 9 | ||
| @@ -26,10 +28,12 @@ public class ConvertMappingsCommand extends Command { | |||
| 26 | 28 | ||
| 27 | @Override | 29 | @Override |
| 28 | public void run(String... args) throws IOException, MappingParseException { | 30 | public void run(String... args) throws IOException, MappingParseException { |
| 29 | EntryTree<EntryMapping> mappings = MappingCommandsUtil.read(args[0], Paths.get(args[1])); | 31 | MappingSaveParameters saveParameters = new MappingSaveParameters(MappingFileNameFormat.BY_DEOBF); |
| 32 | |||
| 33 | EntryTree<EntryMapping> mappings = MappingCommandsUtil.read(args[0], Paths.get(args[1]), saveParameters); | ||
| 30 | 34 | ||
| 31 | Path output = Paths.get(args[3]); | 35 | Path output = Paths.get(args[3]); |
| 32 | Utils.delete(output); | 36 | Utils.delete(output); |
| 33 | MappingCommandsUtil.write(mappings, args[2], output); | 37 | MappingCommandsUtil.write(mappings, args[2], output, saveParameters); |
| 34 | } | 38 | } |
| 35 | } | 39 | } |