mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-28 07:35:47 +00:00
Use EnumChatFormatting values instead of unicode text
This commit is contained in:
1 parent
d55b119019
commit
8f1b1e03f4
14 files changed
+63
-47
No files matched your search
@@ -19,6 +19,7 @@ import java.util.Set;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
|
||||
@@ -322,7 +323,7 @@ public class Bee extends IndividualLiving implements IBee {
|
||||
IAlleleBeeSpecies primary = genome.getPrimary();
|
||||
IAlleleBeeSpecies secondary = genome.getSecondary();
|
||||
if (!isPureBred(EnumBeeChromosome.SPECIES))
|
||||
list.add("\u00A79" + StringUtil.localize("bees.hybrid").replaceAll("%PRIMARY",primary.getName()).replaceAll("%SECONDARY",secondary.getName()));
|
||||
list.add(EnumChatFormatting.BLUE + StringUtil.localize("bees.hybrid").replaceAll("%PRIMARY",primary.getName()).replaceAll("%SECONDARY",secondary.getName()));
|
||||
|
||||
IAllele speed = genome.getActiveAllele(EnumBeeChromosome.SPEED);
|
||||
String customWorker = "tooltip.worker." + speed.getUnlocalizedName().replaceFirst("gui.", "");
|
||||
@@ -334,14 +335,14 @@ public class Bee extends IndividualLiving implements IBee {
|
||||
list.add(genome.getActiveAllele(EnumBeeChromosome.LIFESPAN).getName() + " " + StringUtil.localize("gui.life"));
|
||||
|
||||
IAlleleTolerance tempTolerance = (IAlleleTolerance)getGenome().getActiveAllele(EnumBeeChromosome.TEMPERATURE_TOLERANCE);
|
||||
list.add("\u00A7aT: " + AlleleManager.climateHelper.toDisplay(genome.getPrimary().getTemperature()) + " / " + tempTolerance.getName());
|
||||
list.add(EnumChatFormatting.GREEN + "T: " + AlleleManager.climateHelper.toDisplay(genome.getPrimary().getTemperature()) + " / " + tempTolerance.getName());
|
||||
|
||||
IAlleleTolerance humidTolerance = (IAlleleTolerance)getGenome().getActiveAllele(EnumBeeChromosome.HUMIDITY_TOLERANCE);
|
||||
list.add("\u00A7aH: " + AlleleManager.climateHelper.toDisplay(genome.getPrimary().getHumidity()) + " / " + humidTolerance.getName());
|
||||
list.add(EnumChatFormatting.GREEN + "H: " + AlleleManager.climateHelper.toDisplay(genome.getPrimary().getHumidity()) + " / " + humidTolerance.getName());
|
||||
|
||||
list.add(genome.getFlowerProvider().getDescription());
|
||||
if (genome.getNocturnal())
|
||||
list.add("\u00A7c" + GenericRatings.rateActivityTime(genome.getNocturnal(), false));
|
||||
list.add(EnumChatFormatting.RED + GenericRatings.rateActivityTime(genome.getNocturnal(), false));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -34,6 +34,7 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
public class ItemBeeGE extends ItemGE {
|
||||
@@ -94,9 +95,9 @@ public class ItemBeeGE extends ItemGE {
|
||||
if(type != EnumBeeType.DRONE) {
|
||||
IBee individual = new Bee(itemstack.getTagCompound());
|
||||
if (individual.isNatural())
|
||||
list.add("\u00A7e\u00A7o" + StringUtil.localize("bees.stock.pristine"));
|
||||
list.add(EnumChatFormatting.YELLOW + EnumChatFormatting.ITALIC.toString() + StringUtil.localize("bees.stock.pristine"));
|
||||
else
|
||||
list.add("\u00A7e" + StringUtil.localize("bees.stock.ignoble"));
|
||||
list.add(EnumChatFormatting.YELLOW + StringUtil.localize("bees.stock.ignoble"));
|
||||
}
|
||||
|
||||
super.addInformation(itemstack, player, list, flag);
|
||||
|
||||
@@ -38,6 +38,7 @@ import java.util.List;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
@@ -274,22 +275,28 @@ public class Tree extends Individual implements ITree, ITreeGenData, IPlantable
|
||||
IAlleleTreeSpecies primary = genome.getPrimary();
|
||||
IAlleleTreeSpecies secondary = genome.getSecondary();
|
||||
if (!isPureBred(EnumTreeChromosome.SPECIES))
|
||||
list.add("\u00A79" + StringUtil.localize("trees.hybrid").replaceAll("%PRIMARY",primary.getName()).replaceAll("%SECONDARY",secondary.getName()));
|
||||
list.add(String.format("\u00A76S: %s, \u00A7cM: %s", genome.getActiveAllele(EnumTreeChromosome.SAPPINESS).getName(), genome.getActiveAllele(EnumTreeChromosome.MATURATION).getName()));
|
||||
list.add(String.format("\u00A7dH: %s, \u00A7bG: %sx%s", genome.getActiveAllele(EnumTreeChromosome.HEIGHT).getName(), genome.getGirth(), genome.getGirth()));
|
||||
list.add(EnumChatFormatting.BLUE + StringUtil.localize("trees.hybrid").replaceAll("%PRIMARY",primary.getName()).replaceAll("%SECONDARY",secondary.getName()));
|
||||
|
||||
list.add(String.format("\u00A7eS: %s, \u00A7fY: %s", genome.getActiveAllele(EnumTreeChromosome.FERTILITY).getName(), genome.getActiveAllele(EnumTreeChromosome.YIELD).getName()));
|
||||
String sappiness = EnumChatFormatting.GOLD + "S: " + genome.getActiveAllele(EnumTreeChromosome.SAPPINESS).getName();
|
||||
String maturation = EnumChatFormatting.RED + "M: " + genome.getActiveAllele(EnumTreeChromosome.MATURATION).getName();
|
||||
String height = EnumChatFormatting.LIGHT_PURPLE + "H: " + genome.getActiveAllele(EnumTreeChromosome.HEIGHT).getName();
|
||||
String girth = EnumChatFormatting.AQUA + "G: " + String.format("%sx%s", genome.getGirth(), genome.getGirth());
|
||||
String fertility = EnumChatFormatting.YELLOW + "S: " + genome.getActiveAllele(EnumTreeChromosome.FERTILITY).getName();
|
||||
String yield = EnumChatFormatting.WHITE + "Y: " + genome.getActiveAllele(EnumTreeChromosome.YIELD).getName();
|
||||
list.add(String.format("%s, %s", sappiness, maturation));
|
||||
list.add(String.format("%s, %s", height, girth));
|
||||
list.add(String.format("%s, %s", fertility, yield));
|
||||
|
||||
IAlleleBoolean primaryFireproof = (IAlleleBoolean)genome.getActiveAllele(EnumTreeChromosome.FIREPROOF);
|
||||
if (primaryFireproof.getValue())
|
||||
list.add(String.format("\u00A7c%s", StatCollector.translateToLocal("for.gui.fireresist")));
|
||||
list.add(EnumChatFormatting.RED + StatCollector.translateToLocal("for.gui.fireresist"));
|
||||
|
||||
IAllele fruit = getGenome().getActiveAllele(EnumTreeChromosome.FRUITS);
|
||||
if(fruit != Allele.fruitNone) {
|
||||
String strike = "";
|
||||
if (!canBearFruit())
|
||||
strike = "\u00A7m";
|
||||
list.add(strike + "\u00A7aF: " + StringUtil.localize(genome.getFruitProvider().getDescription()));
|
||||
strike = EnumChatFormatting.STRIKETHROUGH.toString();
|
||||
list.add(strike + EnumChatFormatting.GREEN + "F: " + StringUtil.localize(genome.getFruitProvider().getDescription()));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -35,6 +35,8 @@ import java.util.List;
|
||||
import java.util.Locale;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
import net.minecraftforge.common.EnumPlantType;
|
||||
|
||||
public class GuiTreealyzer extends GuiAlyzer {
|
||||
@@ -229,13 +231,13 @@ public class GuiTreealyzer extends GuiAlyzer {
|
||||
String strike = "";
|
||||
IAllele fruit0 = tree.getGenome().getActiveAllele(EnumTreeChromosome.FRUITS);
|
||||
if (!tree.canBearFruit() && fruit0 != Allele.fruitNone)
|
||||
strike = "\u00A7m";
|
||||
strike = EnumChatFormatting.STRIKETHROUGH.toString();
|
||||
drawLine(strike + StringUtil.localize(tree.getGenome().getFruitProvider().getDescription()), COLUMN_1, fruitDominance0);
|
||||
|
||||
strike = "";
|
||||
IAllele fruit1 = tree.getGenome().getInactiveAllele(EnumTreeChromosome.FRUITS);
|
||||
if (!tree.getGenome().getSecondary().getSuitableFruit().contains(((IAlleleFruit) fruit1).getProvider().getFamily()) && fruit1 != Allele.fruitNone)
|
||||
strike = "\u00A7m";
|
||||
strike = EnumChatFormatting.STRIKETHROUGH.toString();
|
||||
drawLine(strike + StringUtil.localize(((IAlleleFruit) fruit1).getProvider().getDescription()), COLUMN_2, fruitDominance1);
|
||||
|
||||
newLine();
|
||||
|
||||
@@ -14,6 +14,7 @@ import java.util.concurrent.ConcurrentLinkedQueue;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
@@ -60,14 +61,14 @@ public class TickHandlerCoreClient {
|
||||
}
|
||||
|
||||
if (!naggedVersion && !Config.disableVersionCheck && Version.needsUpdateNoticeAndMarkAsSeen()) {
|
||||
queueChatMessage(String.format("\u00A7cNew version of Forestry available: %s for Minecraft %s", Version.getRecommendedVersion(),
|
||||
queueChatMessage(EnumChatFormatting.RED + String.format("New version of Forestry available: %s for Minecraft %s", Version.getRecommendedVersion(),
|
||||
Proxies.common.getMinecraftVersion()));
|
||||
queueChatMessage("\u00A7cThis message only displays once. Type '/forestry version' to see the changelog.");
|
||||
queueChatMessage(EnumChatFormatting.RED + "This message only displays once. Type '/forestry version' to see the changelog.");
|
||||
naggedVersion = true;
|
||||
}
|
||||
|
||||
if (!naggedVerify && Config.invalidFingerprint) {
|
||||
queueChatMessage("\u00A76Forestry's jar file was tampered with. Some machines have shut down and beekeeping has grown dangerous. Get a new jar from the official download page to fix that!");
|
||||
queueChatMessage(EnumChatFormatting.GOLD + "Forestry's jar file was tampered with. Some machines have shut down and beekeeping has grown dangerous. Get a new jar from the official download page to fix that!");
|
||||
naggedVerify = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ import java.util.List;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
import forestry.api.circuits.ChipsetManager;
|
||||
import forestry.api.circuits.ICircuit;
|
||||
@@ -53,7 +54,7 @@ public class CircuitBoard implements ICircuitBoard {
|
||||
@Override
|
||||
public void addTooltip(List<String> list) {
|
||||
if (layout != null)
|
||||
list.add("\u00A76" + layout.getUsage() + ":");
|
||||
list.add(EnumChatFormatting.GOLD + layout.getUsage() + ":");
|
||||
|
||||
List<String> extendedTooltip = new ArrayList<String>();
|
||||
for (ICircuit circuit : circuits)
|
||||
@@ -63,7 +64,7 @@ public class CircuitBoard implements ICircuitBoard {
|
||||
if(Proxies.common.isShiftDown() || extendedTooltip.size() <= 4) {
|
||||
list.addAll(extendedTooltip);
|
||||
} else {
|
||||
list.add("\u00A7o<" + StringUtil.localize("gui.tooltip.tmi") + ">");
|
||||
list.add(EnumChatFormatting.ITALIC + "<" + StringUtil.localize("gui.tooltip.tmi") + ">");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ import forestry.plugins.Plugin;
|
||||
import forestry.plugins.PluginManager;
|
||||
import net.minecraft.command.CommandException;
|
||||
import net.minecraft.command.ICommandSender;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
/**
|
||||
@@ -49,9 +50,7 @@ public class CommandPlugins extends SubCommand {
|
||||
}
|
||||
|
||||
private String makeListEntry(ForestryPlugin plugin) {
|
||||
String entry = "\u00A7c";
|
||||
if (plugin.isAvailable())
|
||||
entry = "\u00A7a";
|
||||
String entry = plugin.isAvailable() ? EnumChatFormatting.GREEN.toString() : EnumChatFormatting.RED.toString();
|
||||
|
||||
Plugin info = plugin.getClass().getAnnotation(Plugin.class);
|
||||
if (info != null) {
|
||||
@@ -95,18 +94,17 @@ public class CommandPlugins extends SubCommand {
|
||||
if (found == null)
|
||||
throw new CommandException(StringUtil.localizeAndFormat("chat.plugins.error", plugin));
|
||||
|
||||
String entry = "\u00A7c";
|
||||
if (found.isAvailable())
|
||||
entry = "\u00A7a";
|
||||
EnumChatFormatting formatting = found.isAvailable() ? EnumChatFormatting.GREEN : EnumChatFormatting.RED;
|
||||
|
||||
Plugin info = found.getClass().getAnnotation(Plugin.class);
|
||||
if (info != null) {
|
||||
CommandHelpers.sendChatMessage(sender, entry + "Plugin: " + info.name());
|
||||
CommandHelpers.sendChatMessage(sender, formatting + "Plugin: " + info.name());
|
||||
if (!info.version().isEmpty())
|
||||
CommandHelpers.sendChatMessage(sender, "\u00A79Version: " + info.version());
|
||||
CommandHelpers.sendChatMessage(sender, EnumChatFormatting.BLUE + "Version: " + info.version());
|
||||
if (!info.author().isEmpty())
|
||||
CommandHelpers.sendChatMessage(sender, "\u00A79Author(s): " + info.author());
|
||||
CommandHelpers.sendChatMessage(sender, EnumChatFormatting.BLUE + "Author(s): " + info.author());
|
||||
if (!info.url().isEmpty())
|
||||
CommandHelpers.sendChatMessage(sender, "\u00A79URL: " + info.url());
|
||||
CommandHelpers.sendChatMessage(sender, EnumChatFormatting.BLUE + "URL: " + info.url());
|
||||
if (!info.unlocalizedDescription().isEmpty())
|
||||
CommandHelpers.sendChatMessage(sender, StatCollector.translateToLocal(info.unlocalizedDescription()));
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ public class CommandVersion extends SubCommand {
|
||||
CommandHelpers.sendLocalizedChatMessage(sender, style, "for.chat.version", Version.getVersion(), Proxies.common.getMinecraftVersion(), Version.getRecommendedVersion());
|
||||
if (Version.isOutdated())
|
||||
for (String updateLine : Version.getChangelog()) {
|
||||
CommandHelpers.sendChatMessage(sender, "\u00A79" + updateLine);
|
||||
CommandHelpers.sendChatMessage(sender, EnumChatFormatting.BLUE + updateLine);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ import java.util.HashSet;
|
||||
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
@@ -87,7 +88,7 @@ public class FilteredTank extends StandardTank {
|
||||
toolTip.add(name);
|
||||
}
|
||||
} else {
|
||||
toolTip.add("\u00A7o<" + StringUtil.localize("gui.tooltip.tmi") + ">");
|
||||
toolTip.add(EnumChatFormatting.ITALIC + "<" + StringUtil.localize("gui.tooltip.tmi") + ">");
|
||||
}
|
||||
|
||||
toolTip.add(String.format("%,d", getFluidAmount()) + " / " + String.format("%,d", getCapacity()));
|
||||
|
||||
@@ -21,6 +21,7 @@ import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
public abstract class ItemGE extends Item {
|
||||
|
||||
@@ -71,7 +72,7 @@ public abstract class ItemGE extends Item {
|
||||
if(Proxies.common.isShiftDown())
|
||||
individual.addTooltip(list);
|
||||
else
|
||||
list.add("\u00A7o<" + StringUtil.localize("gui.tooltip.tmi") + ">");
|
||||
list.add(EnumChatFormatting.ITALIC + "<" + StringUtil.localize("gui.tooltip.tmi") + ">");
|
||||
} else
|
||||
list.add("<" + StringUtil.localize("gui.unknown") + ">");
|
||||
}
|
||||
|
||||
@@ -33,6 +33,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTUtil;
|
||||
import net.minecraft.util.ChatComponentTranslation;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@@ -88,7 +89,7 @@ public class ItemResearchNote extends ItemForestry {
|
||||
|
||||
if(encoded.getSpecialConditions() != null && encoded.getSpecialConditions().size() > 0) {
|
||||
for(String line : encoded.getSpecialConditions())
|
||||
tooltips.add("\u00A76" + line);
|
||||
tooltips.add(EnumChatFormatting.GOLD + line);
|
||||
}
|
||||
} else if(this == SPECIES) {
|
||||
IAlleleSpecies allele0 = (IAlleleSpecies)AlleleManager.alleleRegistry.getAllele(compound.getString("AL0"));
|
||||
@@ -213,7 +214,7 @@ public class ItemResearchNote extends ItemForestry {
|
||||
public void addTooltip(List<String> list) {
|
||||
ArrayList<String> tooltips = type.getTooltip(inner);
|
||||
if(tooltips.size() <= 0) {
|
||||
list.add("\u00A7o\u00A7c" + StringUtil.localize("researchNote.error.0"));
|
||||
list.add(EnumChatFormatting.ITALIC + EnumChatFormatting.RED.toString() + StringUtil.localize("researchNote.error.0"));
|
||||
list.add(StringUtil.localize("researchNote.error.1"));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -23,6 +23,8 @@ import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class GuiEscritoire extends GuiForestry<TileEscritoire> {
|
||||
@@ -214,7 +216,8 @@ public class GuiEscritoire extends GuiForestry<TileEscritoire> {
|
||||
|
||||
newLine();
|
||||
newLine();
|
||||
drawLine("\u00A7n\u00A7oAttempt No. " + (NaturalistGame.BOUNTY_MAX - tile.getGame().getBountyLevel()), 171, fontColor.get("gui.mail.lettertext"));
|
||||
String format = EnumChatFormatting.UNDERLINE + EnumChatFormatting.ITALIC.toString();
|
||||
drawLine(format + "Attempt No. " + (NaturalistGame.BOUNTY_MAX - tile.getGame().getBountyLevel()), 171, fontColor.get("gui.mail.lettertext"));
|
||||
newLine();
|
||||
drawSplitLine(getResearchNote(), 171, 46, fontColor.get("gui.mail.lettertext"));
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@ import java.util.Map;
|
||||
import net.minecraft.entity.EntityCreature;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import net.minecraftforge.common.BiomeDictionary;
|
||||
@@ -66,21 +67,21 @@ public class Butterfly extends IndividualLiving implements IButterfly {
|
||||
IAlleleButterflySpecies primary = genome.getPrimary();
|
||||
IAlleleButterflySpecies secondary = genome.getSecondary();
|
||||
if (!isPureBred(EnumButterflyChromosome.SPECIES))
|
||||
list.add("\u00A79" + StringUtil.localize("butterflies.hybrid").replaceAll("%PRIMARY",primary.getName()).replaceAll("%SECONDARY",secondary.getName()));
|
||||
list.add(EnumChatFormatting.BLUE + StringUtil.localize("butterflies.hybrid").replaceAll("%PRIMARY",primary.getName()).replaceAll("%SECONDARY",secondary.getName()));
|
||||
|
||||
if(getMate() != null)
|
||||
list.add("\u00A7c" + StringUtil.localize("gui.fecundated").toUpperCase(Locale.ENGLISH));
|
||||
list.add("\u00A7e" + genome.getActiveAllele(EnumButterflyChromosome.SIZE).getName());
|
||||
list.add("\u00A7f" + genome.getActiveAllele(EnumButterflyChromosome.SPEED).getName() + " " + StringUtil.localize("gui.flyer"));
|
||||
list.add(EnumChatFormatting.RED + StringUtil.localize("gui.fecundated").toUpperCase(Locale.ENGLISH));
|
||||
list.add(EnumChatFormatting.YELLOW + genome.getActiveAllele(EnumButterflyChromosome.SIZE).getName());
|
||||
list.add(EnumChatFormatting.WHITE + genome.getActiveAllele(EnumButterflyChromosome.SPEED).getName() + " " + StringUtil.localize("gui.flyer"));
|
||||
list.add(genome.getActiveAllele(EnumButterflyChromosome.LIFESPAN).getName() + " " + StringUtil.localize("gui.life"));
|
||||
|
||||
IAlleleTolerance tempTolerance = (IAlleleTolerance)getGenome().getActiveAllele(EnumButterflyChromosome.TEMPERATURE_TOLERANCE);
|
||||
list.add("\u00A7aT: " + AlleleManager.climateHelper.toDisplay(genome.getPrimary().getTemperature()) + " / " + tempTolerance.getName());
|
||||
list.add(EnumChatFormatting.GREEN + "T: " + AlleleManager.climateHelper.toDisplay(genome.getPrimary().getTemperature()) + " / " + tempTolerance.getName());
|
||||
|
||||
IAlleleTolerance humidTolerance = (IAlleleTolerance)getGenome().getActiveAllele(EnumButterflyChromosome.TEMPERATURE_TOLERANCE);
|
||||
list.add("\u00A7aH: " + AlleleManager.climateHelper.toDisplay(genome.getPrimary().getHumidity()) + " / " + humidTolerance.getName());
|
||||
list.add(EnumChatFormatting.GREEN + "H: " + AlleleManager.climateHelper.toDisplay(genome.getPrimary().getHumidity()) + " / " + humidTolerance.getName());
|
||||
|
||||
list.add("\u00A7c" + GenericRatings.rateActivityTime(genome.getNocturnal(), genome.getPrimary().isNocturnal()));
|
||||
list.add(EnumChatFormatting.RED + GenericRatings.rateActivityTime(genome.getNocturnal(), genome.getPrimary().isNocturnal()));
|
||||
}
|
||||
|
||||
/* SAVING & LOADING */
|
||||
|
||||
@@ -57,9 +57,7 @@ public class CommandMail extends SubCommand {
|
||||
}
|
||||
|
||||
private String makeTradeListEntry(TradeStationInfo info) {
|
||||
String entry = "\u00A7c";
|
||||
if (info.state == EnumStationState.OK)
|
||||
entry = "\u00A7a";
|
||||
EnumChatFormatting formatting = info.state.isOk() ? EnumChatFormatting.GREEN : EnumChatFormatting.RED;
|
||||
|
||||
String tradegood = "[ ? ]";
|
||||
if (info.tradegood != null)
|
||||
@@ -72,7 +70,7 @@ public class CommandMail extends SubCommand {
|
||||
}
|
||||
}
|
||||
|
||||
return String.format("%s%-12s | %-20s | %s", entry, info.address.getName(), tradegood, demand);
|
||||
return String.format("%s%-12s | %-20s | %s", formatting, info.address.getName(), tradegood, demand);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user