Initial Fluid Integration (#3510)
* Added Fluid Storage Cells * Added Fluid Import Bus * Added Fluid Export Bus * Added Fluid Storage Bus * Added Fluid Terminal. While holding a item with the FLUID_HANDLER_ITEM_CAPABILITY, such as a tank Left click on a fluid to extract the fluid Right click to insert the fluid
This commit is contained in:
@@ -278,7 +278,9 @@ public final class ItemPart extends AEBaseItem implements IPartItem, IItemGroup
|
||||
public String getUnlocalizedGroupName( final Set<ItemStack> others, final ItemStack is )
|
||||
{
|
||||
boolean importBus = false;
|
||||
boolean importBusFluids = false;
|
||||
boolean exportBus = false;
|
||||
boolean exportBusFluids = false;
|
||||
boolean group = false;
|
||||
|
||||
final PartType u = this.getTypeByStack( is );
|
||||
@@ -297,6 +299,13 @@ public final class ItemPart extends AEBaseItem implements IPartItem, IItemGroup
|
||||
group = true;
|
||||
}
|
||||
break;
|
||||
case FLUID_IMPORT_BUS:
|
||||
importBusFluids = true;
|
||||
if( u == pt )
|
||||
{
|
||||
group = true;
|
||||
}
|
||||
break;
|
||||
case EXPORT_BUS:
|
||||
exportBus = true;
|
||||
if( u == pt )
|
||||
@@ -304,15 +313,26 @@ public final class ItemPart extends AEBaseItem implements IPartItem, IItemGroup
|
||||
group = true;
|
||||
}
|
||||
break;
|
||||
case FLUID_EXPORT_BUS:
|
||||
exportBusFluids = true;
|
||||
if( u == pt )
|
||||
{
|
||||
group = true;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( group && importBus && exportBus )
|
||||
if( group && importBus && exportBus && ( u == PartType.IMPORT_BUS || u == PartType.EXPORT_BUS ) )
|
||||
{
|
||||
return GuiText.IOBuses.getUnlocalized();
|
||||
}
|
||||
if( group && importBusFluids && exportBusFluids && ( u == PartType.FLUID_IMPORT_BUS || u == PartType.FLUID_EXPORT_BUS ) )
|
||||
{
|
||||
return GuiText.IOBusesFluids.getUnlocalized();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -41,6 +41,9 @@ import appeng.core.AEConfig;
|
||||
import appeng.core.AppEng;
|
||||
import appeng.core.features.AEFeature;
|
||||
import appeng.core.localization.GuiText;
|
||||
import appeng.fluids.parts.PartFluidExportBus;
|
||||
import appeng.fluids.parts.PartFluidImportBus;
|
||||
import appeng.fluids.parts.PartFluidStorageBus;
|
||||
import appeng.integration.IntegrationRegistry;
|
||||
import appeng.integration.IntegrationType;
|
||||
import appeng.parts.automation.PartAnnihilationPlane;
|
||||
@@ -70,6 +73,7 @@ import appeng.parts.p2p.PartP2PTunnelME;
|
||||
import appeng.parts.reporting.PartConversionMonitor;
|
||||
import appeng.parts.reporting.PartCraftingTerminal;
|
||||
import appeng.parts.reporting.PartDarkPanel;
|
||||
import appeng.parts.reporting.PartFluidTerminal;
|
||||
import appeng.parts.reporting.PartInterfaceTerminal;
|
||||
import appeng.parts.reporting.PartPanel;
|
||||
import appeng.parts.reporting.PartPatternTerminal;
|
||||
@@ -190,11 +194,16 @@ public enum PartType
|
||||
DARK_MONITOR( 200, "dark_monitor", EnumSet.of( AEFeature.PANELS ), EnumSet.noneOf( IntegrationType.class ), PartDarkPanel.class ),
|
||||
|
||||
STORAGE_BUS( 220, "storage_bus", EnumSet.of( AEFeature.STORAGE_BUS ), EnumSet.noneOf( IntegrationType.class ), PartStorageBus.class ),
|
||||
FLUID_STORAGE_BUS( 221, "fluid_storage_bus", EnumSet.of( AEFeature.FLUID_STORAGE_BUS ), EnumSet.noneOf( IntegrationType.class ), PartFluidStorageBus.class ),
|
||||
|
||||
IMPORT_BUS( 240, "import_bus", EnumSet.of( AEFeature.IMPORT_BUS ), EnumSet.noneOf( IntegrationType.class ), PartImportBus.class ),
|
||||
|
||||
FLUID_IMPORT_BUS( 241, "fluid_import_bus", EnumSet.of( AEFeature.FLUID_IMPORT_BUS ), EnumSet.noneOf( IntegrationType.class ), PartFluidImportBus.class ),
|
||||
|
||||
EXPORT_BUS( 260, "export_bus", EnumSet.of( AEFeature.EXPORT_BUS ), EnumSet.noneOf( IntegrationType.class ), PartExportBus.class ),
|
||||
|
||||
FLUID_EXPORT_BUS( 261, "fluid_export_bus", EnumSet.of( AEFeature.FLUID_EXPORT_BUS ), EnumSet.noneOf( IntegrationType.class ), PartFluidExportBus.class ),
|
||||
|
||||
LEVEL_EMITTER( 280, "level_emitter", EnumSet.of( AEFeature.LEVEL_EMITTER ), EnumSet.noneOf( IntegrationType.class ), PartLevelEmitter.class ),
|
||||
|
||||
ANNIHILATION_PLANE( 300, "annihilation_plane", EnumSet.of( AEFeature.ANNIHILATION_PLANE ), EnumSet
|
||||
@@ -293,7 +302,9 @@ public enum PartType
|
||||
// IntegrationType.OpenComputers ), PartP2POpenComputers.class, GuiText.OCTunnel ),
|
||||
|
||||
INTERFACE_TERMINAL( 480, "interface_terminal", EnumSet.of( AEFeature.INTERFACE_TERMINAL ), EnumSet
|
||||
.noneOf( IntegrationType.class ), PartInterfaceTerminal.class );
|
||||
.noneOf( IntegrationType.class ), PartInterfaceTerminal.class ),
|
||||
|
||||
FLUID_TERMINAL( 520, "fluid_terminal", EnumSet.of( AEFeature.FLUID_TERMINAL ), EnumSet.noneOf( IntegrationType.class ), PartFluidTerminal.class );
|
||||
|
||||
private final int baseDamage;
|
||||
private final Set<AEFeature> features;
|
||||
|
||||
Reference in New Issue
Block a user