Made the Config File and screen less ugly

This commit is contained in:
Ellpeck 2015-10-01 12:52:03 +02:00
parent a7e63fc174
commit e1af56faf2
5 changed files with 27 additions and 27 deletions

View file

@ -12,25 +12,25 @@ package ellpeck.actuallyadditions.config;
public enum ConfigCategories{
FOOD_CRAFTING("food crafting", "Crafting Recipes for Food Items"),
BLOCKS_CRAFTING("block crafting", "Crafting Recipes for Blocks"),
ITEMS_CRAFTING("item crafting", "Crafting Recipes for Items"),
TOOL_VALUES("tool values", "Values for Tools"),
MACHINE_VALUES("machine values", "Values for Machines"),
MOB_DROPS("mob drops", "Everything regarding Item drops from mobs"),
WORLD_GEN("world gen", "Everything regarding World Generation"),
POTION_RING_CRAFTING("ring crafting", "Crafting Recipes for Rings"),
OTHER("other", "Everything else"),
FLUIDS("fluids", "Everything regarding fluids"),
DRILL_VALUES("drill values", "Properties of Drills and their Upgrades"),
CRUSHER_RECIPES("crusher recipes", "Recipes for the Crusher"),
ARMOR_VALUES("armor values", "Values for Armor");
FOOD_CRAFTING("Food Crafting", "Crafting Recipes for Food Items"),
BLOCKS_CRAFTING("Block Crafting", "Crafting Recipes for Blocks"),
ITEMS_CRAFTING("Item Crafting", "Crafting Recipes for Items"),
TOOL_VALUES("Tool Values", "Values for Tools"),
MACHINE_VALUES("Machine Values", "Values for Machines"),
MOB_DROPS("Mob Drops", "Everything regarding Item drops from mobs"),
WORLD_GEN("World Gen", "Everything regarding World Generation"),
POTION_RING_CRAFTING("Ring Crafting", "Crafting Recipes for Rings"),
OTHER("Other", "Everything else"),
FLUIDS("Fluids", "Everything regarding fluids"),
DRILL_VALUES("Drill Values", "Properties of Drills and their Upgrades"),
CRUSHER_RECIPES("Crusher Recipes", "Recipes for the Crusher"),
ARMOR_VALUES("Armor Values", "Values for Armor");
public final String name;
public final String comment;
ConfigCategories(String name, String comment){
this.name = name.toLowerCase();
this.name = name;
this.comment = comment;
}
}

View file

