Harvestable checkmark/x changed to be configurable

This commit is contained in:
squeek committed 2014-04-28 17:40:34 -07:00
1 parent 4b2d34bace
commit dc57d867e6
2 files changed
+15 -3

No files matched your search

+13 -1
View File
@@ -8,8 +8,18 @@ public class Config
private static final String CATEGORY_MAIN = "Main";
public static String MINIMAL_SEPARATOR_STRING;
private static final String MINIMAL_SEPARATOR_STRING_NAME = "minimalModeSeparator";
private static final String MINIMAL_SEPARATOR_STRING_NAME = "minimal.mode.separator";
private static final String MINIMAL_SEPARATOR_STRING_DEFAULT = " : ";
public static String CURRENTLY_HARVESTABLE_STRING;
private static final String CURRENTLY_HARVESTABLE_STRING_NAME = "is.currently.harvestable.string";
// for some reason \u2714 was getting translated as ? when compiled with gradle; no clue why but this seems to work
private static final String CURRENTLY_HARVESTABLE_STRING_DEFAULT = String.valueOf(Character.toChars(0x2714));
public static String NOT_CURRENTLY_HARVESTABLE_STRING;
private static final String NOT_CURRENTLY_HARVESTABLE_STRING_NAME = "not.currently.harvestable.string";
// for some reason \u2718 was getting translated as ? when compiled with gradle; no clue why but this seems to work
private static final String NOT_CURRENTLY_HARVESTABLE_STRING_DEFAULT = String.valueOf(Character.toChars(0x2718));
private static Configuration config;
@@ -20,6 +30,8 @@ public class Config
load();
MINIMAL_SEPARATOR_STRING = config.get(CATEGORY_MAIN, MINIMAL_SEPARATOR_STRING_NAME, MINIMAL_SEPARATOR_STRING_DEFAULT).getString();
CURRENTLY_HARVESTABLE_STRING = config.get(CATEGORY_MAIN, CURRENTLY_HARVESTABLE_STRING_NAME, CURRENTLY_HARVESTABLE_STRING_DEFAULT).getString();
NOT_CURRENTLY_HARVESTABLE_STRING = config.get(CATEGORY_MAIN, NOT_CURRENTLY_HARVESTABLE_STRING_NAME, NOT_CURRENTLY_HARVESTABLE_STRING_DEFAULT).getString();
save();
}
@@ -99,7 +99,7 @@ public class WailaHandler implements IWailaDataProvider
if (!minimalLayout)
{
if (showCurrentlyHarvestable)
toolTip.add(ColorHelper.getBooleanColor(isCurrentlyHarvestable) + (isCurrentlyHarvestable ? "\u2714" : "\u2718") + EnumChatFormatting.RESET + " Currently Harvestable");
toolTip.add(ColorHelper.getBooleanColor(isCurrentlyHarvestable) + (isCurrentlyHarvestable ? Config.CURRENTLY_HARVESTABLE_STRING : Config.NOT_CURRENTLY_HARVESTABLE_STRING) + EnumChatFormatting.RESET + " Currently Harvestable");
if (harvestLevel != -1 && showEffectiveTool)
toolTip.add("Effective Tool : " + ColorHelper.getBooleanColor(isEffective && canHarvest, isEffective && !canHarvest) + StatCollector.translateToLocal("harvestlevels.toolclass." + effectiveTool));
if (harvestLevel >= 1 && showHarvestLevel)
@@ -110,7 +110,7 @@ public class WailaHandler implements IWailaDataProvider
List<String> stringParts = new ArrayList<String>();
if (showCurrentlyHarvestable)
stringParts.add(ColorHelper.getBooleanColor(isCurrentlyHarvestable) + (isCurrentlyHarvestable ? "\u2714" : "\u2718"));
stringParts.add(ColorHelper.getBooleanColor(isCurrentlyHarvestable) + (isCurrentlyHarvestable ? Config.CURRENTLY_HARVESTABLE_STRING : Config.NOT_CURRENTLY_HARVESTABLE_STRING));
if (harvestLevel != -1 && showEffectiveTool)
stringParts.add(ColorHelper.getBooleanColor(isEffective && canHarvest, isEffective && !canHarvest) + StatCollector.translateToLocal("harvestlevels.toolclass." + effectiveTool));
if (harvestLevel >= 1 && showHarvestLevel)