diff --git a/common/mekanism/client/gui/GuiAdvancedElectricMachine.java b/common/mekanism/client/gui/GuiAdvancedElectricMachine.java index ac8f97903..f9a7504fc 100644 --- a/common/mekanism/client/gui/GuiAdvancedElectricMachine.java +++ b/common/mekanism/client/gui/GuiAdvancedElectricMachine.java @@ -3,7 +3,9 @@ package mekanism.client.gui; import java.util.List; import mekanism.api.ListUtils; +import mekanism.api.gas.GasStack; import mekanism.client.gui.GuiEnergyInfo.IInfoHandler; +import mekanism.client.render.MekanismRenderer; import mekanism.common.inventory.container.ContainerAdvancedElectricMachine; import mekanism.common.tile.TileEntityAdvancedElectricMachine; import mekanism.common.util.MekanismUtils; @@ -46,6 +48,11 @@ public class GuiAdvancedElectricMachine extends GuiMekanism fontRenderer.drawString(tileEntity.getInvName(), (xSize/2)-(fontRenderer.getStringWidth(tileEntity.getInvName())/2), 6, 0x404040); fontRenderer.drawString("Inventory", 8, (ySize - 96) + 2, 0x404040); + + if(xAxis >= 61 && xAxis <= 66 && yAxis >= 37 && yAxis <= 49) + { + drawCreativeTabHoveringText(tileEntity.gasTank.getGas() != null ? tileEntity.gasTank.getGas().getGas().getLocalizedName() + ": " + tileEntity.gasTank.getStored() : MekanismUtils.localize("gui.none"), xAxis, yAxis); + } super.drawGuiContainerForegroundLayer(mouseX, mouseY); } @@ -64,12 +71,29 @@ public class GuiAdvancedElectricMachine extends GuiMekanism int displayInt; - displayInt = tileEntity.getScaledGasLevel(12); - drawTexturedModalRect(guiWidth + 61, guiHeight + 37 + 12 - displayInt, 176, 7 + 12 - displayInt, 5, displayInt); - displayInt = tileEntity.getScaledProgress(24); drawTexturedModalRect(guiWidth + 79, guiHeight + 39, 176, 0, displayInt + 1, 7); + + if(tileEntity.getScaledGasLevel(12) > 0) + { + displayInt = tileEntity.getScaledGasLevel(12); + displayGauge(61, 37 + 12 - displayInt, 5, displayInt, tileEntity.gasTank.getGas()); + } super.drawGuiContainerBackgroundLayer(partialTick, mouseX, mouseY); } + + public void displayGauge(int xPos, int yPos, int sizeX, int sizeY, GasStack gas) + { + if(gas == null) + { + return; + } + + int guiWidth = (width - xSize) / 2; + int guiHeight = (height - ySize) / 2; + + mc.renderEngine.bindTexture(MekanismRenderer.getBlocksTexture()); + drawTexturedModelRectFromIcon(guiWidth + xPos, guiHeight + yPos, gas.getGas().getIcon(), sizeX, sizeY); + } } \ No newline at end of file diff --git a/common/mekanism/client/gui/GuiFactory.java b/common/mekanism/client/gui/GuiFactory.java index ccb69b974..807f5edfb 100644 --- a/common/mekanism/client/gui/GuiFactory.java +++ b/common/mekanism/client/gui/GuiFactory.java @@ -3,7 +3,9 @@ package mekanism.client.gui; import java.util.List; import mekanism.api.ListUtils; +import mekanism.api.gas.GasStack; import mekanism.client.gui.GuiEnergyInfo.IInfoHandler; +import mekanism.client.render.MekanismRenderer; import mekanism.common.IFactory.RecipeType; import mekanism.common.Tier.FactoryTier; import mekanism.common.inventory.container.ContainerFactory; @@ -60,7 +62,7 @@ public class GuiFactory extends GuiMekanism if(xAxis >= 8 && xAxis <= 168 && yAxis >= 78 && yAxis <= 83) { - drawCreativeTabHoveringText(MekanismUtils.localize("gui.factory.secondaryEnergy") + ": " + tileEntity.gasTank.getStored(), xAxis, yAxis); + drawCreativeTabHoveringText(tileEntity.gasTank.getGas() != null ? tileEntity.gasTank.getGas().getGas().getLocalizedName() + ": " + tileEntity.gasTank.getStored() : MekanismUtils.localize("gui.none"), xAxis, yAxis); } super.drawGuiContainerForegroundLayer(mouseX, mouseY); @@ -131,7 +133,23 @@ public class GuiFactory extends GuiMekanism recipeFuelY += 15; } - displayInt = tileEntity.getScaledGasLevel(160); - drawTexturedModalRect(guiWidth + 8, guiHeight + 78, 0, recipeFuelY, displayInt, 5); + if(tileEntity.getScaledGasLevel(160) > 0) + { + displayGauge(8, 78, tileEntity.getScaledGasLevel(160), 5, tileEntity.gasTank.getGas()); + } } + + public void displayGauge(int xPos, int yPos, int sizeX, int sizeY, GasStack gas) + { + if(gas == null) + { + return; + } + + int guiWidth = (width - xSize) / 2; + int guiHeight = (height - ySize) / 2; + + mc.renderEngine.bindTexture(MekanismRenderer.getBlocksTexture()); + drawTexturedModelRectFromIcon(guiWidth + xPos, guiHeight + yPos, gas.getGas().getIcon(), sizeX, sizeY); + } } diff --git a/resources/assets/mekanism/gui/GuiChemicalInjectionChamber.png b/resources/assets/mekanism/gui/GuiChemicalInjectionChamber.png index 7f35ae351..d6dc00a46 100644 Binary files a/resources/assets/mekanism/gui/GuiChemicalInjectionChamber.png and b/resources/assets/mekanism/gui/GuiChemicalInjectionChamber.png differ diff --git a/resources/assets/mekanism/lang/en_US.lang b/resources/assets/mekanism/lang/en_US.lang index 897cf1fd1..71c6ed605 100644 --- a/resources/assets/mekanism/lang/en_US.lang +++ b/resources/assets/mekanism/lang/en_US.lang @@ -165,6 +165,8 @@ gas.sulfurDioxideGas=Sulfur Dioxide gas.sulfurTrioxideGas=Sulfur Trioxide gas.sulfuricAcid=Sulfuric Acid gas.hydrogenChloride=Hydrogen Chloride +gas.liquidOsmium=Liquid Osmium +gas.liquidStone=Liquid Stone //Fluids fluid.hydrogen=Liquid Hydrogen @@ -175,8 +177,6 @@ fluid.sulfurTrioxideGas=Liquid Sulfur Trioxide fluid.sulfuricAcid=Liquid Sulfuric Acid fluid.hydrogenChloride=Liquid Hydrogen Chloride fluid.brine=Brine -fluid.liquidOsmium=Liquid Osmium -fluid.liquidStone=Liquid Stone //Gui text gui.removeSpeedUpgrade=Remove speed upgrade