mirror of
https://github.com/GTNewHorizons/NotEnoughCharacters.git
synced 2026-11-25 06:34:21 +00:00
添加了模糊音的配置
This commit is contained in:
1 parent
f4b9b206c3
commit
dab3bd65f2
6 files changed
+98
-82
No files matched your search
@@ -7,13 +7,17 @@ import java.io.File;
|
||||
|
||||
public class NechConfig {
|
||||
|
||||
private static Configuration config;
|
||||
|
||||
public static boolean EnableFZh2Z = false;
|
||||
public static boolean EnableFSh2S = false;
|
||||
public static boolean EnableFCh2C = false;
|
||||
public static boolean EnableFAng2An = false;
|
||||
public static boolean EnableFIng2In = false;
|
||||
public static boolean EnableFEng2En = false;
|
||||
public static boolean EnableFU2V = false;
|
||||
|
||||
public static String[] transformerRegExpAdditionalList = new String[0];
|
||||
public static String[] transformerStringAdditionalList = new String[0];
|
||||
public static String[] transformerMethodBlackList = new String[0];
|
||||
|
||||
public static String[] defaultTransformerRegExp = new String[]{
|
||||
"appeng.client.me.ItemRepo:updateView",//Applied-Energistics-2 search
|
||||
"net.p455w0rd.wirelesscraftingterminal.client.me.ItemRepo:updateView"//WirelessCraftingTerminal search
|
||||
@@ -30,7 +34,7 @@ public class NechConfig {
|
||||
};
|
||||
|
||||
public static void loadConfig(File configFile) {
|
||||
config = new Configuration(configFile);
|
||||
Configuration config = new Configuration(configFile);
|
||||
config.load();
|
||||
config.get("transformers", "DefaultTransformerRegExp", defaultTransformerRegExp,
|
||||
"Default list of methods to transform, of which uses regular expression to match.\n" +
|
||||
@@ -42,17 +46,26 @@ public class NechConfig {
|
||||
config.getCategory("transformers").get("DefaultTransformerRegExp").set(defaultTransformerRegExp);
|
||||
config.getCategory("transformers").get("DefaultTransformerString").set(defaultTransformerStringList);
|
||||
|
||||
transformerRegExpAdditionalList = config.get("additional","AdditionalTransformerRegExpList",new String[0],
|
||||
transformerRegExpAdditionalList = config.get("transformers", "AdditionalTransformerRegExpList", new String[0],
|
||||
"Additional list of methods to transform, of which uses regular expression to match.\n" +
|
||||
"The format is \"full.class.path$InnerClass:methodName\"").getStringList();
|
||||
"The format is \"full.class.path$InnerClass:methodName\"").getStringList();
|
||||
|
||||
transformerStringAdditionalList = config.get("additional","AdditionalTransformerStringList",new String[0],
|
||||
transformerStringAdditionalList = config.get("transformers", "AdditionalTransformerStringList", new String[0],
|
||||
"Additional list of methods to transform, of which uses \"String.contains\" to match.\n" +
|
||||
"The format is \"full.class.path$InnerClass:methodName\"").getStringList();
|
||||
|
||||
transformerMethodBlackList = config.get("blacklist","transformerMethodBlackList",new String[0],
|
||||
transformerMethodBlackList = config.get("transformers", "transformerMethodBlackList", new String[0],
|
||||
"Blacklist of methods to transform\n" +
|
||||
"The format is \"full.class.path$InnerClass:methodName\"").getStringList();
|
||||
if(config.hasChanged()) config.save();
|
||||
|
||||
//Fuzzy config
|
||||
EnableFU2V = config.get("fuzzy", "EnableFU2V", false, "Set to true to enable fuzzy U <=> V").getBoolean();
|
||||
EnableFZh2Z = config.get("fuzzy", "EnableFZh2Z", false, "Set to true to enable fuzzy Zh <=> Z").getBoolean();
|
||||
EnableFSh2S = config.get("fuzzy", "EnableFSh2S", false, "Set to true to enable fuzzy Sh <=> S").getBoolean();
|
||||
EnableFCh2C = config.get("fuzzy", "EnableFCh2C", false, "Set to true to enable fuzzy Ch <=> C").getBoolean();
|
||||
EnableFAng2An = config.get("fuzzy", "EnableFAng2An", false, "Set to true to enable fuzzy Ang <=> An").getBoolean();
|
||||
EnableFIng2In = config.get("fuzzy", "EnableFIng2In", false, "Set to true to enable fuzzy Ing <=> In").getBoolean();
|
||||
EnableFEng2En = config.get("fuzzy", "EnableFEng2En", false, "Set to true to enable fuzzy Eng <=> En").getBoolean();
|
||||
if (config.hasChanged()) config.save();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user