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/EnigmaProfile.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/EnigmaProfile.java')
| -rw-r--r-- | src/main/java/cuchaz/enigma/EnigmaProfile.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main/java/cuchaz/enigma/EnigmaProfile.java b/src/main/java/cuchaz/enigma/EnigmaProfile.java index feb5fdb..a5904ee 100644 --- a/src/main/java/cuchaz/enigma/EnigmaProfile.java +++ b/src/main/java/cuchaz/enigma/EnigmaProfile.java | |||
| @@ -4,6 +4,8 @@ import com.google.common.collect.ImmutableMap; | |||
| 4 | import com.google.gson.Gson; | 4 | import com.google.gson.Gson; |
| 5 | import com.google.gson.annotations.SerializedName; | 5 | import com.google.gson.annotations.SerializedName; |
| 6 | import cuchaz.enigma.api.service.EnigmaServiceType; | 6 | import cuchaz.enigma.api.service.EnigmaServiceType; |
| 7 | import cuchaz.enigma.translation.mapping.MappingFileNameFormat; | ||
| 8 | import cuchaz.enigma.translation.mapping.MappingSaveParameters; | ||
| 7 | 9 | ||
| 8 | import javax.annotation.Nullable; | 10 | import javax.annotation.Nullable; |
| 9 | import java.io.Reader; | 11 | import java.io.Reader; |
| @@ -18,6 +20,9 @@ public final class EnigmaProfile { | |||
| 18 | @SerializedName("services") | 20 | @SerializedName("services") |
| 19 | private final Map<String, Service> serviceProfiles; | 21 | private final Map<String, Service> serviceProfiles; |
| 20 | 22 | ||
| 23 | @SerializedName("mapping_save_parameters") | ||
| 24 | private final MappingSaveParameters mappingSaveParameters = new MappingSaveParameters(MappingFileNameFormat.BY_DEOBF); | ||
| 25 | |||
| 21 | private EnigmaProfile(Map<String, Service> serviceProfiles) { | 26 | private EnigmaProfile(Map<String, Service> serviceProfiles) { |
| 22 | this.serviceProfiles = serviceProfiles; | 27 | this.serviceProfiles = serviceProfiles; |
| 23 | } | 28 | } |
| @@ -31,6 +36,10 @@ public final class EnigmaProfile { | |||
| 31 | return serviceProfiles.get(serviceType.key); | 36 | return serviceProfiles.get(serviceType.key); |
| 32 | } | 37 | } |
| 33 | 38 | ||
| 39 | public MappingSaveParameters getMappingSaveParameters() { | ||
| 40 | return mappingSaveParameters; | ||
| 41 | } | ||
| 42 | |||
| 34 | public static class Service { | 43 | public static class Service { |
| 35 | private final String id; | 44 | private final String id; |
| 36 | private final Map<String, String> args; | 45 | private final Map<String, String> args; |