From 52daff9f6728ac82829a4cb00e6d6e7982041efa Mon Sep 17 00:00:00 2001 From: aidancbrady Date: Wed, 6 Jul 2016 17:53:14 -0400 Subject: [PATCH] Better tooltips --- src/main/java/mekanism/common/item/ItemBlockBasic.java | 4 +++- .../java/mekanism/common/item/ItemBlockEnergyCube.java | 1 + src/main/java/mekanism/common/item/ItemBlockGasTank.java | 6 ++++-- src/main/java/mekanism/common/item/ItemBlockMachine.java | 7 ++++++- src/main/java/mekanism/common/item/ItemTierInstaller.java | 5 ++++- 5 files changed, 18 insertions(+), 5 deletions(-) diff --git a/src/main/java/mekanism/common/item/ItemBlockBasic.java b/src/main/java/mekanism/common/item/ItemBlockBasic.java index 1e8ad4229..54fc2903a 100644 --- a/src/main/java/mekanism/common/item/ItemBlockBasic.java +++ b/src/main/java/mekanism/common/item/ItemBlockBasic.java @@ -158,11 +158,13 @@ public class ItemBlockBasic extends ItemBlock implements IEnergizedItem, ITierIt if(inv.getItemCount() > 0) { list.add(EnumColor.BRIGHT_GREEN + inv.getItemType().getDisplayName()); - list.add(EnumColor.INDIGO + LangUtils.localize("tooltip.itemAmount") + ": " + EnumColor.GREY + inv.getItemCount()); + list.add(EnumColor.PURPLE + LangUtils.localize("tooltip.itemAmount") + ": " + EnumColor.GREY + inv.getItemCount()); } else { list.add(EnumColor.DARK_RED + LangUtils.localize("gui.empty")); } + + list.add(EnumColor.INDIGO + LangUtils.localize("tooltip.capacity") + ": " + EnumColor.GREY + BinTier.values()[getBaseTier(itemstack).ordinal()].storage + " " + LangUtils.localize("transmission.Items")); } else if(type == BasicType.INDUCTION_CELL) { diff --git a/src/main/java/mekanism/common/item/ItemBlockEnergyCube.java b/src/main/java/mekanism/common/item/ItemBlockEnergyCube.java index 856673e59..1a1fe7c42 100644 --- a/src/main/java/mekanism/common/item/ItemBlockEnergyCube.java +++ b/src/main/java/mekanism/common/item/ItemBlockEnergyCube.java @@ -64,6 +64,7 @@ public class ItemBlockEnergyCube extends ItemBlock implements IEnergizedItem, IE public void addInformation(ItemStack itemstack, EntityPlayer entityplayer, List list, boolean flag) { list.add(EnumColor.BRIGHT_GREEN + LangUtils.localize("tooltip.storedEnergy") + ": " + EnumColor.GREY + MekanismUtils.getEnergyDisplay(getEnergy(itemstack))); + list.add(EnumColor.INDIGO + LangUtils.localize("tooltip.capacity") + ": " + EnumColor.GREY + MekanismUtils.getEnergyDisplay(getEnergyCubeTier(itemstack).maxEnergy)); if(!MekKeyHandler.getIsKeyPressed(MekanismKeyHandler.sneakKey)) { diff --git a/src/main/java/mekanism/common/item/ItemBlockGasTank.java b/src/main/java/mekanism/common/item/ItemBlockGasTank.java index 6b56cd255..188d7dda5 100644 --- a/src/main/java/mekanism/common/item/ItemBlockGasTank.java +++ b/src/main/java/mekanism/common/item/ItemBlockGasTank.java @@ -122,11 +122,13 @@ public class ItemBlockGasTank extends ItemBlock implements IGasItem, ISustainedI if(gasStack == null) { - list.add(LangUtils.localize("tooltip.noGas") + "."); + list.add(EnumColor.DARK_RED + LangUtils.localize("gui.empty") + "."); } else { - list.add(LangUtils.localize("tooltip.stored") + " " + gasStack.getGas().getLocalizedName() + ": " + gasStack.amount); + list.add(EnumColor.ORANGE + gasStack.getGas().getLocalizedName() + ": " + EnumColor.GREY + gasStack.amount); } + + list.add(EnumColor.INDIGO + LangUtils.localize("tooltip.capacity") + ": " + EnumColor.GREY + GasTankTier.values()[getBaseTier(itemstack).ordinal()].storage); if(!MekKeyHandler.getIsKeyPressed(MekanismKeyHandler.sneakKey)) { diff --git a/src/main/java/mekanism/common/item/ItemBlockMachine.java b/src/main/java/mekanism/common/item/ItemBlockMachine.java index d56d3be51..71d449eb8 100644 --- a/src/main/java/mekanism/common/item/ItemBlockMachine.java +++ b/src/main/java/mekanism/common/item/ItemBlockMachine.java @@ -179,8 +179,13 @@ public class ItemBlockMachine extends ItemBlock implements IEnergizedItem, ISpec if(fluidStack != null) { - list.add(EnumColor.PINK + LangUtils.localizeFluidStack(fluidStack) + ": " + EnumColor.GREY + getFluidStack(itemstack).amount + "mB"); + list.add(EnumColor.AQUA + LangUtils.localizeFluidStack(fluidStack) + ": " + EnumColor.GREY + getFluidStack(itemstack).amount + "mB"); } + else { + list.add(EnumColor.DARK_RED + LangUtils.localize("gui.empty") + "."); + } + + list.add(EnumColor.INDIGO + LangUtils.localize("tooltip.capacity") + ": " + EnumColor.GREY + FluidTankTier.values()[getBaseTier(itemstack).ordinal()].storage + " mB"); } list.add(LangUtils.localize("tooltip.hold") + " " + EnumColor.INDIGO + GameSettings.getKeyDisplayString(MekanismKeyHandler.sneakKey.getKeyCode()) + EnumColor.GREY + " " + LangUtils.localize("tooltip.forDetails") + "."); diff --git a/src/main/java/mekanism/common/item/ItemTierInstaller.java b/src/main/java/mekanism/common/item/ItemTierInstaller.java index 314831659..ced0b503e 100644 --- a/src/main/java/mekanism/common/item/ItemTierInstaller.java +++ b/src/main/java/mekanism/common/item/ItemTierInstaller.java @@ -78,7 +78,10 @@ public class ItemTierInstaller extends ItemMekanism { for(BaseTier tier : BaseTier.values()) { - itemList.add(new ItemStack(item, 1, tier.ordinal())); + if(tier.isObtainable()) + { + itemList.add(new ItemStack(item, 1, tier.ordinal())); + } } }