Added trail settings to the in-game config

This commit is contained in:
GirafiStudios 2016-02-13 21:54:15 +01:00
parent d1a6463b47
commit 19a503712e
3 changed files with 11 additions and 1 deletions

View file

@ -2,6 +2,8 @@ package biomesoplenty.client.gui;
import biomesoplenty.common.config.GameplayConfigurationHandler;
import biomesoplenty.common.config.MiscConfigurationHandler;
import biomesoplenty.common.remote.TrailManager;
import biomesoplenty.common.util.entity.PlayerUtil;
import biomesoplenty.core.BiomesOPlenty;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.util.StatCollector;
@ -27,10 +29,15 @@ public class GuiBOPConfig extends GuiConfig
List<IConfigElement> convenienceSettings = new ConfigElement(GameplayConfigurationHandler.config.getCategory(GameplayConfigurationHandler.convenienceSettings.toLowerCase())).getChildElements();
List<IConfigElement> guiSettings = new ConfigElement(MiscConfigurationHandler.config.getCategory(MiscConfigurationHandler.guiSettings.toLowerCase())).getChildElements();
List<IConfigElement> textureSettings = new ConfigElement(MiscConfigurationHandler.config.getCategory(MiscConfigurationHandler.textureSettings.toLowerCase())).getChildElements();
List<IConfigElement> trailSettings = new ConfigElement(MiscConfigurationHandler.config.getCategory(MiscConfigurationHandler.trailSettings.toLowerCase())).getChildElements();
list.add(new DummyConfigElement.DummyCategoryElement(StatCollector.translateToLocal("config.category.convenienceSettings.title"), "config.category.convenienceSettings", convenienceSettings));
list.add(new DummyConfigElement.DummyCategoryElement(StatCollector.translateToLocal("config.category.guiSettings.title"), "config.category.guiSettings", guiSettings));
list.add(new DummyConfigElement.DummyCategoryElement(StatCollector.translateToLocal("config.category.textureSettings.title"), "config.category.textureSettings", textureSettings));
if (TrailManager.trailsMap.containsKey(PlayerUtil.getClientPlayerUUID()))
{
list.add(new DummyConfigElement.DummyCategoryElement(StatCollector.translateToLocal("config.category.trailSettings.title"), "config.category.trailSettings", trailSettings));
}
return list;
}

View file

@ -26,6 +26,7 @@ public class MiscConfigurationHandler
public static String guiSettings = "GUI Settings";
public static String textureSettings = "Texture Settings";
public static String trailSettings = "Trail Settings";
public static boolean useBoPWorldTypeDefault;
public static boolean overrideTitlePanorama;
@ -58,7 +59,7 @@ public class MiscConfigurationHandler
//Check if the player has a trail
if (TrailManager.trailsMap.containsKey(PlayerUtil.getClientPlayerUUID()))
{
trailVisbilityMode = TrailVisibilityMode.values()[config.getInt("Modify Trail Visibility", "Trail Settings", 0, 0, 1, "0 = All trails visble, 1 = Others can see your trail but you can't")];
trailVisbilityMode = TrailVisibilityMode.values()[config.getInt("Modify Trail Visibility", trailSettings, 0, 0, 1, "0 = All trails visble, 1 = Others can see your trail but you can't")];
}
}
}

View file

@ -54,9 +54,11 @@ biome_finder.not_found=Not found, maybe %s is too far away
config.category.convenienceSettings.title=Convenience Settings
config.category.guiSettings.title=GUI Settings
config.category.textureSettings.title=Texture Settings
config.category.trailSettings.title=Trail Settings
config.category.convenienceSettings.tooltip=Require shears to be used to collect flower drops.
config.category.guiSettings.tooltip=Use the Biomes O' Plenty World Type by default when selecting a world.
config.category.textureSettings.tooltip=Override the Forge bucket texture and use ours instead (It's nicer!)
config.category.trailSettings.tooltip=Modify Trail Visibility
commands.biomesoplenty.usage=/biomesoplenty <tpbiome|biomename|stripchunk> [args]
commands.biomesoplenty.biomename.usage=/biomesoplenty biomename [biomeId]