@ -35,23 +35,23 @@ public class ConfigValues{
public static void defineConfigValues(Configuration config){
for(ConfigCrafting currConf : craftingConfig){
currConf.currentValue = config.getBoolean(currConf.name, currConf.category.toLowerCase(), currConf.defaultValue, "If the "+currConf.extraText+"Crafting Recipe for the "+currConf.name+" is Enabled");
currConf.currentValue = config.get(currConf.category, currConf.name, currConf.defaultValue, "If the "+currConf.extraText+"Crafting Recipe for the "+currConf.name+" is Enabled").getBoolean();
}
for(ConfigIntValues currConf : intConfig){
currConf.currentValue = config.getInt(currConf.name, currConf.category.toLowerCase(), currConf.defaultValue, currConf.min, currConf.max, currConf.desc);
currConf.currentValue = config.get(currConf.category, currConf.name, currConf.defaultValue, currConf.desc, currConf.min, currConf.max).getInt();
}
for(ConfigFloatValues currConf : floatConfig){
currConf.currentValue = config.getFloat(currConf.name, currConf.category.toLowerCase(), currConf.defaultValue, currConf.min, currConf.max, currConf.desc);
currConf.currentValue = (float)config.get(currConf.category, currConf.name, currConf.defaultValue, currConf.desc, currConf.min, currConf.max).getDouble();
}
for(ConfigBoolValues currConf : boolConfig){
currConf.currentValue = config.getBoolean(currConf.name, currConf.category.toLowerCase(), currConf.defaultValue, currConf.desc);
currConf.currentValue = config.get(currConf.category, currConf.name, currConf.defaultValue, currConf.desc).getBoolean();
}
crusherRecipeExceptions = config.getStringList("Crusher Recipe Exceptions", ConfigCategories.CRUSHER_RECIPES.name, new String[]{"ingotBrick", "ingotBrickNether"}, "The Ingots, Dusts and Ores blacklisted from being auto-registered to be crushed by the Crusher. This list uses OreDictionary Names of the Inputs only.");
mashedFoodCraftingExceptions = config.getStringList("Mashed Food Crafting Exceptions", ConfigCategories.ITEMS_CRAFTING.name, new String[]{"ActuallyAdditions:itemCoffee"}, "The ItemFood, IGrowable and IPlantable Items that can not be used to craft Mashed Food. These are the actual registered Item Names, the ones you use, for example, when using the /give Command.");
oreMagnetExceptions = config.getStringList("Ore Magnet Exceptions", ConfigCategories.MACHINE_VALUES.name, new String[0], "By default, the Ore Magnet pulls up everything that is registered in the OreDictionary as a String that starts with 'ore'. If you want any Ore not to be pulled up by the Magnet, put its ORE DICTIONARY name here.");
oreMagnetExtraWhitelist = config.getStringList("Ore Magnet Extra Whitelist", ConfigCategories.MACHINE_VALUES.name, new String[]{"rftools:dimensionalShardBlock"}, "By default, the Ore Magnet pulls up everything that is registered in the OreDictionary as a String that starts with 'ore'. If you want anything else to be pulled up by the Magnet, put its REGISTRY NAME here. These are the actual registered Item Names, the ones you use, for example, when using the /give Command.");
paxelExtraMiningWhitelist = config.getStringList("AIOT Extra Whitelist", ConfigCategories.TOOL_VALUES.name, new String[]{"TConstruct:GravelOre"}, "By default, the AIOT can mine certain blocks. If there is one that it can't mine, but should be able to, put its REGISTRY NAME here. These are the actual registered Item Names, the ones you use, for example, when using the /give Command.");
drillExtraminingWhitelist = config.getStringList("Drill Extra Whitelist", ConfigCategories.TOOL_VALUES.name, new String[]{"TConstruct:GravelOre"}, "By default, the Drill can mine certain blocks. If there is one that it can't mine, but should be able to, put its REGISTRY NAME here. These are the actual registered Item Names, the ones you use, for example, when using the /give Command.");
crusherRecipeExceptions = config.get(ConfigCategories.CRUSHER_RECIPES.name, "Crusher Recipe Exceptions", new String[]{"ingotBrick", "ingotBrickNether"}, "The Ingots, Dusts and Ores blacklisted from being auto-registered to be crushed by the Crusher. This list uses OreDictionary Names of the Inputs only.").getStringList();
mashedFoodCraftingExceptions = config.get(ConfigCategories.ITEMS_CRAFTING.name, "Mashed Food Crafting Exceptions", new String[]{"ActuallyAdditions:itemCoffee"}, "The ItemFood, IGrowable and IPlantable Items that can not be used to craft Mashed Food. These are the actual registered Item Names, the ones you use, for example, when using the /give Command.").getStringList();
oreMagnetExceptions = config.get(ConfigCategories.MACHINE_VALUES.name, "Ore Magnet Exceptions", new String[0], "By default, the Ore Magnet pulls up everything that is registered in the OreDictionary as a String that starts with 'ore'. If you want any Ore not to be pulled up by the Magnet, put its ORE DICTIONARY name here.").getStringList();
oreMagnetExtraWhitelist = config.get(ConfigCategories.MACHINE_VALUES.name, "Ore Magnet Extra Whitelist", new String[]{"rftools:dimensionalShardBlock"}, "By default, the Ore Magnet pulls up everything that is registered in the OreDictionary as a String that starts with 'ore'. If you want anything else to be pulled up by the Magnet, put its REGISTRY NAME here. These are the actual registered Item Names, the ones you use, for example, when using the /give Command.").getStringList();
paxelExtraMiningWhitelist = config.get(ConfigCategories.TOOL_VALUES.name, "AIOT Extra Whitelist", new String[]{"TConstruct:GravelOre"}, "By default, the AIOT can mine certain blocks. If there is one that it can't mine, but should be able to, put its REGISTRY NAME here. These are the actual registered Item Names, the ones you use, for example, when using the /give Command.").getStringList();
drillExtraminingWhitelist = config.get(ConfigCategories.TOOL_VALUES.name, "Drill Extra Whitelist", new String[]{"TConstruct:GravelOre"}, "By default, the Drill can mine certain blocks. If there is one that it can't mine, but should be able to, put its REGISTRY NAME here. These are the actual registered Item Names, the ones you use, for example, when using the /give Command.").getStringList();
}
}

View file

@ -30,7 +30,7 @@ public class ConfigurationHandler{
Util.registerEvent(this);
if(config == null){
config = new Configuration(configFile);
config = new Configuration(configFile, true);
loadConfig();
}
}

View file

@ -23,7 +23,7 @@ import java.util.List;
public class GuiConfiguration extends GuiConfig{
public GuiConfiguration(GuiScreen parentScreen){
super(parentScreen, getConfigElements(), ModUtil.MOD_ID, false, false, ModUtil.NAME);
super(parentScreen, getConfigElements(), ModUtil.MOD_ID, false, false, GuiConfig.getAbridgedConfigPath(ConfigurationHandler.config.toString()));
}
private static List<IConfigElement> getConfigElements(){

View file

@ -162,7 +162,7 @@ public enum ConfigIntValues{
ORE_MAGNET_OIL_USE("Ore Magnet: Oil Use", ConfigCategories.MACHINE_VALUES, 30, 0, 5000, "The amount of oil the Ore Magnet uses every Block"),
ORE_MAGNET_ENERGY_USE("Ore Magnet: Energy USe", ConfigCategories.MACHINE_VALUES, 250, 10, 10000, "The amount of Energy the Ore Magnet uses every tick"),
LEAF_GENERATOR_ENERGY_PRODUCED("Leaf Generator: Energy Produce", ConfigCategories.MACHINE_VALUES, 20, 1, 10000, "How much Energy the Leaf Generator produces per Leaf broken"),
LEAF_GENERATOR_ENERGY_PRODUCED("Leaf Generator: Energy Produce", ConfigCategories.MACHINE_VALUES, 40, 1, 10000, "How much Energy the Leaf Generator produces per Leaf broken"),
LEAF_GENERATOR_COOLDOWN_TIME("Leaf Generator: Cooldown Time", ConfigCategories.MACHINE_VALUES, 5, 0, 100, "The amount of ticks that it takes util another Leaf gets proken"),
LEAF_GENERATOR_RANGE("Leaf Generator: Range", ConfigCategories.MACHINE_VALUES, 5, 1, 100, "The radius of a leaf generator");