2013-12-27 23:59:59 +01:00
|
|
|
package appeng.items.parts;
|
|
|
|
|
|
|
|
import java.util.EnumSet;
|
|
|
|
|
|
|
|
import appeng.api.parts.IPart;
|
2014-01-03 19:30:08 +01:00
|
|
|
import appeng.api.util.AEColor;
|
2013-12-27 23:59:59 +01:00
|
|
|
import appeng.core.features.AEFeature;
|
2014-01-31 18:32:30 +01:00
|
|
|
import appeng.core.localization.GuiText;
|
2014-02-14 05:27:15 +01:00
|
|
|
import appeng.parts.automation.PartAnnihilationPlane;
|
2013-12-27 23:59:59 +01:00
|
|
|
import appeng.parts.automation.PartExportBus;
|
2014-02-18 06:51:31 +01:00
|
|
|
import appeng.parts.automation.PartFormationPlane;
|
2013-12-27 23:59:59 +01:00
|
|
|
import appeng.parts.automation.PartImportBus;
|
|
|
|
import appeng.parts.automation.PartLevelEmitter;
|
|
|
|
import appeng.parts.misc.PartCableAnchor;
|
2014-01-03 19:30:08 +01:00
|
|
|
import appeng.parts.misc.PartInterface;
|
2013-12-27 23:59:59 +01:00
|
|
|
import appeng.parts.misc.PartInvertedToggleBus;
|
|
|
|
import appeng.parts.misc.PartStorageBus;
|
|
|
|
import appeng.parts.misc.PartToggleBus;
|
|
|
|
import appeng.parts.networking.PartCableCovered;
|
|
|
|
import appeng.parts.networking.PartCableGlass;
|
|
|
|
import appeng.parts.networking.PartCableSmart;
|
2014-01-20 17:41:37 +01:00
|
|
|
import appeng.parts.networking.PartDenseCable;
|
2013-12-27 23:59:59 +01:00
|
|
|
import appeng.parts.networking.PartQuartzFiber;
|
2014-02-18 04:41:19 +01:00
|
|
|
import appeng.parts.p2p.PartP2PBCPower;
|
2014-02-23 23:50:53 +01:00
|
|
|
import appeng.parts.p2p.PartP2PIC2Power;
|
2014-01-20 17:41:37 +01:00
|
|
|
import appeng.parts.p2p.PartP2PItems;
|
2014-07-15 09:25:03 +02:00
|
|
|
import appeng.parts.p2p.PartP2PLight;
|
2014-01-20 17:41:37 +01:00
|
|
|
import appeng.parts.p2p.PartP2PLiquids;
|
2014-05-02 07:00:14 +02:00
|
|
|
import appeng.parts.p2p.PartP2PRFPower;
|
2014-01-20 17:41:37 +01:00
|
|
|
import appeng.parts.p2p.PartP2PRedstone;
|
|
|
|
import appeng.parts.p2p.PartP2PTunnelME;
|
2013-12-27 23:59:59 +01:00
|
|
|
import appeng.parts.reporting.PartConversionMonitor;
|
|
|
|
import appeng.parts.reporting.PartCraftingTerminal;
|
|
|
|
import appeng.parts.reporting.PartDarkMonitor;
|
2014-07-08 05:48:21 +02:00
|
|
|
import appeng.parts.reporting.PartInterfaceTerminal;
|
2013-12-27 23:59:59 +01:00
|
|
|
import appeng.parts.reporting.PartMonitor;
|
|
|
|
import appeng.parts.reporting.PartPatternTerminal;
|
|
|
|
import appeng.parts.reporting.PartSemiDarkMonitor;
|
|
|
|
import appeng.parts.reporting.PartStorageMonitor;
|
|
|
|
import appeng.parts.reporting.PartTerminal;
|
|
|
|
|
|
|
|
public enum PartType
|
|
|
|
{
|
2014-06-04 07:07:36 +02:00
|
|
|
InvalidType(-1, AEFeature.Core, null),
|
|
|
|
|
2014-05-06 07:16:29 +02:00
|
|
|
CableGlass(0, AEFeature.Core, PartCableGlass.class),
|
2013-12-27 23:59:59 +01:00
|
|
|
|
2014-05-06 07:16:29 +02:00
|
|
|
CableCovered(20, AEFeature.Core, PartCableCovered.class),
|
2013-12-27 23:59:59 +01:00
|
|
|
|
2014-05-06 07:16:29 +02:00
|
|
|
CableSmart(40, AEFeature.Core, PartCableSmart.class),
|
2013-12-27 23:59:59 +01:00
|
|
|
|
2014-05-06 07:16:29 +02:00
|
|
|
CableDense(60, AEFeature.DenseCables, PartDenseCable.class),
|
2014-01-20 17:41:37 +01:00
|
|
|
|
2014-05-06 07:16:29 +02:00
|
|
|
ToggleBus(80, AEFeature.Core, PartToggleBus.class),
|
2013-12-27 23:59:59 +01:00
|
|
|
|
2014-05-06 07:16:29 +02:00
|
|
|
InvertedToggleBus(100, AEFeature.Core, PartInvertedToggleBus.class),
|
2013-12-27 23:59:59 +01:00
|
|
|
|
2014-05-06 07:16:29 +02:00
|
|
|
CableAnchor(120, AEFeature.Core, PartCableAnchor.class),
|
2013-12-27 23:59:59 +01:00
|
|
|
|
2014-05-06 07:16:29 +02:00
|
|
|
QuartzFiber(140, AEFeature.Core, PartQuartzFiber.class),
|
2013-12-27 23:59:59 +01:00
|
|
|
|
2014-05-06 07:16:29 +02:00
|
|
|
Monitor(160, AEFeature.Core, PartMonitor.class),
|
2013-12-27 23:59:59 +01:00
|
|
|
|
2014-05-06 07:16:29 +02:00
|
|
|
SemiDarkMonitor(180, AEFeature.Core, PartSemiDarkMonitor.class),
|
2013-12-27 23:59:59 +01:00
|
|
|
|
2014-05-06 07:16:29 +02:00
|
|
|
DarkMonitor(200, AEFeature.Core, PartDarkMonitor.class),
|
2013-12-27 23:59:59 +01:00
|
|
|
|
2014-05-06 07:16:29 +02:00
|
|
|
StorageBus(220, AEFeature.StorageBus, PartStorageBus.class),
|
2013-12-27 23:59:59 +01:00
|
|
|
|
2014-05-06 07:16:29 +02:00
|
|
|
ImportBus(240, AEFeature.ImportBus, PartImportBus.class),
|
2013-12-27 23:59:59 +01:00
|
|
|
|
2014-05-06 07:16:29 +02:00
|
|
|
ExportBus(260, AEFeature.ExportBus, PartExportBus.class),
|
2013-12-27 23:59:59 +01:00
|
|
|
|
2014-05-06 07:16:29 +02:00
|
|
|
LevelEmitter(280, AEFeature.LevelEmiter, PartLevelEmitter.class),
|
2013-12-27 23:59:59 +01:00
|
|
|
|
2014-05-06 07:16:29 +02:00
|
|
|
AnnihilationPlane(300, AEFeature.AnnihilationPlane, PartAnnihilationPlane.class),
|
2014-01-20 17:41:37 +01:00
|
|
|
|
2014-05-06 07:16:29 +02:00
|
|
|
FormationPlane(320, AEFeature.FormationPlane, PartFormationPlane.class),
|
2014-01-20 17:41:37 +01:00
|
|
|
|
2014-05-06 07:16:29 +02:00
|
|
|
// CraftingMonitor(AEFeature.Crafting, PartCraftingMonitor.class),
|
2014-01-20 17:41:37 +01:00
|
|
|
|
2014-05-06 07:16:29 +02:00
|
|
|
PatternTerminal(340, AEFeature.CraftingTerminal, PartPatternTerminal.class),
|
2014-01-20 17:41:37 +01:00
|
|
|
|
2014-05-06 07:16:29 +02:00
|
|
|
CraftingTerminal(360, AEFeature.CraftingTerminal, PartCraftingTerminal.class),
|
2014-01-20 17:41:37 +01:00
|
|
|
|
2014-05-06 07:16:29 +02:00
|
|
|
Terminal(380, AEFeature.Core, PartTerminal.class),
|
2013-12-27 23:59:59 +01:00
|
|
|
|
2014-05-06 07:16:29 +02:00
|
|
|
StorageMonitor(400, AEFeature.StorageMonitor, PartStorageMonitor.class),
|
|
|
|
|
|
|
|
ConversionMonitor(420, AEFeature.PartConversionMonitor, PartConversionMonitor.class),
|
|
|
|
|
|
|
|
Interface(440, AEFeature.Core, PartInterface.class),
|
2013-12-27 23:59:59 +01:00
|
|
|
|
2014-05-06 07:16:29 +02:00
|
|
|
P2PTunnelME(460, AEFeature.P2PTunnelME, PartP2PTunnelME.class, GuiText.METunnel),
|
2013-12-27 23:59:59 +01:00
|
|
|
|
2014-05-06 07:16:29 +02:00
|
|
|
P2PTunnelRedstone(461, AEFeature.P2PTunnelRedstone, PartP2PRedstone.class, GuiText.RedstoneTunnel),
|
2013-12-27 23:59:59 +01:00
|
|
|
|
2014-05-06 07:16:29 +02:00
|
|
|
P2PTunnelItems(462, AEFeature.P2PTunnelItems, PartP2PItems.class, GuiText.ItemTunnel),
|
2013-12-27 23:59:59 +01:00
|
|
|
|
2014-05-06 07:16:29 +02:00
|
|
|
P2PTunnelLiquids(463, AEFeature.P2PTunnelLiquids, PartP2PLiquids.class, GuiText.FluidTunnel),
|
2013-12-27 23:59:59 +01:00
|
|
|
|
2014-05-06 07:16:29 +02:00
|
|
|
P2PTunnelMJ(464, AEFeature.P2PTunnelMJ, PartP2PBCPower.class, GuiText.MJTunnel),
|
2014-01-03 19:30:08 +01:00
|
|
|
|
2014-05-06 07:16:29 +02:00
|
|
|
P2PTunnelEU(465, AEFeature.P2PTunnelEU, PartP2PIC2Power.class, GuiText.EUTunnel),
|
2014-05-02 07:00:14 +02:00
|
|
|
|
2014-07-08 05:48:21 +02:00
|
|
|
P2PTunnelRF(466, AEFeature.P2PTunnelRF, PartP2PRFPower.class, GuiText.RFTunnel),
|
|
|
|
|
2014-07-15 09:25:03 +02:00
|
|
|
P2PTunnelLight(467, AEFeature.P2PTunnelLight, PartP2PLight.class, GuiText.LightTunnel),
|
|
|
|
|
2014-07-08 05:48:21 +02:00
|
|
|
InterfaceTerminal(480, AEFeature.InterfaceTerminal, PartInterfaceTerminal.class);
|
2013-12-27 23:59:59 +01:00
|
|
|
|
2014-01-31 18:32:30 +01:00
|
|
|
private final EnumSet<AEFeature> features;
|
|
|
|
private final Class<? extends IPart> myPart;
|
|
|
|
private final GuiText extraName;
|
2014-05-06 07:16:29 +02:00
|
|
|
public final int baseDamage;
|
2013-12-27 23:59:59 +01:00
|
|
|
|
2014-05-06 07:16:29 +02:00
|
|
|
PartType(int baseMetaValue, AEFeature part, Class<? extends IPart> c) {
|
|
|
|
this( baseMetaValue, part, c, null );
|
2014-01-31 18:32:30 +01:00
|
|
|
}
|
|
|
|
|
2014-05-06 07:16:29 +02:00
|
|
|
PartType(int baseMetaValue, AEFeature part, Class<? extends IPart> c, GuiText en) {
|
2013-12-27 23:59:59 +01:00
|
|
|
features = EnumSet.of( part );
|
|
|
|
myPart = c;
|
2014-01-31 18:32:30 +01:00
|
|
|
extraName = en;
|
2014-05-06 07:16:29 +02:00
|
|
|
baseDamage = baseMetaValue;
|
2013-12-27 23:59:59 +01:00
|
|
|
}
|
|
|
|
|
2014-01-03 19:30:08 +01:00
|
|
|
public Enum[] getVarients()
|
|
|
|
{
|
2014-05-26 00:43:17 +02:00
|
|
|
if ( this == CableSmart || this == CableCovered || this == CableGlass || this == CableDense )
|
|
|
|
return AEColor.values();
|
|
|
|
|
|
|
|
return null;
|
2014-01-03 19:30:08 +01:00
|
|
|
}
|
|
|
|
|
2013-12-27 23:59:59 +01:00
|
|
|
public EnumSet<AEFeature> getFeature()
|
|
|
|
{
|
|
|
|
return features;
|
|
|
|
}
|
|
|
|
|
|
|
|
public Class<? extends IPart> getPart()
|
|
|
|
{
|
|
|
|
return myPart;
|
|
|
|
}
|
|
|
|
|
2014-01-31 18:32:30 +01:00
|
|
|
public GuiText getExtraName()
|
|
|
|
{
|
|
|
|
return extraName;
|
|
|
|
}
|
|
|
|
|
2013-12-27 23:59:59 +01:00
|
|
|
}
|