diff --git a/core/localization/GuiText.java b/core/localization/GuiText.java index 149434a81..6af02be14 100644 --- a/core/localization/GuiText.java +++ b/core/localization/GuiText.java @@ -19,7 +19,9 @@ public enum GuiText NetworkTool, PowerUsageRate, PowerInputRate, Installed, EnergyDrain, - StorageBus, Priority, Security, Encoded, Blank, Unlinked, Linked; + StorageBus, Priority, Security, Encoded, Blank, Unlinked, Linked, + + METunnel, ItemTunnel, RedstoneTunnel, MJTunnel, EUTunnel, FluidTunnel; String root; diff --git a/items/parts/ItemPart.java b/items/parts/ItemPart.java index d7826c575..68ccae936 100644 --- a/items/parts/ItemPart.java +++ b/items/parts/ItemPart.java @@ -138,6 +138,9 @@ public class ItemPart extends AEBaseItem implements IPartItem, IItemGroup if ( varients != null ) return super.getItemDisplayName( is ) + " - " + varients[dmgToPart.get( is.getItemDamage() ).varient].toString(); + if ( pt.getExtraName() != null ) + return super.getItemDisplayName( is ) + " - " + pt.getExtraName().getLocal(); + return super.getItemDisplayName( is ); } diff --git a/items/parts/PartType.java b/items/parts/PartType.java index b6e9a8b79..7608edada 100644 --- a/items/parts/PartType.java +++ b/items/parts/PartType.java @@ -5,6 +5,7 @@ import java.util.EnumSet; import appeng.api.parts.IPart; import appeng.api.util.AEColor; import appeng.core.features.AEFeature; +import appeng.core.localization.GuiText; import appeng.parts.automation.PartAnnihilationPlane; import appeng.parts.automation.PartExportBus; import appeng.parts.automation.PartFormationPlane; @@ -68,17 +69,17 @@ public enum PartType FormationPlane(AEFeature.FormationPlane, PartFormationPlane.class), - P2PTunnelME(AEFeature.P2PTunnelME, PartP2PTunnelME.class), + P2PTunnelME(AEFeature.P2PTunnelME, PartP2PTunnelME.class, GuiText.METunnel), - P2PTunnelRedstone(AEFeature.P2PTunnelRedstone, PartP2PRedstone.class), + P2PTunnelRedstone(AEFeature.P2PTunnelRedstone, PartP2PRedstone.class, GuiText.RedstoneTunnel), - P2PTunnelItems(AEFeature.P2PTunnelItems, PartP2PItems.class), + P2PTunnelItems(AEFeature.P2PTunnelItems, PartP2PItems.class, GuiText.ItemTunnel), - P2PTunnelLiquids(AEFeature.P2PTunnelLiquids, PartP2PLiquids.class), + P2PTunnelLiquids(AEFeature.P2PTunnelLiquids, PartP2PLiquids.class, GuiText.FluidTunnel), - P2PTunnelMJ(AEFeature.P2PTunnelMJ, PartP2PBCPower.class), + P2PTunnelMJ(AEFeature.P2PTunnelMJ, PartP2PBCPower.class, GuiText.MJTunnel), - P2PTunnelEU(AEFeature.P2PTunnelEU, PartP2PIC2Power.class), + P2PTunnelEU(AEFeature.P2PTunnelEU, PartP2PIC2Power.class, GuiText.EUTunnel), CraftingMonitor(AEFeature.Crafting, PartCraftingMonitor.class), @@ -94,12 +95,18 @@ public enum PartType Interface(AEFeature.Core, PartInterface.class); - private EnumSet features; - private Class myPart; + private final EnumSet features; + private final Class myPart; + private final GuiText extraName; PartType(AEFeature part, Class c) { + this( part, c, null ); + } + + PartType(AEFeature part, Class c, GuiText en) { features = EnumSet.of( part ); myPart = c; + extraName = en; } public Enum[] getVarients() @@ -117,4 +124,9 @@ public enum PartType return myPart; } + public GuiText getExtraName() + { + return extraName; + } + }