Implemented the new systems in factories and chemical crystallizers, added better configurator mode switch tooltips
This commit is contained in:
parent
93df96851a
commit
e3ca5ccecd
8 changed files with 64 additions and 18 deletions
|
@ -95,7 +95,7 @@ public abstract class GuiMekanism extends GuiContainer implements IGuiWrapper
|
|||
|
||||
if(data != null)
|
||||
{
|
||||
drawCreativeTabHoveringText(data.color.getName(), xAxis, yAxis);
|
||||
drawCreativeTabHoveringText(data.color + data.localize() + " (" + data.color.getName() + ")", xAxis, yAxis);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -71,7 +71,7 @@ public class ItemConfigurator extends ItemEnergized implements IMekWrench, ITool
|
|||
if(!player.isSneaking())
|
||||
{
|
||||
SideData data = config.getConfig().getOutput(getState(stack).getTransmission(), side, config.getOrientation());
|
||||
player.addChatMessage(new ChatComponentText(EnumColor.DARK_BLUE + "[Mekanism]" + EnumColor.GREY + " " + MekanismUtils.localize("tooltip.configurator.viewMode") + ": " + data.color + data.localize() + " (" + data.color.getName() + ")"));
|
||||
player.addChatMessage(new ChatComponentText(EnumColor.DARK_BLUE + "[Mekanism]" + EnumColor.GREY + " " + getViewModeText(getState(stack).getTransmission()) + ": " + data.color + data.localize() + " (" + data.color.getName() + ")"));
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
|
@ -80,7 +80,7 @@ public class ItemConfigurator extends ItemEnergized implements IMekWrench, ITool
|
|||
setEnergy(stack, getEnergy(stack) - ENERGY_PER_CONFIGURE);
|
||||
MekanismUtils.incrementOutput(config, getState(stack).getTransmission(), MekanismUtils.getBaseOrientation(side, config.getOrientation()));
|
||||
SideData data = config.getConfig().getOutput(getState(stack).getTransmission(), side, config.getOrientation());
|
||||
player.addChatMessage(new ChatComponentText(EnumColor.DARK_BLUE + "[Mekanism]" + EnumColor.GREY + " " + MekanismUtils.localize("tooltip.configurator.toggleMode") + ": " + data.color + data.localize() + " (" + data.color.getName() + ")"));
|
||||
player.addChatMessage(new ChatComponentText(EnumColor.DARK_BLUE + "[Mekanism]" + EnumColor.GREY + " " + getToggleModeText(getState(stack).getTransmission()) + ": " + data.color + data.localize() + " (" + data.color.getName() + ")"));
|
||||
|
||||
if(config instanceof TileEntityBasicBlock)
|
||||
{
|
||||
|
@ -189,6 +189,18 @@ public class ItemConfigurator extends ItemEnergized implements IMekWrench, ITool
|
|||
|
||||
return false;
|
||||
}
|
||||
|
||||
public String getViewModeText(TransmissionType type)
|
||||
{
|
||||
String base = MekanismUtils.localize("tooltip.configurator.viewMode");
|
||||
return String.format(base, type.localize().toLowerCase());
|
||||
}
|
||||
|
||||
public String getToggleModeText(TransmissionType type)
|
||||
{
|
||||
String base = MekanismUtils.localize("tooltip.configurator.toggleMode");
|
||||
return String.format(base, type.localize());
|
||||
}
|
||||
|
||||
public String getStateDisplay(ConfiguratorMode mode)
|
||||
{
|
||||
|
|
|
@ -16,15 +16,21 @@ public class TileEntityAdvancedFactory extends TileEntityFactory
|
|||
{
|
||||
super(FactoryTier.ADVANCED, MachineType.ADVANCED_FACTORY);
|
||||
|
||||
configComponent = new TileComponentConfig(this, TransmissionType.ITEM, TransmissionType.ENERGY);
|
||||
configComponent = new TileComponentConfig(this, TransmissionType.ITEM, TransmissionType.ENERGY, TransmissionType.GAS);
|
||||
|
||||
configComponent.addOutput(TransmissionType.ITEM, new SideData("None", EnumColor.GREY, InventoryUtils.EMPTY));
|
||||
configComponent.addOutput(TransmissionType.ITEM, new SideData("Energy", EnumColor.DARK_GREEN, new int[] {1}));
|
||||
configComponent.addOutput(TransmissionType.ITEM, new SideData("Extra", EnumColor.PURPLE, new int[] {4}));
|
||||
configComponent.addOutput(TransmissionType.ITEM, new SideData("Input", EnumColor.DARK_RED, new int[] {5, 6, 7, 8, 9}));
|
||||
configComponent.addOutput(TransmissionType.ITEM, new SideData("Output", EnumColor.DARK_BLUE, new int[] {10, 11, 12, 13, 14}));
|
||||
|
||||
configComponent.setConfig(TransmissionType.ITEM, new byte[] {4, 3, 0, 2, 1, 0});
|
||||
|
||||
configComponent.addSupported(TransmissionType.GAS);
|
||||
configComponent.addOutput(TransmissionType.GAS, new SideData("None", EnumColor.GREY, InventoryUtils.EMPTY));
|
||||
configComponent.addOutput(TransmissionType.GAS, new SideData("Gas", EnumColor.DARK_RED, new int[] {0}));
|
||||
configComponent.fillConfig(TransmissionType.GAS, 1);
|
||||
configComponent.setCanEject(TransmissionType.GAS, false);
|
||||
|
||||
configComponent.setInputEnergyConfig();
|
||||
|
||||
upgradeComponent = new TileComponentUpgrade(this, 0);
|
||||
|
|
|
@ -20,11 +20,11 @@ import mekanism.api.transmitters.TransmissionType;
|
|||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.SideData;
|
||||
import mekanism.common.Upgrade;
|
||||
import mekanism.common.base.ITankManager;
|
||||
import mekanism.common.base.IEjector;
|
||||
import mekanism.common.base.IRedstoneControl;
|
||||
import mekanism.common.base.ISideConfiguration;
|
||||
import mekanism.common.base.ISustainedData;
|
||||
import mekanism.common.base.ITankManager;
|
||||
import mekanism.common.base.IUpgradeTile;
|
||||
import mekanism.common.block.BlockMachine.MachineType;
|
||||
import mekanism.common.network.PacketTileEntity.TileEntityMessage;
|
||||
|
@ -86,14 +86,19 @@ public class TileEntityChemicalCrystallizer extends TileEntityNoisyElectricBlock
|
|||
{
|
||||
super("crystallizer", "ChemicalCrystallizer", MachineType.CHEMICAL_CRYSTALLIZER.baseEnergy);
|
||||
|
||||
configComponent = new TileComponentConfig(this, TransmissionType.ITEM, TransmissionType.ENERGY);
|
||||
configComponent = new TileComponentConfig(this, TransmissionType.ITEM, TransmissionType.ENERGY, TransmissionType.GAS);
|
||||
|
||||
configComponent.addOutput(TransmissionType.ITEM, new SideData("None", EnumColor.GREY, InventoryUtils.EMPTY));
|
||||
configComponent.addOutput(TransmissionType.ITEM, new SideData("Gas", EnumColor.PURPLE, new int[] {0}));
|
||||
configComponent.addOutput(TransmissionType.ITEM, new SideData("Output", EnumColor.DARK_BLUE, new int[] {1}));
|
||||
configComponent.addOutput(TransmissionType.ITEM, new SideData("Energy", EnumColor.DARK_GREEN, new int[] {2}));
|
||||
|
||||
configComponent.setConfig(TransmissionType.ITEM, new byte[] {0, 3, 0, 0, 1, 2});
|
||||
|
||||
configComponent.addOutput(TransmissionType.GAS, new SideData("None", EnumColor.GREY, InventoryUtils.EMPTY));
|
||||
configComponent.addOutput(TransmissionType.GAS, new SideData("Gas", EnumColor.YELLOW, new int[] {0}));
|
||||
configComponent.setConfig(TransmissionType.GAS, new byte[] {0, 0, 0, 0, 1, 0});
|
||||
configComponent.setCanEject(TransmissionType.GAS, false);
|
||||
|
||||
configComponent.setInputEnergyConfig();
|
||||
|
||||
inventory = new ItemStack[4];
|
||||
|
@ -332,13 +337,13 @@ public class TileEntityChemicalCrystallizer extends TileEntityNoisyElectricBlock
|
|||
@Override
|
||||
public boolean canTubeConnect(ForgeDirection side)
|
||||
{
|
||||
return side == MekanismUtils.getLeft(facing);
|
||||
return configComponent.getOutput(TransmissionType.GAS, side.ordinal(), facing).hasSlot(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canReceiveGas(ForgeDirection side, Gas type)
|
||||
{
|
||||
return side == MekanismUtils.getLeft(facing) && inputTank.canReceive(type);
|
||||
return configComponent.getOutput(TransmissionType.GAS, side.ordinal(), facing).hasSlot(0) && inputTank.canReceive(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -33,6 +33,7 @@ public class TileEntityChemicalInjectionChamber extends TileEntityAdvancedElectr
|
|||
configComponent.addOutput(TransmissionType.GAS, new SideData("None", EnumColor.GREY, InventoryUtils.EMPTY));
|
||||
configComponent.addOutput(TransmissionType.GAS, new SideData("Gas", EnumColor.DARK_RED, new int[] {0}));
|
||||
configComponent.fillConfig(TransmissionType.GAS, 1);
|
||||
configComponent.setCanEject(TransmissionType.GAS, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -16,15 +16,21 @@ public class TileEntityEliteFactory extends TileEntityFactory
|
|||
{
|
||||
super(FactoryTier.ELITE, MachineType.ELITE_FACTORY);
|
||||
|
||||
configComponent = new TileComponentConfig(this, TransmissionType.ITEM, TransmissionType.ENERGY);
|
||||
configComponent = new TileComponentConfig(this, TransmissionType.ITEM, TransmissionType.ENERGY, TransmissionType.GAS);
|
||||
|
||||
configComponent.addOutput(TransmissionType.ITEM, new SideData("None", EnumColor.GREY, InventoryUtils.EMPTY));
|
||||
configComponent.addOutput(TransmissionType.ITEM, new SideData("Energy", EnumColor.DARK_GREEN, new int[] {1}));
|
||||
configComponent.addOutput(TransmissionType.ITEM, new SideData("Extra", EnumColor.PURPLE, new int[] {4}));
|
||||
configComponent.addOutput(TransmissionType.ITEM, new SideData("Input", EnumColor.DARK_RED, new int[] {5, 6, 7, 8, 9, 10, 11}));
|
||||
configComponent.addOutput(TransmissionType.ITEM, new SideData("Output", EnumColor.DARK_BLUE, new int[] {12, 13, 14, 15, 16, 17, 18}));
|
||||
|
||||
configComponent.setConfig(TransmissionType.ITEM, new byte[] {4, 3, 0, 2, 1, 0});
|
||||
|
||||
configComponent.addSupported(TransmissionType.GAS);
|
||||
configComponent.addOutput(TransmissionType.GAS, new SideData("None", EnumColor.GREY, InventoryUtils.EMPTY));
|
||||
configComponent.addOutput(TransmissionType.GAS, new SideData("Gas", EnumColor.DARK_RED, new int[] {0}));
|
||||
configComponent.fillConfig(TransmissionType.GAS, 1);
|
||||
configComponent.setCanEject(TransmissionType.GAS, false);
|
||||
|
||||
configComponent.setInputEnergyConfig();
|
||||
|
||||
upgradeComponent = new TileComponentUpgrade(this, 0);
|
||||
|
|
|
@ -119,15 +119,21 @@ public class TileEntityFactory extends TileEntityNoisyElectricBlock implements I
|
|||
{
|
||||
this(FactoryTier.BASIC, MachineType.BASIC_FACTORY);
|
||||
|
||||
configComponent = new TileComponentConfig(this, TransmissionType.ITEM, TransmissionType.ENERGY);
|
||||
configComponent = new TileComponentConfig(this, TransmissionType.ITEM, TransmissionType.ENERGY, TransmissionType.GAS);
|
||||
|
||||
configComponent.addOutput(TransmissionType.ITEM, new SideData("None", EnumColor.GREY, InventoryUtils.EMPTY));
|
||||
configComponent.addOutput(TransmissionType.ITEM, new SideData("Energy", EnumColor.DARK_GREEN, new int[] {1}));
|
||||
configComponent.addOutput(TransmissionType.ITEM, new SideData("Extra", EnumColor.PURPLE, new int[] {4}));
|
||||
configComponent.addOutput(TransmissionType.ITEM, new SideData("Input", EnumColor.DARK_RED, new int[] {5, 6, 7}));
|
||||
configComponent.addOutput(TransmissionType.ITEM, new SideData("Output", EnumColor.DARK_BLUE, new int[] {8, 9, 10}));
|
||||
|
||||
configComponent.setConfig(TransmissionType.ITEM, new byte[] {4, 3, 0, 2, 1, 0});
|
||||
|
||||
configComponent.addSupported(TransmissionType.GAS);
|
||||
configComponent.addOutput(TransmissionType.GAS, new SideData("None", EnumColor.GREY, InventoryUtils.EMPTY));
|
||||
configComponent.addOutput(TransmissionType.GAS, new SideData("Gas", EnumColor.DARK_RED, new int[] {0}));
|
||||
configComponent.fillConfig(TransmissionType.GAS, 1);
|
||||
configComponent.setCanEject(TransmissionType.GAS, false);
|
||||
|
||||
configComponent.setInputEnergyConfig();
|
||||
|
||||
upgradeComponent = new TileComponentUpgrade(this, 0);
|
||||
|
@ -988,13 +994,23 @@ public class TileEntityFactory extends TileEntityNoisyElectricBlock implements I
|
|||
@Override
|
||||
public boolean canReceiveGas(ForgeDirection side, Gas type)
|
||||
{
|
||||
return recipeType.canReceiveGas(side, type);
|
||||
if(configComponent.getOutput(TransmissionType.GAS, side.ordinal(), facing).hasSlot(0))
|
||||
{
|
||||
return recipeType.canReceiveGas(side, type);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canTubeConnect(ForgeDirection side)
|
||||
{
|
||||
return recipeType.canTubeConnect(side);
|
||||
if(recipeType.canTubeConnect(side))
|
||||
{
|
||||
return configComponent.getOutput(TransmissionType.GAS, side.ordinal(), facing).hasSlot(0);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -551,8 +551,8 @@ tooltip.configurator.rotate=Rotate
|
|||
tooltip.configurator.wrench=Wrench
|
||||
tooltip.configurator.pumpReset=Reset Electric Pump calculation
|
||||
tooltip.configurator.toggleDiverter=Diverter mode changed to
|
||||
tooltip.configurator.toggleMode=Mode bumped to
|
||||
tooltip.configurator.viewMode=Current mode
|
||||
tooltip.configurator.toggleMode=%s behavior bumped to
|
||||
tooltip.configurator.viewMode=Current %s behavior
|
||||
tooltip.configurator.unauth=This chest is locked
|
||||
tooltip.configurator.noLink=No link
|
||||
tooltip.configurator.linkMsg=Bound to
|
||||
|
|
Loading…
Reference in a new issue