refactored some config related parts

This commit is contained in:
2017-01-04 03:24:21 +01:00
parent 0eb536e16b
commit 2418918ebd
3 changed files with 9 additions and 12 deletions

View File

@@ -110,16 +110,13 @@ public class TAIGAConfiguration {
final int PALLADIUM_DEFAULT = 10;
final int ABYSSUM_DEFAULT = 4;
final boolean FALSE = false;
final boolean TRUE = true;
Property ironSwitch = config.get(CATEGORY_NAME_GENERAL, "Extra Iron Switch", FALSE);
ironSwitch.setComment("Switch ore on/off");
Property ironSwitch = config.get(CATEGORY_NAME_GENERAL, "Additional Iron", false);
ironSwitch.setComment("Switch additional ore on/off");
ironSwitch.setLanguageKey("gui.taiga_configuration.gen_iron");
Property endSwitch = config.get(CATEGORY_NAME_GENERAL, "Extra Endstone Switch", TRUE);
endSwitch.setComment("Switch extra End on/off");
Property endSwitch = config.get(CATEGORY_NAME_GENERAL, "Additional Endstone", true);
endSwitch.setComment("Switch additional endstone on/off");
endSwitch.setLanguageKey("gui.taiga_configuration.gen_end");
/*
@@ -202,8 +199,8 @@ public class TAIGAConfiguration {
if (readFieldsFromConfig) {
ironGen = ironSwitch.getBoolean(FALSE);
endGen = endSwitch.getBoolean(TRUE);
ironGen = ironSwitch.getBoolean(false);
endGen = endSwitch.getBoolean(true);
IRON_VAL = ironValueProp.getInt(IRON_DEFAULT);
if (IRON_VAL > RESFAC_MAX_VALUE || IRON_VAL < RESFAC_MIN_VALUE) {
IRON_VAL = IRON_DEFAULT;
@@ -275,6 +272,7 @@ public class TAIGAConfiguration {
}
ironSwitch.set(ironGen);
endSwitch.set(endGen);
ironValueProp.set(IRON_VAL);
tiberiumValueProp.set(TIBERIUM_VAL);
prometheumValueProp.set(PROMETHEUM_VAL);