Greatly improved localization
This commit is contained in:
parent
c875dab552
commit
d7fdc3a243
18 changed files with 150 additions and 64 deletions
|
@ -49,8 +49,8 @@ public class ItemAtomicDisassembler extends ItemEnergized
|
|||
{
|
||||
super.addInformation(itemstack, entityplayer, list, flag);
|
||||
|
||||
list.add("Mode: " + EnumColor.INDIGO + (getMode(itemstack) == 0 ? "normal" : "vein"));
|
||||
list.add("Efficiency: " + EnumColor.INDIGO + getEfficiency(itemstack));
|
||||
list.add(MekanismUtils.localize("tooltip.mode") + ": " + EnumColor.INDIGO + getModeName(itemstack));
|
||||
list.add(MekanismUtils.localize("tooltip.efficiency") + ": " + EnumColor.INDIGO + getEfficiency(itemstack));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -152,7 +152,7 @@ public class ItemAtomicDisassembler extends ItemEnergized
|
|||
if(!world.isRemote && entityplayer.isSneaking())
|
||||
{
|
||||
toggleMode(itemstack);
|
||||
entityplayer.addChatMessage(new ChatComponentText(EnumColor.DARK_BLUE + "[Mekanism] " + EnumColor.GREY + "Mode toggled to " + EnumColor.INDIGO + getModeName(itemstack) + EnumColor.AQUA + " (" + getEfficiency(itemstack) + ")"));
|
||||
entityplayer.addChatMessage(new ChatComponentText(EnumColor.DARK_BLUE + "[Mekanism] " + EnumColor.GREY + MekanismUtils.localize("tooltip.modeToggle") + " " + EnumColor.INDIGO + getModeName(itemstack) + EnumColor.AQUA + " (" + getEfficiency(itemstack) + ")"));
|
||||
}
|
||||
|
||||
return itemstack;
|
||||
|
@ -286,15 +286,15 @@ public class ItemAtomicDisassembler extends ItemEnergized
|
|||
switch(mode)
|
||||
{
|
||||
case 0:
|
||||
return "normal";
|
||||
return MekanismUtils.localize("tooltip.disassembler.normal");
|
||||
case 1:
|
||||
return "slow";
|
||||
return MekanismUtils.localize("tooltip.disassembler.slow");
|
||||
case 2:
|
||||
return "fast";
|
||||
return MekanismUtils.localize("tooltip.disassembler.fast");
|
||||
case 3:
|
||||
return "vein";
|
||||
return MekanismUtils.localize("tooltip.disassembler.vein");
|
||||
case 4:
|
||||
return "off";
|
||||
return MekanismUtils.localize("tooltip.disassembler.off");
|
||||
}
|
||||
|
||||
return null;
|
||||
|
|
|
@ -7,6 +7,8 @@ import mekanism.api.MekanismAPI;
|
|||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.block.BlockCardboardBox.BlockData;
|
||||
import mekanism.common.tile.TileEntityCardboardBox;
|
||||
import mekanism.common.util.LangUtils;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -42,16 +44,16 @@ public class ItemBlockCardboardBox extends ItemBlock
|
|||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer entityplayer, List list, boolean flag)
|
||||
{
|
||||
list.add(EnumColor.INDIGO + "Block data: " + (getBlockData(itemstack) != null ? "Yes" : "No"));
|
||||
list.add(EnumColor.INDIGO + MekanismUtils.localize("tooltip.blockData") + ": " + LangUtils.transYesNo(getBlockData(itemstack) != null));
|
||||
|
||||
if(getBlockData(itemstack) != null)
|
||||
{
|
||||
list.add("Block: " + new ItemStack(getBlockData(itemstack).block, getBlockData(itemstack).meta).getDisplayName());
|
||||
list.add("Metadata: " + getBlockData(itemstack).meta);
|
||||
list.add(MekanismUtils.localize("tooltip.block") + ": " + new ItemStack(getBlockData(itemstack).block, getBlockData(itemstack).meta).getDisplayName());
|
||||
list.add(MekanismUtils.localize("tooltip.meta") + ": " + getBlockData(itemstack).meta);
|
||||
|
||||
if(getBlockData(itemstack).tileTag != null)
|
||||
{
|
||||
list.add("Tile: " + getBlockData(itemstack).tileTag.getString("id"));
|
||||
list.add(MekanismUtils.localize("tooltip.tile") + ": " + getBlockData(itemstack).tileTag.getString("id"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,6 +16,7 @@ import mekanism.common.Tier.EnergyCubeTier;
|
|||
import mekanism.common.integration.IC2ItemManager;
|
||||
import mekanism.common.network.PacketTileEntity;
|
||||
import mekanism.common.tile.TileEntityEnergyCube;
|
||||
import mekanism.common.util.LangUtils;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -53,11 +54,11 @@ public class ItemBlockEnergyCube extends ItemBlock implements IEnergizedItem, IE
|
|||
{
|
||||
if(!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT))
|
||||
{
|
||||
list.add("Hold " + EnumColor.AQUA + "shift" + EnumColor.GREY + " for more details.");
|
||||
list.add(MekanismUtils.localize("tooltip.hold") + " " + EnumColor.AQUA + "shift" + EnumColor.GREY + " " + MekanismUtils.localize("tooltip.forDetails"));
|
||||
}
|
||||
else {
|
||||
list.add(EnumColor.BRIGHT_GREEN + "Stored Energy: " + EnumColor.GREY + MekanismUtils.getEnergyDisplay(getEnergy(itemstack)));
|
||||
list.add(EnumColor.AQUA + "Inventory: " + EnumColor.GREY + (getInventory(itemstack) != null && getInventory(itemstack).tagCount() != 0));
|
||||
list.add(EnumColor.BRIGHT_GREEN + MekanismUtils.localize("tooltip.storedEnergy") + ": " + EnumColor.GREY + MekanismUtils.getEnergyDisplay(getEnergy(itemstack)));
|
||||
list.add(EnumColor.AQUA + MekanismUtils.localize("tooltip.inventory") + ": " + EnumColor.GREY + LangUtils.transYesNo(getInventory(itemstack) != null && getInventory(itemstack).tagCount() != 0));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -10,6 +10,8 @@ import mekanism.api.gas.IGasItem;
|
|||
import mekanism.common.ISustainedInventory;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.tile.TileEntityGasTank;
|
||||
import mekanism.common.util.LangUtils;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -86,18 +88,18 @@ public class ItemBlockGasTank extends ItemBlock implements IGasItem, ISustainedI
|
|||
|
||||
if(gasStack == null)
|
||||
{
|
||||
list.add("No gas stored.");
|
||||
list.add(MekanismUtils.localize("tooltip.noGas") + ".");
|
||||
}
|
||||
else {
|
||||
list.add("Stored " + gasStack.getGas().getLocalizedName() + ": " + gasStack.amount);
|
||||
list.add(MekanismUtils.localize("tooltip.stored") + " " + gasStack.getGas().getLocalizedName() + ": " + gasStack.amount);
|
||||
}
|
||||
|
||||
if(!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT))
|
||||
{
|
||||
list.add("Hold " + EnumColor.AQUA + "shift" + EnumColor.GREY + " for more details.");
|
||||
list.add(MekanismUtils.localize("tooltip.hold") + " " + EnumColor.AQUA + "shift" + EnumColor.GREY + " " + MekanismUtils.localize("tooltip.forDetails"));
|
||||
}
|
||||
else {
|
||||
list.add(EnumColor.AQUA + "Inventory: " + EnumColor.GREY + (getInventory(itemstack) != null && getInventory(itemstack).tagCount() != 0));
|
||||
list.add(EnumColor.AQUA + MekanismUtils.localize("tooltip.inventory") + ": " + EnumColor.GREY + LangUtils.transYesNo(getInventory(itemstack) != null && getInventory(itemstack).tagCount() != 0));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -36,6 +36,7 @@ import mekanism.common.tile.TileEntityFactory;
|
|||
import mekanism.common.tile.TileEntityLogisticalSorter;
|
||||
import mekanism.common.tile.TileEntityRotaryCondensentrator;
|
||||
import mekanism.common.transporter.TransporterFilter;
|
||||
import mekanism.common.util.LangUtils;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.TransporterUtils;
|
||||
import net.minecraft.block.Block;
|
||||
|
@ -131,7 +132,7 @@ public class ItemBlockMachine extends ItemBlock implements IEnergizedItem, ISpec
|
|||
list.add(MekanismUtils.localize("tooltip.hold") + " " + EnumColor.INDIGO + "shift" + EnumColor.GREY + " " + MekanismUtils.localize("tooltip.forDetails") + ".");
|
||||
list.add(MekanismUtils.localize("tooltip.hold") + " " + EnumColor.AQUA + "shift" + EnumColor.GREY + " and " + EnumColor.AQUA + Keyboard.getKeyName(MekanismKeyHandler.modeSwitchKey.getKeyCode()) + EnumColor.GREY + " " + MekanismUtils.localize("tooltip.forDesc") + ".");
|
||||
}
|
||||
else if(!Keyboard.isKeyDown(Keyboard.KEY_M))
|
||||
else if(!Keyboard.isKeyDown(MekanismKeyHandler.modeSwitchKey.getKeyCode()))
|
||||
{
|
||||
if(type == MachineType.BASIC_FACTORY || type == MachineType.ADVANCED_FACTORY || type == MachineType.ELITE_FACTORY)
|
||||
{
|
||||
|
@ -140,8 +141,8 @@ public class ItemBlockMachine extends ItemBlock implements IEnergizedItem, ISpec
|
|||
|
||||
if(type == MachineType.ELECTRIC_CHEST)
|
||||
{
|
||||
list.add(EnumColor.INDIGO + MekanismUtils.localize("tooltip.auth") + ": " + EnumColor.GREY + getAuthenticated(itemstack));
|
||||
list.add(EnumColor.INDIGO + MekanismUtils.localize("tooltip.locked") + ": " + EnumColor.GREY + getLocked(itemstack));
|
||||
list.add(EnumColor.INDIGO + MekanismUtils.localize("tooltip.auth") + ": " + EnumColor.GREY + LangUtils.transYesNo(getAuthenticated(itemstack)));
|
||||
list.add(EnumColor.INDIGO + MekanismUtils.localize("tooltip.locked") + ": " + EnumColor.GREY + LangUtils.transYesNo(getLocked(itemstack)));
|
||||
}
|
||||
|
||||
if(type != MachineType.LOGISTICAL_SORTER)
|
||||
|
@ -165,7 +166,7 @@ public class ItemBlockMachine extends ItemBlock implements IEnergizedItem, ISpec
|
|||
|
||||
if(type != MachineType.CHARGEPAD && type != MachineType.LOGISTICAL_SORTER)
|
||||
{
|
||||
list.add(EnumColor.AQUA + MekanismUtils.localize("tooltip.inventory") + ": " + EnumColor.GREY + (getInventory(itemstack) != null && getInventory(itemstack).tagCount() != 0));
|
||||
list.add(EnumColor.AQUA + MekanismUtils.localize("tooltip.inventory") + ": " + EnumColor.GREY + LangUtils.transYesNo(getInventory(itemstack) != null && getInventory(itemstack).tagCount() != 0));
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -35,7 +35,7 @@ public class ItemDictionary extends ItemMekanism
|
|||
|
||||
if(!names.isEmpty())
|
||||
{
|
||||
player.addChatMessage(new ChatComponentText(EnumColor.DARK_BLUE + "[Mekanism]" + EnumColor.GREY + " Key(s) found:"));
|
||||
player.addChatMessage(new ChatComponentText(EnumColor.DARK_BLUE + "[Mekanism]" + EnumColor.GREY + " " + MekanismUtils.localize("tooltip.keysFound") + ":"));
|
||||
|
||||
for(String name : names)
|
||||
{
|
||||
|
@ -43,7 +43,7 @@ public class ItemDictionary extends ItemMekanism
|
|||
}
|
||||
}
|
||||
else {
|
||||
player.addChatMessage(new ChatComponentText(EnumColor.DARK_BLUE + "[Mekanism]" + EnumColor.GREY + " No key."));
|
||||
player.addChatMessage(new ChatComponentText(EnumColor.DARK_BLUE + "[Mekanism]" + EnumColor.GREY + " " + MekanismUtils.localize("tooltip.noKey") + "."));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ package mekanism.common.item;
|
|||
import java.util.List;
|
||||
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.common.util.LangUtils;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
|
@ -25,7 +26,8 @@ public class ItemElectricBow extends ItemEnergized
|
|||
public void addInformation(ItemStack itemstack, EntityPlayer entityplayer, List list, boolean flag)
|
||||
{
|
||||
super.addInformation(itemstack, entityplayer, list, flag);
|
||||
list.add(EnumColor.PINK + MekanismUtils.localize("tooltip.fireMode") + ": " + EnumColor.GREY + (getFireState(itemstack) ? "ON" : "OFF"));
|
||||
|
||||
list.add(EnumColor.PINK + MekanismUtils.localize("tooltip.fireMode") + ": " + EnumColor.GREY + LangUtils.transOnOff(getFireState(itemstack)));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -74,7 +74,7 @@ public class ItemFreeRunners extends ItemArmor implements IEnergizedItem, ISpeci
|
|||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer entityplayer, List list, boolean flag)
|
||||
{
|
||||
list.add(EnumColor.AQUA + "Stored Energy: " + EnumColor.GREY + MekanismUtils.getEnergyDisplay(getEnergy(itemstack)));
|
||||
list.add(EnumColor.AQUA + MekanismUtils.localize("tooltip.storedEnergy") + ": " + EnumColor.GREY + MekanismUtils.getEnergyDisplay(getEnergy(itemstack)));
|
||||
}
|
||||
|
||||
public ItemStack getUnchargedItem()
|
||||
|
|
|
@ -51,13 +51,13 @@ public class ItemJetpack extends ItemArmor implements IGasItem, ISpecialArmor
|
|||
|
||||
if(gasStack == null)
|
||||
{
|
||||
list.add("No gas stored.");
|
||||
list.add(MekanismUtils.localize("tooltip.noGas") + ".");
|
||||
}
|
||||
else {
|
||||
list.add("Stored " + gasStack.getGas().getLocalizedName() + ": " + gasStack.amount);
|
||||
list.add(MekanismUtils.localize("tooltip.stored") + " " + gasStack.getGas().getLocalizedName() + ": " + gasStack.amount);
|
||||
}
|
||||
|
||||
list.add(EnumColor.GREY + "Mode: " + EnumColor.GREY + getMode(itemstack).getName());
|
||||
list.add(EnumColor.GREY + MekanismUtils.localize("tooltip.mode") + ": " + EnumColor.GREY + getMode(itemstack).getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -7,6 +7,7 @@ import mekanism.api.EnumColor;
|
|||
import mekanism.common.ISustainedInventory;
|
||||
import mekanism.common.entity.EntityRobit;
|
||||
import mekanism.common.tile.TileEntityChargepad;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -34,8 +35,8 @@ public class ItemRobit extends ItemEnergized implements ISustainedInventory
|
|||
{
|
||||
super.addInformation(itemstack, entityplayer, list, flag);
|
||||
|
||||
list.add(EnumColor.INDIGO + "Name: " + EnumColor.GREY + getName(itemstack));
|
||||
list.add(EnumColor.AQUA + "Inventory: " + EnumColor.GREY + (getInventory(itemstack) != null && getInventory(itemstack).tagCount() != 0));
|
||||
list.add(EnumColor.INDIGO + MekanismUtils.localize("tooltip.name") + ": " + EnumColor.GREY + getName(itemstack));
|
||||
list.add(EnumColor.AQUA + MekanismUtils.localize("tooltip.inventory") + ": " + EnumColor.GREY + (getInventory(itemstack) != null && getInventory(itemstack).tagCount() != 0));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -10,6 +10,7 @@ import mekanism.api.gas.IGasItem;
|
|||
import mekanism.client.render.ModelCustomArmor;
|
||||
import mekanism.client.render.ModelCustomArmor.ArmorModel;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import net.minecraft.client.model.ModelBiped;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
|
@ -44,13 +45,13 @@ public class ItemScubaTank extends ItemArmor implements IGasItem
|
|||
|
||||
if(gasStack == null)
|
||||
{
|
||||
list.add("No gas stored.");
|
||||
list.add(MekanismUtils.localize("tooltip.noGas") + ".");
|
||||
}
|
||||
else {
|
||||
list.add("Stored " + gasStack.getGas().getLocalizedName() + ": " + gasStack.amount);
|
||||
list.add(MekanismUtils.localize("tooltip.stored") + " " + gasStack.getGas().getLocalizedName() + ": " + gasStack.amount);
|
||||
}
|
||||
|
||||
list.add(EnumColor.GREY + "Flowing: " + (getFlowing(itemstack) ? EnumColor.DARK_GREEN : EnumColor.DARK_RED) + getFlowing(itemstack));
|
||||
list.add(EnumColor.GREY + MekanismUtils.localize("tooltip.flowing") + ": " + (getFlowing(itemstack) ? EnumColor.DARK_GREEN : EnumColor.DARK_RED) + getFlowingStr(itemstack));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -145,6 +146,13 @@ public class ItemScubaTank extends ItemArmor implements IGasItem
|
|||
|
||||
return stack.stackTagCompound.getBoolean("flowing");
|
||||
}
|
||||
|
||||
public String getFlowingStr(ItemStack stack)
|
||||
{
|
||||
boolean flowing = getFlowing(stack);
|
||||
|
||||
return MekanismUtils.localize("tooltip." + (flowing ? "yes" : "no"));
|
||||
}
|
||||
|
||||
public void setFlowing(ItemStack stack, boolean flowing)
|
||||
{
|
||||
|
|
|
@ -3,6 +3,7 @@ package mekanism.common.item;
|
|||
import java.util.List;
|
||||
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -25,8 +26,8 @@ public class ItemWalkieTalkie extends ItemMekanism
|
|||
{
|
||||
super.addInformation(itemstack, entityplayer, list, flag);
|
||||
|
||||
list.add(getOn(itemstack) ? EnumColor.DARK_GREEN + "On" : EnumColor.DARK_RED + "Off");
|
||||
list.add(EnumColor.DARK_AQUA + "Channel: " + EnumColor.GREY + getChannel(itemstack));
|
||||
list.add((getOn(itemstack) ? EnumColor.DARK_GREEN : EnumColor.DARK_RED) + MekanismUtils.localize("gui." + (getOn(itemstack) ? "on" : "off")));
|
||||
list.add(EnumColor.DARK_AQUA + MekanismUtils.localize("tooltip.channel") + ": " + EnumColor.GREY + getChannel(itemstack));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -89,23 +89,23 @@ public class ItemPartTransmitter extends JItemMultiPart
|
|||
{
|
||||
if(TransmitterType.values()[itemstack.getItemDamage()].getTransmission() == TransmissionType.ENERGY)
|
||||
{
|
||||
list.add(EnumColor.INDIGO + "Capacity: " + EnumColor.GREY + MekanismUtils.getEnergyDisplay(Tier.CableTier.values()[itemstack.getItemDamage()].cableCapacity) + "/t");
|
||||
list.add(EnumColor.INDIGO + MekanismUtils.localize("tooltip.capacity") + ": " + EnumColor.GREY + MekanismUtils.getEnergyDisplay(Tier.CableTier.values()[itemstack.getItemDamage()].cableCapacity) + "/t");
|
||||
}
|
||||
|
||||
if(TransmitterType.values()[itemstack.getItemDamage()].getTransmission() == TransmissionType.FLUID)
|
||||
{
|
||||
list.add(EnumColor.INDIGO + "Capacity: " + EnumColor.GREY + Tier.PipeTier.getTierFromMeta(itemstack.getItemDamage()).pipeCapacity + "mB/t");
|
||||
list.add(EnumColor.INDIGO + "Pump Rate: " + EnumColor.GREY + Tier.PipeTier.getTierFromMeta(itemstack.getItemDamage()).pipePullAmount + "mB/t");
|
||||
list.add(EnumColor.INDIGO + MekanismUtils.localize("tooltip.capacity") + ": " + EnumColor.GREY + Tier.PipeTier.getTierFromMeta(itemstack.getItemDamage()).pipeCapacity + "mB/t");
|
||||
list.add(EnumColor.INDIGO + MekanismUtils.localize("tooltip.pumpRate") + ": " + EnumColor.GREY + Tier.PipeTier.getTierFromMeta(itemstack.getItemDamage()).pipePullAmount + "mB/t");
|
||||
}
|
||||
|
||||
list.add("Hold " + EnumColor.AQUA + "shift" + EnumColor.GREY + " for details.");
|
||||
list.add(MekanismUtils.localize("tooltip.hold") + " " + EnumColor.AQUA + "shift" + EnumColor.GREY + " " + MekanismUtils.localize("tooltip.forDetails"));
|
||||
}
|
||||
else {
|
||||
switch(itemstack.getItemDamage())
|
||||
{
|
||||
case 0: case 1: case 2: case 3:
|
||||
{
|
||||
list.add(EnumColor.DARK_GREY + "Capable of transferring:");
|
||||
list.add(EnumColor.DARK_GREY + MekanismUtils.localize("tooltip.capableTrans") + ":");
|
||||
list.add("- " + EnumColor.PURPLE + "RF " + EnumColor.GREY + "(ThermalExpansion)");
|
||||
list.add("- " + EnumColor.PURPLE + "EU " + EnumColor.GREY + "(IndustrialCraft)");
|
||||
list.add("- " + EnumColor.PURPLE + "MJ " + EnumColor.GREY + "(BuildCraft)");
|
||||
|
@ -114,38 +114,37 @@ public class ItemPartTransmitter extends JItemMultiPart
|
|||
}
|
||||
case 4: case 5: case 6: case 7:
|
||||
{
|
||||
list.add(EnumColor.DARK_GREY + "Capable of transferring:");
|
||||
list.add("- " + EnumColor.PURPLE + "mB " + EnumColor.GREY + "(FluidRegistry)");
|
||||
list.add(EnumColor.DARK_GREY + MekanismUtils.localize("tooltip.capableTrans") + ":");
|
||||
list.add("- " + EnumColor.PURPLE + MekanismUtils.localize("tooltip.fluids") + " " + EnumColor.GREY + "(MinecraftForge)");
|
||||
break;
|
||||
}
|
||||
case 8:
|
||||
{
|
||||
list.add(EnumColor.DARK_GREY + "Capable of transferring:");
|
||||
list.add("- " + EnumColor.PURPLE + "O " + EnumColor.GREY + "(Oxygen)");
|
||||
list.add("- " + EnumColor.PURPLE + "H " + EnumColor.GREY + "(Hydrogen)");
|
||||
list.add(EnumColor.DARK_GREY + MekanismUtils.localize("tooltip.capableTrans") + ":");
|
||||
list.add("- " + EnumColor.PURPLE + MekanismUtils.localize("tooltip.gasses") + " (Mekanism)");
|
||||
break;
|
||||
}
|
||||
case 9:
|
||||
{
|
||||
list.add(EnumColor.DARK_GREY + "Capable of transferring:");
|
||||
list.add("- " + EnumColor.PURPLE + "Items (universal)");
|
||||
list.add("- " + EnumColor.PURPLE + "Blocks (universal)");
|
||||
list.add(EnumColor.DARK_GREY + MekanismUtils.localize("tooltip.capableTrans") + ":");
|
||||
list.add("- " + EnumColor.PURPLE + MekanismUtils.localize("tooltip.items") + " (" + MekanismUtils.localize("tooltip.universal") + ")");
|
||||
list.add("- " + EnumColor.PURPLE + MekanismUtils.localize("tooltip.blocks") + " (" + MekanismUtils.localize("tooltip.universal") + ")");
|
||||
break;
|
||||
}
|
||||
case 10:
|
||||
{
|
||||
list.add(EnumColor.DARK_GREY + "Capable of transferring:");
|
||||
list.add("- " + EnumColor.PURPLE + "Items (universal)");
|
||||
list.add("- " + EnumColor.PURPLE + "Blocks (universal)");
|
||||
list.add("- " + EnumColor.DARK_RED + "Only used if no other paths available");
|
||||
list.add(EnumColor.DARK_GREY + MekanismUtils.localize("tooltip.capableTrans") + ":");
|
||||
list.add("- " + EnumColor.PURPLE + MekanismUtils.localize("tooltip.items") + " (" + MekanismUtils.localize("tooltip.universal") + ")");
|
||||
list.add("- " + EnumColor.PURPLE + MekanismUtils.localize("tooltip.blocks") + " (" + MekanismUtils.localize("tooltip.universal") + ")");
|
||||
list.add("- " + EnumColor.DARK_RED + MekanismUtils.localize("tooltip.restrictiveDesc"));
|
||||
break;
|
||||
}
|
||||
case 11:
|
||||
{
|
||||
list.add(EnumColor.DARK_GREY + "Capable of transferring:");
|
||||
list.add("- " + EnumColor.PURPLE + "Items (universal)");
|
||||
list.add("- " + EnumColor.PURPLE + "Blocks (universal)");
|
||||
list.add("- " + EnumColor.DARK_RED + "Controllable by redstone");
|
||||
list.add(EnumColor.DARK_GREY + MekanismUtils.localize("tooltip.capableTrans") + ":");
|
||||
list.add("- " + EnumColor.PURPLE + MekanismUtils.localize("tooltip.items") + " (" + MekanismUtils.localize("tooltip.universal") + ")");
|
||||
list.add("- " + EnumColor.PURPLE + MekanismUtils.localize("tooltip.blocks") + " (" + MekanismUtils.localize("tooltip.universal") + ")");
|
||||
list.add("- " + EnumColor.DARK_RED + MekanismUtils.localize("tooltip.diversionDesc"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
14
src/main/java/mekanism/common/util/LangUtils.java
Normal file
14
src/main/java/mekanism/common/util/LangUtils.java
Normal file
|
@ -0,0 +1,14 @@
|
|||
package mekanism.common.util;
|
||||
|
||||
public final class LangUtils
|
||||
{
|
||||
public static String transOnOff(boolean b)
|
||||
{
|
||||
return MekanismUtils.localize("gui." + (b ? "on" : "off"));
|
||||
}
|
||||
|
||||
public static String transYesNo(boolean b)
|
||||
{
|
||||
return MekanismUtils.localize("tooltip." + (b ? "yes" : "no"));
|
||||
}
|
||||
}
|
|
@ -51,9 +51,6 @@ public class MekanismGenerators implements IModule
|
|||
//Blocks
|
||||
public static Block Generator;
|
||||
|
||||
//Block IDs
|
||||
public static int generatorID;
|
||||
|
||||
//Generation Configuration
|
||||
public static double advancedSolarGeneration;
|
||||
public static double bioGeneration;
|
||||
|
|
|
@ -566,6 +566,16 @@ public class BlockGenerator extends BlockContainer implements ISpecialBounds
|
|||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public String getDescription()
|
||||
{
|
||||
return MekanismUtils.localize("tooltip." + name);
|
||||
}
|
||||
|
||||
public ItemStack getStack()
|
||||
{
|
||||
return new ItemStack(MekanismGenerators.Generator, 1, meta);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
|
|
|
@ -7,11 +7,13 @@ import java.util.List;
|
|||
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.api.energy.IEnergizedItem;
|
||||
import mekanism.client.MekanismKeyHandler;
|
||||
import mekanism.common.ISustainedInventory;
|
||||
import mekanism.common.ISustainedTank;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.integration.IC2ItemManager;
|
||||
import mekanism.common.tile.TileEntityElectricBlock;
|
||||
import mekanism.common.util.LangUtils;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.generators.common.block.BlockGenerator.GeneratorType;
|
||||
import net.minecraft.block.Block;
|
||||
|
@ -82,11 +84,15 @@ public class ItemBlockGenerator extends ItemBlock implements IEnergizedItem, ISp
|
|||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer entityplayer, List list, boolean flag)
|
||||
{
|
||||
GeneratorType type = GeneratorType.getFromMetadata(itemstack.getItemDamage());
|
||||
|
||||
if(!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT))
|
||||
{
|
||||
list.add(MekanismUtils.localize("tooltip.hold") + " " + EnumColor.AQUA + "shift" + EnumColor.GREY + " " + MekanismUtils.localize("tooltip.forDetails"));
|
||||
list.add(MekanismUtils.localize("tooltip.hold") + " " + EnumColor.INDIGO + "shift" + EnumColor.GREY + " " + MekanismUtils.localize("tooltip.forDetails") + ".");
|
||||
list.add(MekanismUtils.localize("tooltip.hold") + " " + EnumColor.AQUA + "shift" + EnumColor.GREY + " and " + EnumColor.AQUA + Keyboard.getKeyName(MekanismKeyHandler.modeSwitchKey.getKeyCode()) + EnumColor.GREY + " " + MekanismUtils.localize("tooltip.forDesc") + ".");
|
||||
}
|
||||
else {
|
||||
else if(!Keyboard.isKeyDown(MekanismKeyHandler.modeSwitchKey.getKeyCode()))
|
||||
{
|
||||
list.add(EnumColor.BRIGHT_GREEN + MekanismUtils.localize("tooltip.storedEnergy") + ": " + EnumColor.GREY + MekanismUtils.getEnergyDisplay(getEnergy(itemstack)));
|
||||
|
||||
if(hasTank(itemstack))
|
||||
|
@ -97,7 +103,10 @@ public class ItemBlockGenerator extends ItemBlock implements IEnergizedItem, ISp
|
|||
}
|
||||
}
|
||||
|
||||
list.add(EnumColor.AQUA + MekanismUtils.localize("tooltip.inventory") + ": " + EnumColor.GREY + (getInventory(itemstack) != null && getInventory(itemstack).tagCount() != 0));
|
||||
list.add(EnumColor.AQUA + MekanismUtils.localize("tooltip.inventory") + ": " + EnumColor.GREY + LangUtils.transYesNo(getInventory(itemstack) != null && getInventory(itemstack).tagCount() != 0));
|
||||
}
|
||||
else {
|
||||
list.addAll(MekanismUtils.splitLines(type.getDescription()));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -418,6 +418,38 @@ tooltip.hold=Hold
|
|||
tooltip.forDesc=for a description
|
||||
tooltip.forDetails=for details
|
||||
tooltip.fireMode=Fire Mode
|
||||
tooltip.capacity=Capacity
|
||||
tooltip.pumpRate=Pump Rate
|
||||
tooltip.items=Items
|
||||
tooltip.blocks=Blocks
|
||||
tooltip.universal=universal
|
||||
tooltip.fluids=Fluids
|
||||
tooltip.gasses=Gasses
|
||||
tooltip.capableTrans=Capable of transferring
|
||||
tooltip.restrictiveDesc=Only used if no other paths available
|
||||
tooltip.diversionDesc=Controllable by redstone
|
||||
tooltip.noGas=No gas stored
|
||||
tooltip.stored=Stored
|
||||
tooltip.channel=Channel
|
||||
tooltip.mode=Mode
|
||||
tooltip.efficiency=Efficiency
|
||||
tooltip.modeToggle=Mode toggled to
|
||||
tooltip.flowing=Flowing
|
||||
tooltip.yes=yes
|
||||
tooltip.no=no
|
||||
tooltip.name=Name
|
||||
tooltip.blockData=Block data
|
||||
tooltip.block=Block
|
||||
tooltip.meta=Metadata
|
||||
tooltip.tile=Tile
|
||||
tooltip.keysFound=Key(s) found
|
||||
tooltip.noKey=No key
|
||||
|
||||
tooltip.disassembler.normal=normal
|
||||
tooltip.disassembler.slow=slow
|
||||
tooltip.disassembler.fast=fast
|
||||
tooltip.disassembler.vein=vein
|
||||
tooltip.disassembler.off=off
|
||||
|
||||
tooltip.filterCard.got=Retrieved filter data from %s
|
||||
tooltip.filterCard.set=Injected filter data of type %s
|
||||
|
@ -459,6 +491,13 @@ tooltip.ChemicalWasher=An ultimate machine that cleans unprocessed !nslurry and
|
|||
tooltip.ChemicalCrystallizer=An ultimate machine used to crystallize !npurified ore slurry into ore crystals.
|
||||
tooltip.SeismicVibrator=A machine that uses seismic vibrations to !nprovide information on differing layers !of the world.
|
||||
|
||||
tooltip.HeatGenerator=A generator that uses the heat of lava or !nother burnable resources to produce energy.
|
||||
tooltip.SolarGenerator=A generator that uses the the power of the !nsun to produce energy.
|
||||
tooltip.HydrogenGenerator=A generator that harnesses the molecular !npower of hydrogen to produce energy.
|
||||
tooltip.BioGenerator=A generator that burns organic materials of !nthe world to produce energy.
|
||||
tooltip.AdvancedSolarGenerator=An advanced generator that directly !nabsorbs the sun's rays with little loss !nto produce energy.
|
||||
tooltip.WindTurbine=A generator that uses the strength of the wind !n to produce energy, with greater efficiency !nat higher levels.
|
||||
|
||||
tooltip.OsmiumOre=A strong mineral that can be found !nat nearly any height in the world. !nIt is known to have many uses in !nthe construction of machinery.
|
||||
tooltip.CopperOre=A common, conductive material that !ncan be used in the production of !nwires. Its ability to withstand !nhigh heats also makes it essential !nto advanced machinery.
|
||||
tooltip.TinOre=A lightweight, yet sturdy, conductive !nmaterial that is found slightly less !ncommonly than Copper.
|
||||
|
|
Loading…
Reference in a new issue