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;
|
|
|
|
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-01-20 17:41:37 +01:00
|
|
|
import appeng.parts.p2p.PartP2PItems;
|
|
|
|
import appeng.parts.p2p.PartP2PLiquids;
|
|
|
|
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.PartCraftingMonitor;
|
|
|
|
import appeng.parts.reporting.PartCraftingTerminal;
|
|
|
|
import appeng.parts.reporting.PartDarkMonitor;
|
|
|
|
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
|
|
|
|
{
|
|
|
|
ToggleBus(AEFeature.Core, PartToggleBus.class),
|
|
|
|
|
|
|
|
InvertedToggleBus(AEFeature.Core, PartInvertedToggleBus.class),
|
|
|
|
|
|
|
|
CableSmart(AEFeature.Core, PartCableSmart.class), CableCovered(AEFeature.Core, PartCableCovered.class), CableGlass(AEFeature.Core, PartCableGlass.class),
|
|
|
|
|
2014-01-20 17:41:37 +01:00
|
|
|
CableDense(AEFeature.DenseCables, PartDenseCable.class),
|
|
|
|
|
2013-12-27 23:59:59 +01:00
|
|
|
CableAnchor(AEFeature.Core, PartCableAnchor.class),
|
|
|
|
|
|
|
|
QuartzFiber(AEFeature.Core, PartQuartzFiber.class),
|
|
|
|
|
|
|
|
Monitior(AEFeature.Core, PartMonitor.class),
|
|
|
|
|
|
|
|
SemiDarkMonitor(AEFeature.Core, PartSemiDarkMonitor.class),
|
|
|
|
|
|
|
|
DarkMonitor(AEFeature.Core, PartDarkMonitor.class),
|
|
|
|
|
|
|
|
StorageBus(AEFeature.StorageBus, PartStorageBus.class),
|
|
|
|
|
|
|
|
ImportBus(AEFeature.ImportBus, PartImportBus.class),
|
|
|
|
|
|
|
|
ExportBus(AEFeature.ExportBus, PartExportBus.class),
|
|
|
|
|
|
|
|
LevelEmitter(AEFeature.LevelEmiter, PartLevelEmitter.class),
|
|
|
|
|
2014-02-14 05:27:15 +01:00
|
|
|
AnnihilationPlane(AEFeature.AnnihilationPlane, PartAnnihilationPlane.class),
|
2013-12-27 23:59:59 +01:00
|
|
|
|
2014-02-01 19:13:12 +01:00
|
|
|
// FormationPlane(AEFeature.FormationPlane, PartFormationPlane.class),
|
2013-12-27 23:59:59 +01:00
|
|
|
|
2014-01-31 18:32:30 +01:00
|
|
|
P2PTunnelME(AEFeature.P2PTunnelME, PartP2PTunnelME.class, GuiText.METunnel),
|
2014-01-20 17:41:37 +01:00
|
|
|
|
2014-01-31 18:32:30 +01:00
|
|
|
P2PTunnelRedstone(AEFeature.P2PTunnelRedstone, PartP2PRedstone.class, GuiText.RedstoneTunnel),
|
2014-01-20 17:41:37 +01:00
|
|
|
|
2014-01-31 18:32:30 +01:00
|
|
|
P2PTunnelItems(AEFeature.P2PTunnelItems, PartP2PItems.class, GuiText.ItemTunnel),
|
2014-01-20 17:41:37 +01:00
|
|
|
|
2014-01-31 18:32:30 +01:00
|
|
|
P2PTunnelLiquids(AEFeature.P2PTunnelLiquids, PartP2PLiquids.class, GuiText.FluidTunnel),
|
2014-01-20 17:41:37 +01:00
|
|
|
|
2014-02-01 19:13:12 +01:00
|
|
|
// P2PTunnelMJ(AEFeature.P2PTunnelMJ, PartP2PBCPower.class, GuiText.MJTunnel),
|
2014-01-20 17:41:37 +01:00
|
|
|
|
2014-02-01 19:13:12 +01:00
|
|
|
// P2PTunnelEU(AEFeature.P2PTunnelEU, PartP2PIC2Power.class, GuiText.EUTunnel),
|
2013-12-27 23:59:59 +01:00
|
|
|
|
|
|
|
CraftingMonitor(AEFeature.Crafting, PartCraftingMonitor.class),
|
|
|
|
|
|
|
|
PatternTerminal(AEFeature.CraftingTerminal, PartPatternTerminal.class),
|
|
|
|
|
|
|
|
CraftingTerminal(AEFeature.CraftingTerminal, PartCraftingTerminal.class),
|
|
|
|
|
|
|
|
Terminal(AEFeature.Core, PartTerminal.class),
|
|
|
|
|
|
|
|
StorageMonitor(AEFeature.StorageMonitor, PartStorageMonitor.class),
|
|
|
|
|
2014-01-03 19:30:08 +01:00
|
|
|
ConversionMonitor(AEFeature.PartConversionMonitor, PartConversionMonitor.class),
|
|
|
|
|
|
|
|
Interface(AEFeature.Core, PartInterface.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;
|
2013-12-27 23:59:59 +01:00
|
|
|
|
|
|
|
PartType(AEFeature part, Class<? extends IPart> c) {
|
2014-01-31 18:32:30 +01:00
|
|
|
this( part, c, null );
|
|
|
|
}
|
|
|
|
|
|
|
|
PartType(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;
|
2013-12-27 23:59:59 +01:00
|
|
|
}
|
|
|
|
|
2014-01-03 19:30:08 +01:00
|
|
|
public Enum[] getVarients()
|
|
|
|
{
|
2014-01-20 17:41:37 +01:00
|
|
|
return (this == CableSmart || this == CableCovered || this == CableGlass || this == CableDense) ? AEColor.values() : 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
|
|
|
}
|