diff --git a/src/main/java/mekanism/generators/client/gui/GuiReactorController.java b/src/main/java/mekanism/generators/client/gui/GuiReactorController.java index 1591502cc..44444f695 100644 --- a/src/main/java/mekanism/generators/client/gui/GuiReactorController.java +++ b/src/main/java/mekanism/generators/client/gui/GuiReactorController.java @@ -3,8 +3,14 @@ package mekanism.generators.client.gui; import java.util.List; import mekanism.api.ListUtils; +import mekanism.api.gas.GasTank; import mekanism.client.gui.GuiEnergyInfo; import mekanism.client.gui.GuiEnergyInfo.IInfoHandler; +import mekanism.client.gui.GuiFluidGauge; +import mekanism.client.gui.GuiFluidGauge.IFluidInfoHandler; +import mekanism.client.gui.GuiGasGauge; +import mekanism.client.gui.GuiGasGauge.IGasInfoHandler; +import mekanism.client.gui.GuiGauge.Type; import mekanism.client.gui.GuiMekanism; import mekanism.client.gui.GuiPowerBar; import mekanism.client.gui.GuiRedstoneControl; @@ -20,6 +26,7 @@ import mekanism.generators.common.tile.TileEntitySolarGenerator; import mekanism.generators.common.tile.reactor.TileEntityReactorController; import net.minecraft.entity.player.InventoryPlayer; +import net.minecraftforge.fluids.FluidTank; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import org.lwjgl.opengl.GL11; @@ -29,7 +36,7 @@ public class GuiReactorController extends GuiMekanism { public TileEntityReactorController tileEntity; - public GuiReactorController(InventoryPlayer inventory, TileEntityReactorController tentity) + public GuiReactorController(InventoryPlayer inventory, final TileEntityReactorController tentity) { super(new ContainerReactorController(inventory, tentity)); tileEntity = tentity; @@ -43,8 +50,48 @@ public class GuiReactorController extends GuiMekanism "Max Output: " + MekanismUtils.getEnergyDisplay(tileEntity.getMaxOutput()) + "/t"); } }, this, MekanismUtils.getResource(ResourceType.GUI, "GuiBlank.png"))); + guiElements.add(new GuiGasGauge(new IGasInfoHandler() + { + @Override + public GasTank getTank() + { + return tentity.deuteriumTank; + } + }, Type.SMALL, this, MekanismUtils.getResource(ResourceType.GUI, "GuiBlank.png"), 124, 16)); + guiElements.add(new GuiGasGauge(new IGasInfoHandler() + { + @Override + public GasTank getTank() + { + return tentity.tritiumTank; + } + }, Type.SMALL, this, MekanismUtils.getResource(ResourceType.GUI, "GuiBlank.png"), 124, 46)); + guiElements.add(new GuiGasGauge(new IGasInfoHandler() + { + @Override + public GasTank getTank() + { + return tentity.fuelTank; + } + }, Type.STANDARD, this, MekanismUtils.getResource(ResourceType.GUI, "GuiBlank.png"), 144, 16)); + guiElements.add(new GuiFluidGauge(new IFluidInfoHandler() + { + @Override + public FluidTank getTank() + { + return tentity.waterTank; + } + }, Type.SMALL, this, MekanismUtils.getResource(ResourceType.GUI, "GuiBlank.png"), 78, 46)); + guiElements.add(new GuiFluidGauge(new IFluidInfoHandler() + { + @Override + public FluidTank getTank() + { + return tentity.steamTank; + } + }, Type.SMALL, this, MekanismUtils.getResource(ResourceType.GUI, "GuiBlank.png"), 98, 46)); guiElements.add(new GuiPowerBar(this, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiBlank.png"), 164, 15)); - guiElements.add(new GuiSlot(SlotType.NORMAL, this, MekanismUtils.getResource(ResourceType.GUI, "GuiBlank.png"), 142, 34)); + guiElements.add(new GuiSlot(SlotType.NORMAL, this, MekanismUtils.getResource(ResourceType.GUI, "GuiBlank.png"), 98, 26)); } @Override @@ -54,7 +101,6 @@ public class GuiReactorController extends GuiMekanism fontRendererObj.drawString(tileEntity.getInventoryName(), 30, 6, 0x404040); fontRendererObj.drawString(MekanismUtils.localize("container.inventory"), 8, (ySize - 96) + 2, 0x404040); - fontRendererObj.drawString(MekanismUtils.getEnergyDisplay(tileEntity.getEnergy()), 151, (ySize - 96) + 2, 0x00CD00); if(tileEntity.getReactor() == null) { fontRendererObj.drawString(MekanismUtils.localize("container.reactor.notFormed"), 8, 16, 0x404040); @@ -62,13 +108,8 @@ public class GuiReactorController extends GuiMekanism else { fontRendererObj.drawString(MekanismUtils.localize("container.reactor.formed"), 8, 16, 0x404040); - fontRendererObj.drawString(MekanismUtils.localize("plasma") + ": " + tileEntity.getReactor().getPlasmaTemp(), 8, 26, 0x404040); - fontRendererObj.drawString(MekanismUtils.localize("casing") + ": " + tileEntity.getReactor().getCaseTemp(), 8, 36, 0x404040); - fontRendererObj.drawString(MekanismUtils.localize("fuelLevel") + ": " + tileEntity.fuelTank.getStored(), 8, 46, 0x404040); - fontRendererObj.drawString(MekanismUtils.localize("deuterium") + ": " + tileEntity.deuteriumTank.getStored(), 8, 56, 0x404040); - fontRendererObj.drawString(MekanismUtils.localize("tritium") + ": " + tileEntity.tritiumTank.getStored(), 8, 66, 0x404040); - fontRendererObj.drawString(MekanismUtils.localize("water") + ": " + tileEntity.waterTank.getFluidAmount(), 8, 76, 0x404040); - fontRendererObj.drawString(MekanismUtils.localize("steam") + ": " + tileEntity.steamTank.getFluidAmount(), 8, 86, 0x404040); + fontRendererObj.drawString(MekanismUtils.localize("plasma") + ": " + (int)(tileEntity.getReactor().getPlasmaTemp()+23)+"C", 8, 26, 0x404040); + fontRendererObj.drawString(MekanismUtils.localize("casing") + ": " + (int)(tileEntity.getReactor().getCaseTemp()+23)+"C", 8, 36, 0x404040); } } diff --git a/src/main/java/mekanism/generators/common/FusionReactor.java b/src/main/java/mekanism/generators/common/FusionReactor.java index eb4ee8005..d1ab0a00b 100644 --- a/src/main/java/mekanism/generators/common/FusionReactor.java +++ b/src/main/java/mekanism/generators/common/FusionReactor.java @@ -110,13 +110,8 @@ public class FusionReactor implements IFusionReactor //Perform the heat transfer calculations transferHeat(); - lastPlasmaTemperature = plasmaTemperature; - lastCaseTemperature = caseTemperature; - - if(plasmaTemperature > 1E-6 || caseTemperature > 1E-6) - { - Mekanism.logger.info("Reactor temperatures: Plasma: " + (int) plasmaTemperature + ", Casing: " + (int) caseTemperature); - } + lastPlasmaTemperature = plasmaTemperature < 1E-1 ? 0 : plasmaTemperature; + lastCaseTemperature = caseTemperature < 1E-1 ? 0 : caseTemperature; } public void vaporiseHohlraum() diff --git a/src/main/java/mekanism/generators/common/inventory/container/ContainerReactorController.java b/src/main/java/mekanism/generators/common/inventory/container/ContainerReactorController.java index a265ebaa6..8600ee349 100644 --- a/src/main/java/mekanism/generators/common/inventory/container/ContainerReactorController.java +++ b/src/main/java/mekanism/generators/common/inventory/container/ContainerReactorController.java @@ -18,7 +18,7 @@ public class ContainerReactorController extends Container public ContainerReactorController(InventoryPlayer inventory, TileEntityReactorController tentity) { tileEntity = tentity; - addSlotToContainer(new Slot(tentity, 0, 143, 35)); + addSlotToContainer(new Slot(tentity, 0, 99, 27)); int slotX; for(slotX = 0; slotX < 3; ++slotX)