Add Statistics tab to Reactor
Some more stats could be displayed here, regarding energy generation.
This commit is contained in:
parent
12f9753ac5
commit
dffee5a8e3
13 changed files with 317 additions and 11 deletions
|
@ -45,4 +45,12 @@ public interface IFusionReactor
|
|||
public boolean isBurning();
|
||||
|
||||
public void setBurning(boolean burn);
|
||||
|
||||
public int getMinInjectionRate(boolean active);
|
||||
|
||||
public double getMaxPlasmaTemperature(boolean active);
|
||||
|
||||
public double getMaxCasingTemperature(boolean active);
|
||||
|
||||
public double getIgnitionTemperature(boolean active);
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ import mekanism.generators.client.gui.GuiNeutronCapture;
|
|||
import mekanism.generators.client.gui.GuiReactorController;
|
||||
import mekanism.generators.client.gui.GuiReactorFuel;
|
||||
import mekanism.generators.client.gui.GuiReactorHeat;
|
||||
import mekanism.generators.client.gui.GuiReactorStats;
|
||||
import mekanism.generators.client.gui.GuiSolarGenerator;
|
||||
import mekanism.generators.client.gui.GuiWindTurbine;
|
||||
import mekanism.generators.client.render.RenderAdvancedSolarGenerator;
|
||||
|
@ -85,6 +86,8 @@ public class GeneratorsClientProxy extends GeneratorsCommonProxy
|
|||
case 12:
|
||||
return new GuiReactorFuel(player.inventory, (TileEntityReactorController)tileEntity);
|
||||
case 13:
|
||||
return new GuiReactorStats(player.inventory, (TileEntityReactorController)tileEntity);
|
||||
case 14:
|
||||
return new GuiNeutronCapture(player.inventory, (TileEntityReactorNeutronCapture)tileEntity);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,18 +1,13 @@
|
|||
package mekanism.generators.client.gui;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.util.ListUtils;
|
||||
import mekanism.client.gui.GuiEnergyInfo;
|
||||
import mekanism.client.gui.GuiEnergyInfo.IInfoHandler;
|
||||
import mekanism.client.gui.GuiMekanism;
|
||||
import mekanism.client.gui.GuiSlot;
|
||||
import mekanism.client.gui.GuiSlot.SlotType;
|
||||
import mekanism.client.sound.SoundHandler;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.network.PacketTileEntity.TileEntityMessage;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import mekanism.generators.common.inventory.container.ContainerReactorController;
|
||||
|
@ -45,6 +40,7 @@ public class GuiReactorController extends GuiMekanism
|
|||
guiElements.add(new GuiSlot(SlotType.NORMAL, this, MekanismUtils.getResource(ResourceType.GUI, "GuiBlank.png"), 79, 38));
|
||||
guiElements.add(new GuiHeatTab(this, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiBlank.png")));
|
||||
guiElements.add(new GuiFuelTab(this, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiBlank.png")));
|
||||
guiElements.add(new GuiStatTab(this, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiBlank.png")));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -52,7 +48,7 @@ public class GuiReactorController extends GuiMekanism
|
|||
{
|
||||
super.drawGuiContainerForegroundLayer(mouseX, mouseY);
|
||||
|
||||
fontRendererObj.drawString(tileEntity.getInventoryName(), 6, 6, 0x404040);
|
||||
fontRendererObj.drawString(tileEntity.getInventoryName(), 46, 6, 0x404040);
|
||||
|
||||
if(tileEntity.getActive())
|
||||
{
|
||||
|
|
|
@ -15,15 +15,21 @@ import mekanism.client.gui.GuiMekanism;
|
|||
import mekanism.client.gui.GuiProgress;
|
||||
import mekanism.client.gui.GuiProgress.IProgressInfoHandler;
|
||||
import mekanism.client.gui.GuiProgress.ProgressBar;
|
||||
import mekanism.client.sound.SoundHandler;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.block.BlockMachine.MachineType;
|
||||
import mekanism.common.inventory.container.ContainerNull;
|
||||
import mekanism.common.network.PacketSimpleGui.SimpleGuiMessage;
|
||||
import mekanism.common.network.PacketTileEntity.TileEntityMessage;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import mekanism.generators.common.MekanismGenerators;
|
||||
import mekanism.generators.common.network.PacketGeneratorsGui.GeneratorsGuiMessage;
|
||||
import mekanism.generators.common.tile.reactor.TileEntityReactorController;
|
||||
|
||||
import net.minecraft.client.gui.GuiTextField;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
@ -91,6 +97,7 @@ public class GuiReactorFuel extends GuiMekanism
|
|||
}
|
||||
}, ProgressBar.SMALL_LEFT, this, MekanismUtils.getResource(ResourceType.GUI, "GuiTall.png"), 99, 75));
|
||||
guiElements.add(new GuiHeatTab(this, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiTall.png")));
|
||||
guiElements.add(new GuiStatTab(this, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiTall.png")));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -98,8 +105,8 @@ public class GuiReactorFuel extends GuiMekanism
|
|||
{
|
||||
super.drawGuiContainerForegroundLayer(mouseX, mouseY);
|
||||
|
||||
fontRendererObj.drawString(tileEntity.getInventoryName(), 6, 6, 0x404040);
|
||||
fontRendererObj.drawString(MekanismUtils.localize("gui.injectionRate") + ": " + (tileEntity.getReactor()==null?"None":tileEntity.getReactor().getInjectionRate()), 55, 35, 0x404040);
|
||||
fontRendererObj.drawString(tileEntity.getInventoryName(), 46, 6, 0x404040);
|
||||
fontRendererObj.drawString(MekanismUtils.localize("gui.injectionRate") + ": " + (tileEntity.getReactor() == null ? "None" : tileEntity.getReactor().getInjectionRate()), 55, 35, 0x404040);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -111,6 +118,17 @@ public class GuiReactorFuel extends GuiMekanism
|
|||
int guiHeight = (height - ySize) / 2;
|
||||
drawTexturedModalRect(guiWidth, guiHeight, 0, 0, xSize, ySize);
|
||||
|
||||
int xAxis = (mouseX - (width - xSize) / 2);
|
||||
int yAxis = (mouseY - (height - ySize) / 2);
|
||||
|
||||
if(xAxis >= 6 && xAxis <= 20 && yAxis >= 6 && yAxis <= 20)
|
||||
{
|
||||
drawTexturedModalRect(guiWidth + 6, guiHeight + 6, 176, 0, 14, 14);
|
||||
}
|
||||
else {
|
||||
drawTexturedModalRect(guiWidth + 6, guiHeight + 6, 176, 14, 14, 14);
|
||||
}
|
||||
|
||||
super.drawGuiContainerBackgroundLayer(partialTick, mouseX, mouseY);
|
||||
|
||||
injectionRateField.drawTextBox();
|
||||
|
@ -130,6 +148,19 @@ public class GuiReactorFuel extends GuiMekanism
|
|||
super.mouseClicked(mouseX, mouseY, button);
|
||||
|
||||
injectionRateField.mouseClicked(mouseX, mouseY, button);
|
||||
|
||||
int xAxis = (mouseX - (width - xSize) / 2);
|
||||
int yAxis = (mouseY - (height - ySize) / 2);
|
||||
|
||||
if(button == 0)
|
||||
{
|
||||
if(xAxis >= 6 && xAxis <= 20 && yAxis >= 6 && yAxis <= 20)
|
||||
{
|
||||
SoundHandler.playSound("gui.button.press");
|
||||
MekanismGenerators.packetHandler.sendToServer(new GeneratorsGuiMessage(Coord4D.get(tileEntity), 10));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -2,6 +2,7 @@ package mekanism.generators.client.gui;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.util.ListUtils;
|
||||
import mekanism.api.energy.IStrictEnergyStorage;
|
||||
import mekanism.client.gui.GuiEnergyGauge;
|
||||
|
@ -17,9 +18,12 @@ import mekanism.client.gui.GuiNumberGauge.INumberInfoHandler;
|
|||
import mekanism.client.gui.GuiProgress;
|
||||
import mekanism.client.gui.GuiProgress.IProgressInfoHandler;
|
||||
import mekanism.client.gui.GuiProgress.ProgressBar;
|
||||
import mekanism.client.sound.SoundHandler;
|
||||
import mekanism.common.inventory.container.ContainerNull;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import mekanism.generators.common.MekanismGenerators;
|
||||
import mekanism.generators.common.network.PacketGeneratorsGui.GeneratorsGuiMessage;
|
||||
import mekanism.generators.common.tile.reactor.TileEntityReactorController;
|
||||
|
||||
import net.minecraft.block.BlockStaticLiquid;
|
||||
|
@ -150,6 +154,7 @@ public class GuiReactorHeat extends GuiMekanism
|
|||
}
|
||||
}, Type.SMALL, this, MekanismUtils.getResource(ResourceType.GUI, "GuiTall.png"), 115, 46));
|
||||
guiElements.add(new GuiFuelTab(this, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiTall.png")));
|
||||
guiElements.add(new GuiStatTab(this, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiTall.png")));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -157,7 +162,7 @@ public class GuiReactorHeat extends GuiMekanism
|
|||
{
|
||||
super.drawGuiContainerForegroundLayer(mouseX, mouseY);
|
||||
|
||||
fontRendererObj.drawString(tileEntity.getInventoryName(), 6, 6, 0x404040);
|
||||
fontRendererObj.drawString(tileEntity.getInventoryName(), 46, 6, 0x404040);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -169,6 +174,36 @@ public class GuiReactorHeat extends GuiMekanism
|
|||
int guiHeight = (height - ySize) / 2;
|
||||
drawTexturedModalRect(guiWidth, guiHeight, 0, 0, xSize, ySize);
|
||||
|
||||
int xAxis = (mouseX - (width - xSize) / 2);
|
||||
int yAxis = (mouseY - (height - ySize) / 2);
|
||||
|
||||
if(xAxis >= 6 && xAxis <= 20 && yAxis >= 6 && yAxis <= 20)
|
||||
{
|
||||
drawTexturedModalRect(guiWidth + 6, guiHeight + 6, 176, 0, 14, 14);
|
||||
}
|
||||
else {
|
||||
drawTexturedModalRect(guiWidth + 6, guiHeight + 6, 176, 14, 14, 14);
|
||||
}
|
||||
|
||||
super.drawGuiContainerBackgroundLayer(partialTick, mouseX, mouseY);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mouseClicked(int mouseX, int mouseY, int button)
|
||||
{
|
||||
super.mouseClicked(mouseX, mouseY, button);
|
||||
|
||||
int xAxis = (mouseX - (width - xSize) / 2);
|
||||
int yAxis = (mouseY - (height - ySize) / 2);
|
||||
|
||||
if(button == 0)
|
||||
{
|
||||
if(xAxis >= 6 && xAxis <= 20 && yAxis >= 6 && yAxis <= 20)
|
||||
{
|
||||
SoundHandler.playSound("gui.button.press");
|
||||
MekanismGenerators.packetHandler.sendToServer(new GeneratorsGuiMessage(Coord4D.get(tileEntity), 10));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,111 @@
|
|||
package mekanism.generators.client.gui;
|
||||
|
||||
import java.text.NumberFormat;
|
||||
import java.util.List;
|
||||
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.util.ListUtils;
|
||||
import mekanism.client.gui.GuiEnergyInfo;
|
||||
import mekanism.client.gui.GuiEnergyInfo.IInfoHandler;
|
||||
import mekanism.client.gui.GuiMekanism;
|
||||
import mekanism.client.sound.SoundHandler;
|
||||
import mekanism.common.inventory.container.ContainerNull;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import mekanism.generators.common.MekanismGenerators;
|
||||
import mekanism.generators.common.network.PacketGeneratorsGui.GeneratorsGuiMessage;
|
||||
import mekanism.generators.common.tile.reactor.TileEntityReactorController;
|
||||
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiReactorStats extends GuiMekanism
|
||||
{
|
||||
public TileEntityReactorController tileEntity;
|
||||
public static NumberFormat nf = NumberFormat.getIntegerInstance();
|
||||
|
||||
|
||||
public GuiReactorStats(InventoryPlayer inventory, final TileEntityReactorController tentity)
|
||||
{
|
||||
super(new ContainerNull(inventory.player, tentity));
|
||||
tileEntity = tentity;
|
||||
guiElements.add(new GuiEnergyInfo(new IInfoHandler()
|
||||
{
|
||||
@Override
|
||||
public List<String> getInfo()
|
||||
{
|
||||
return ListUtils.asList(
|
||||
"Storing: " + MekanismUtils.getEnergyDisplay(tileEntity.getEnergy()),
|
||||
"Max Output: " + MekanismUtils.getEnergyDisplay(tileEntity.getMaxOutput()) + "/t");
|
||||
}
|
||||
}, this, MekanismUtils.getResource(ResourceType.GUI, "GuiTall.png")));
|
||||
guiElements.add(new GuiHeatTab(this, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiTall.png")));
|
||||
guiElements.add(new GuiFuelTab(this, tileEntity, MekanismUtils.getResource(ResourceType.GUI, "GuiTall.png")));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY)
|
||||
{
|
||||
super.drawGuiContainerForegroundLayer(mouseX, mouseY);
|
||||
|
||||
fontRendererObj.drawString(tileEntity.getInventoryName(), 46, 6, 0x404040);
|
||||
if(tileEntity.isFormed())
|
||||
{
|
||||
fontRendererObj.drawString(MekanismUtils.localize("gui.passive"), 6, 26, 0x404040);
|
||||
fontRendererObj.drawString(MekanismUtils.localize("gui.minInject") + ": " + (tileEntity.getReactor().getMinInjectionRate(false)), 16, 36, 0x404040);
|
||||
fontRendererObj.drawString(MekanismUtils.localize("gui.ignition") + ": " + (nf.format(tileEntity.getReactor().getIgnitionTemperature(false))), 16, 46, 0x404040);
|
||||
fontRendererObj.drawString(MekanismUtils.localize("gui.maxPlasma") + ": " + (nf.format(tileEntity.getReactor().getMaxPlasmaTemperature(false))), 16, 56, 0x404040);
|
||||
fontRendererObj.drawString(MekanismUtils.localize("gui.maxCasing") + ": " + (nf.format(tileEntity.getReactor().getMaxCasingTemperature(false))), 16, 66, 0x404040);
|
||||
|
||||
fontRendererObj.drawString(MekanismUtils.localize("gui.active"), 6, 86, 0x404040);
|
||||
fontRendererObj.drawString(MekanismUtils.localize("gui.minInject") + ": " + (tileEntity.getReactor().getMinInjectionRate(true)), 16, 96, 0x404040);
|
||||
fontRendererObj.drawString(MekanismUtils.localize("gui.ignition") + ": " + (nf.format(tileEntity.getReactor().getIgnitionTemperature(true))), 16, 106, 0x404040);
|
||||
fontRendererObj.drawString(MekanismUtils.localize("gui.maxPlasma") + ": " + (nf.format(tileEntity.getReactor().getMaxPlasmaTemperature(true))), 16, 116, 0x404040);
|
||||
fontRendererObj.drawString(MekanismUtils.localize("gui.maxCasing") + ": " + (nf.format(tileEntity.getReactor().getMaxCasingTemperature(true))), 16, 126, 0x404040);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float partialTick, int mouseX, int mouseY)
|
||||
{
|
||||
mc.renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.GUI, "GuiTall.png"));
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
int guiWidth = (width - xSize) / 2;
|
||||
int guiHeight = (height - ySize) / 2;
|
||||
drawTexturedModalRect(guiWidth, guiHeight, 0, 0, xSize, ySize);
|
||||
|
||||
int xAxis = (mouseX - (width - xSize) / 2);
|
||||
int yAxis = (mouseY - (height - ySize) / 2);
|
||||
|
||||
if(xAxis >= 6 && xAxis <= 20 && yAxis >= 6 && yAxis <= 20)
|
||||
{
|
||||
drawTexturedModalRect(guiWidth + 6, guiHeight + 6, 176, 0, 14, 14);
|
||||
}
|
||||
else {
|
||||
drawTexturedModalRect(guiWidth + 6, guiHeight + 6, 176, 14, 14, 14);
|
||||
}
|
||||
|
||||
super.drawGuiContainerBackgroundLayer(partialTick, mouseX, mouseY);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mouseClicked(int mouseX, int mouseY, int button)
|
||||
{
|
||||
super.mouseClicked(mouseX, mouseY, button);
|
||||
|
||||
int xAxis = (mouseX - (width - xSize) / 2);
|
||||
int yAxis = (mouseY - (height - ySize) / 2);
|
||||
|
||||
if(button == 0)
|
||||
{
|
||||
if(xAxis >= 6 && xAxis <= 20 && yAxis >= 6 && yAxis <= 20)
|
||||
{
|
||||
SoundHandler.playSound("gui.button.press");
|
||||
MekanismGenerators.packetHandler.sendToServer(new GeneratorsGuiMessage(Coord4D.get(tileEntity), 10));
|
||||
}
|
||||
|
||||
}
|
||||
}}
|
84
src/main/java/mekanism/generators/client/gui/GuiStatTab.java
Normal file
84
src/main/java/mekanism/generators/client/gui/GuiStatTab.java
Normal file
|
@ -0,0 +1,84 @@
|
|||
package mekanism.generators.client.gui;
|
||||
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.client.gui.GuiElement;
|
||||
import mekanism.client.gui.IGuiWrapper;
|
||||
import mekanism.client.sound.SoundHandler;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.network.PacketSimpleGui.SimpleGuiMessage;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import mekanism.generators.common.MekanismGenerators;
|
||||
import mekanism.generators.common.network.PacketGeneratorsGui.GeneratorsGuiMessage;
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import codechicken.lib.vec.Rectangle4i;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiStatTab extends GuiElement
|
||||
{
|
||||
TileEntity tileEntity;
|
||||
|
||||
public GuiStatTab(IGuiWrapper gui, TileEntity tile, ResourceLocation def)
|
||||
{
|
||||
super(MekanismUtils.getResource(ResourceType.GUI_ELEMENT, "GuiStatsTab.png"), gui, def);
|
||||
|
||||
tileEntity = tile;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Rectangle4i getBounds(int guiWidth, int guiHeight)
|
||||
{
|
||||
return new Rectangle4i(guiWidth - 26, guiHeight + 62, 26, 26);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderBackground(int xAxis, int yAxis, int guiWidth, int guiHeight)
|
||||
{
|
||||
mc.renderEngine.bindTexture(RESOURCE);
|
||||
|
||||
guiObj.drawTexturedRect(guiWidth - 26, guiHeight + 62, 0, 0, 26, 26);
|
||||
|
||||
if(xAxis >= -21 && xAxis <= -3 && yAxis >= 66 && yAxis <= 84)
|
||||
{
|
||||
guiObj.drawTexturedRect(guiWidth - 21, guiHeight + 66, 26, 0, 18, 18);
|
||||
}
|
||||
else {
|
||||
guiObj.drawTexturedRect(guiWidth - 21, guiHeight + 66, 26, 18, 18, 18);
|
||||
}
|
||||
|
||||
mc.renderEngine.bindTexture(defaultLocation);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderForeground(int xAxis, int yAxis)
|
||||
{
|
||||
mc.renderEngine.bindTexture(RESOURCE);
|
||||
|
||||
if(xAxis >= -21 && xAxis <= -3 && yAxis >= 66 && yAxis <= 84)
|
||||
{
|
||||
displayTooltip(MekanismUtils.localize("gui.stats"), xAxis, yAxis);
|
||||
}
|
||||
|
||||
mc.renderEngine.bindTexture(defaultLocation);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preMouseClicked(int xAxis, int yAxis, int button) {}
|
||||
|
||||
@Override
|
||||
public void mouseClicked(int xAxis, int yAxis, int button)
|
||||
{
|
||||
if(button == 0)
|
||||
{
|
||||
if(xAxis >= -21 && xAxis <= -3 && yAxis >= 66 && yAxis <= 84)
|
||||
{
|
||||
MekanismGenerators.packetHandler.sendToServer(new GeneratorsGuiMessage(Coord4D.get(tileEntity), 13));
|
||||
SoundHandler.playSound("gui.button.press");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -465,4 +465,33 @@ public class FusionReactor implements IFusionReactor
|
|||
{
|
||||
burning = burn;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMinInjectionRate(boolean active)
|
||||
{
|
||||
double k = active ? caseWaterConductivity : 0;
|
||||
double aMin = burnTemperature * burnRatio * plasmaCaseConductivity * (k+caseAirConductivity) / (energyPerFuel * burnRatio * (plasmaCaseConductivity+k+caseAirConductivity) - plasmaCaseConductivity * (k + caseAirConductivity));
|
||||
return (int)(2 * Math.ceil(aMin/2D));
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getMaxPlasmaTemperature(boolean active)
|
||||
{
|
||||
double k = active ? caseWaterConductivity : 0;
|
||||
return injectionRate * energyPerFuel/plasmaCaseConductivity * (plasmaCaseConductivity+k+caseAirConductivity) / (k+caseAirConductivity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getMaxCasingTemperature(boolean active)
|
||||
{
|
||||
double k = active ? caseWaterConductivity : 0;
|
||||
return injectionRate * energyPerFuel / (k+caseAirConductivity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getIgnitionTemperature(boolean active)
|
||||
{
|
||||
double k = active ? caseWaterConductivity : 0;
|
||||
return burnTemperature * energyPerFuel * burnRatio * (plasmaCaseConductivity+k+caseAirConductivity) / (energyPerFuel * burnRatio * (plasmaCaseConductivity+k+caseAirConductivity) - plasmaCaseConductivity * (k + caseAirConductivity));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -127,8 +127,9 @@ public class GeneratorsCommonProxy
|
|||
return new ContainerReactorController(player.inventory, (TileEntityReactorController)tileEntity);
|
||||
case 11:
|
||||
case 12:
|
||||
return new ContainerNull(player, (TileEntityReactorController)tileEntity);
|
||||
case 13:
|
||||
return new ContainerNull(player, (TileEntityReactorController)tileEntity);
|
||||
case 14:
|
||||
return new ContainerNeutronCapture(player.inventory, (TileEntityReactorNeutronCapture)tileEntity);
|
||||
}
|
||||
|
||||
|
|
|
@ -284,7 +284,7 @@ public class BlockReactor extends BlockContainer
|
|||
{
|
||||
CONTROLLER(GeneratorsBlocks.Reactor, 0, "ReactorController", 10, TileEntityReactorController.class),
|
||||
FRAME(GeneratorsBlocks.Reactor, 1, "ReactorFrame", -1, TileEntityReactorFrame.class),
|
||||
NEUTRON_CAPTURE(GeneratorsBlocks.Reactor, 2, "ReactorNeutronCapturePlate", 13, TileEntityReactorNeutronCapture.class),
|
||||
NEUTRON_CAPTURE(GeneratorsBlocks.Reactor, 2, "ReactorNeutronCapturePlate", 14, TileEntityReactorNeutronCapture.class),
|
||||
PORT(GeneratorsBlocks.Reactor, 3, "ReactorInOutPort", -1, TileEntityReactorPort.class),
|
||||
GLASS(GeneratorsBlocks.ReactorGlass, 0, "ReactorGlass", -1, TileEntityReactorGlass.class),
|
||||
LASER_FOCUS_MATRIX(GeneratorsBlocks.ReactorGlass, 1, "ReactorLaserFocusMatrix", -1, TileEntityReactorLaserFocusMatrix.class);
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 2.3 KiB |
BIN
src/main/resources/assets/mekanism/gui/elements/GuiStatsTab.png
Normal file
BIN
src/main/resources/assets/mekanism/gui/elements/GuiStatsTab.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.6 KiB |
|
@ -681,6 +681,14 @@ gui.solarGenerator.sun=Sun
|
|||
gui.bioGenerator.bioFuel=BioFuel
|
||||
gui.electrolyticSeparator.dump=Dump
|
||||
|
||||
gui.passive=Passive
|
||||
gui.active=Active
|
||||
|
||||
gui.minInject=Min. Inject Rate
|
||||
gui.ignition=Ignition Temp
|
||||
gui.maxPlasma=Max. Plasma Temp
|
||||
gui.maxCasing=Max. Casing Temp
|
||||
|
||||
//*****//
|
||||
//TOOLS//
|
||||
//*****//
|
||||
|
|
Loading…
Add table
Reference in a new issue