Localized P2P Types.
This commit is contained in:
parent
8460cffd6c
commit
ecd7ea67b6
3 changed files with 26 additions and 9 deletions
|
@ -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;
|
||||
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
||||
|
|
|
@ -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<AEFeature> features;
|
||||
private Class<? extends IPart> myPart;
|
||||
private final EnumSet<AEFeature> features;
|
||||
private final Class<? extends IPart> myPart;
|
||||
private final GuiText extraName;
|
||||
|
||||
PartType(AEFeature part, Class<? extends IPart> c) {
|
||||
this( part, c, null );
|
||||
}
|
||||
|
||||
PartType(AEFeature part, Class<? extends IPart> 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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue