Adjusted numbers, everything is now nice and balanced
This commit is contained in:
parent
f09010a927
commit
1071f2fb4d
12 changed files with 43 additions and 28 deletions
|
@ -62,6 +62,7 @@ public class MekanismConfig
|
|||
public static double evaporationSolarMultiplier = 0.2;
|
||||
public static double evaporationMaxTemp = 3000;
|
||||
public static double energyPerHeat = 1000;
|
||||
public static double maxEnergyPerSteam = 100;
|
||||
public static double superheatingHeatTransfer = 10000;
|
||||
}
|
||||
|
||||
|
@ -139,7 +140,6 @@ public class MekanismConfig
|
|||
public static int windGenerationMaxY;
|
||||
|
||||
public static int turbineBladesPerCoil;
|
||||
public static double turbineBaseEnergyPerSteam;
|
||||
public static double turbineVentGasFlow;
|
||||
public static double turbineDisperserGasFlow;
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@ import mekanism.client.gui.element.GuiHeatInfo;
|
|||
import mekanism.client.gui.element.GuiRateBar;
|
||||
import mekanism.client.gui.element.GuiRateBar.IRateInfoHandler;
|
||||
import mekanism.client.render.MekanismRenderer;
|
||||
import mekanism.common.content.boiler.SynchronizedBoilerData;
|
||||
import mekanism.common.inventory.container.ContainerFilter;
|
||||
import mekanism.common.tile.TileEntityBoilerCasing;
|
||||
import mekanism.common.util.LangUtils;
|
||||
|
@ -47,9 +48,7 @@ public class GuiThermoelectricBoiler extends GuiMekanism
|
|||
@Override
|
||||
public double getLevel()
|
||||
{
|
||||
double max = Math.floor(tileEntity.structure.clientHeatAvailable / tileEntity.structure.enthalpyOfVaporization);
|
||||
|
||||
return (double)tileEntity.structure.lastBoilRate/max;
|
||||
return (double)tileEntity.structure.lastBoilRate/(double)tileEntity.structure.lastMaxBoil;
|
||||
}
|
||||
}, MekanismUtils.getResource(ResourceType.GUI, "GuiThermoelectricBoiler.png"), 24, 13));
|
||||
guiElements.add(new GuiRateBar(this, new IRateInfoHandler()
|
||||
|
@ -57,17 +56,14 @@ public class GuiThermoelectricBoiler extends GuiMekanism
|
|||
@Override
|
||||
public String getTooltip()
|
||||
{
|
||||
int max = (int)Math.floor(tileEntity.structure.clientHeatAvailable / tileEntity.structure.enthalpyOfVaporization);
|
||||
|
||||
return LangUtils.localize("gui.maxBoil") + ": " + max + " mB/t";
|
||||
return LangUtils.localize("gui.maxBoil") + ": " + tileEntity.structure.lastMaxBoil + " mB/t";
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getLevel()
|
||||
{
|
||||
double max = Math.floor(tileEntity.structure.clientHeatAvailable / tileEntity.structure.enthalpyOfVaporization);
|
||||
double cap = (tileEntity.structure.superheatingElements*general.superheatingHeatTransfer) / tileEntity.structure.enthalpyOfVaporization;
|
||||
return max/cap;
|
||||
double cap = (tileEntity.structure.superheatingElements*general.superheatingHeatTransfer) / SynchronizedBoilerData.getHeatEnthalpy();
|
||||
return (double)tileEntity.structure.lastMaxBoil/cap;
|
||||
}
|
||||
}, MekanismUtils.getResource(ResourceType.GUI, "GuiThermoelectricBoiler.png"), 144, 13));
|
||||
guiElements.add(new GuiHeatInfo(new IInfoHandler() {
|
||||
|
@ -89,11 +85,9 @@ public class GuiThermoelectricBoiler extends GuiMekanism
|
|||
fontRendererObj.drawString(LangUtils.localize("container.inventory"), 8, (ySize - 96) + 4, 0x404040);
|
||||
fontRendererObj.drawString(tileEntity.getInventoryName(), (xSize/2)-(fontRendererObj.getStringWidth(tileEntity.getInventoryName())/2), 5, 0x404040);
|
||||
|
||||
double max = (int)Math.floor(tileEntity.structure.clientHeatAvailable / tileEntity.structure.enthalpyOfVaporization);
|
||||
|
||||
renderScaledText(LangUtils.localize("gui.temp") + ": " + MekanismUtils.getTemperatureDisplay(tileEntity.structure.temperature, TemperatureUnit.AMBIENT), 43, 30, 0x00CD00, 90);
|
||||
renderScaledText(LangUtils.localize("gui.boilRate") + ": " + tileEntity.structure.lastBoilRate + " mB/t", 43, 39, 0x00CD00, 90);
|
||||
renderScaledText(LangUtils.localize("gui.maxBoil") + ": " + max + " mB/t", 43, 48, 0x00CD00, 90);
|
||||
renderScaledText(LangUtils.localize("gui.maxBoil") + ": " + tileEntity.structure.lastMaxBoil + " mB/t", 43, 48, 0x00CD00, 90);
|
||||
|
||||
if(xAxis >= 7 && xAxis <= 23 && yAxis >= 14 && yAxis <= 72)
|
||||
{
|
||||
|
|
|
@ -282,6 +282,8 @@ public class CommonProxy implements IGuiProvider
|
|||
general.evaporationSolarMultiplier = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "EvaporationSolarMultiplier", 0.2D).getDouble();
|
||||
general.evaporationMaxTemp = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "EvaporationMaxTemp", 3000D).getDouble();
|
||||
general.energyPerHeat = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "EnergyPerHeat", 1000D).getDouble();
|
||||
general.maxEnergyPerSteam = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "MaxEnergyPerSteam", 100D).getDouble();
|
||||
general.superheatingHeatTransfer = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "SuperheatingHeatTransfer", 10000D).getDouble();
|
||||
|
||||
general.blacklistIC2 = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "BlacklistIC2Power", false).getBoolean();
|
||||
general.blacklistRF = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "BlacklistRFPower", false).getBoolean();
|
||||
|
|
|
@ -28,16 +28,13 @@ public class SynchronizedBoilerData extends SynchronizedData<SynchronizedBoilerD
|
|||
|
||||
public double lastEnvironmentLoss;
|
||||
public int lastBoilRate;
|
||||
|
||||
public double clientHeatAvailable;
|
||||
public int lastMaxBoil;
|
||||
|
||||
public double temperature;
|
||||
|
||||
public double heatToAbsorb;
|
||||
|
||||
public double heatCapacity = 1000;
|
||||
|
||||
public double enthalpyOfVaporization = 10;
|
||||
|
||||
public int superheatingElements;
|
||||
|
||||
|
@ -53,6 +50,14 @@ public class SynchronizedBoilerData extends SynchronizedData<SynchronizedBoilerD
|
|||
|
||||
public Set<ValveData> valves = new HashSet<ValveData>();
|
||||
|
||||
/**
|
||||
* @return how much heat energy is needed to convert one unit of water into steam
|
||||
*/
|
||||
public static double getHeatEnthalpy()
|
||||
{
|
||||
return general.maxEnergyPerSteam/general.energyPerHeat;
|
||||
}
|
||||
|
||||
public double getHeatAvailable()
|
||||
{
|
||||
double heatAvailable = (temperature-BASE_BOIL_TEMP)*locations.size();
|
||||
|
|
|
@ -68,6 +68,9 @@ public class PacketConfigSync implements IMessageHandler<ConfigSyncMessage, IMes
|
|||
dataStream.writeDouble(general.evaporationTempMultiplier);
|
||||
dataStream.writeDouble(general.evaporationSolarMultiplier);
|
||||
dataStream.writeDouble(general.evaporationMaxTemp);
|
||||
dataStream.writeDouble(general.energyPerHeat);
|
||||
dataStream.writeDouble(general.maxEnergyPerSteam);
|
||||
dataStream.writeDouble(general.superheatingHeatTransfer);
|
||||
|
||||
for(MachineType type : MachineType.getValidMachines())
|
||||
{
|
||||
|
@ -151,6 +154,9 @@ public class PacketConfigSync implements IMessageHandler<ConfigSyncMessage, IMes
|
|||
general.evaporationTempMultiplier = dataStream.readDouble();
|
||||
general.evaporationSolarMultiplier = dataStream.readDouble();
|
||||
general.evaporationMaxTemp = dataStream.readDouble();
|
||||
general.energyPerHeat = dataStream.readDouble();
|
||||
general.maxEnergyPerSteam = dataStream.readDouble();
|
||||
general.superheatingHeatTransfer = dataStream.readDouble();
|
||||
|
||||
for(MachineType type : MachineType.getValidMachines())
|
||||
{
|
||||
|
|
|
@ -129,7 +129,10 @@ public class TileEntityBoilerCasing extends TileEntityMultiblock<SynchronizedBoi
|
|||
{
|
||||
int steamAmount = structure.steamStored != null ? structure.steamStored.amount : 0;
|
||||
double heatAvailable = structure.getHeatAvailable();
|
||||
int amountToBoil = Math.min((int)Math.floor(heatAvailable / structure.enthalpyOfVaporization), structure.waterStored.amount);
|
||||
|
||||
structure.lastMaxBoil = (int)Math.floor(heatAvailable / SynchronizedBoilerData.getHeatEnthalpy());
|
||||
|
||||
int amountToBoil = Math.min(structure.lastMaxBoil, structure.waterStored.amount);
|
||||
amountToBoil = Math.min(amountToBoil, (structure.steamVolume*BoilerUpdateProtocol.STEAM_PER_TANK)-steamAmount);
|
||||
structure.waterStored.amount -= amountToBoil;
|
||||
|
||||
|
@ -141,10 +144,12 @@ public class TileEntityBoilerCasing extends TileEntityMultiblock<SynchronizedBoi
|
|||
structure.steamStored.amount += amountToBoil;
|
||||
}
|
||||
|
||||
structure.temperature -= (amountToBoil*SynchronizedBoilerData.getHeatEnthalpy())/structure.locations.size();
|
||||
structure.lastBoilRate = amountToBoil;
|
||||
}
|
||||
else {
|
||||
structure.lastBoilRate = 0;
|
||||
structure.lastMaxBoil = 0;
|
||||
}
|
||||
|
||||
structure.prevWater = structure.waterStored;
|
||||
|
@ -208,7 +213,7 @@ public class TileEntityBoilerCasing extends TileEntityMultiblock<SynchronizedBoi
|
|||
data.add(structure.lastBoilRate);
|
||||
data.add(structure.superheatingElements);
|
||||
data.add(structure.temperature);
|
||||
data.add(Math.max(0, structure.getHeatAvailable()));
|
||||
data.add(structure.lastMaxBoil);
|
||||
|
||||
if(structure.waterStored != null)
|
||||
{
|
||||
|
@ -271,7 +276,7 @@ public class TileEntityBoilerCasing extends TileEntityMultiblock<SynchronizedBoi
|
|||
structure.lastBoilRate = dataStream.readInt();
|
||||
structure.superheatingElements = dataStream.readInt();
|
||||
structure.temperature = dataStream.readDouble();
|
||||
structure.clientHeatAvailable = dataStream.readDouble();
|
||||
structure.lastMaxBoil = dataStream.readInt();
|
||||
|
||||
if(dataStream.readInt() == 1)
|
||||
{
|
||||
|
|
|
@ -2,6 +2,7 @@ package mekanism.generators.client.gui;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import mekanism.api.MekanismConfig.general;
|
||||
import mekanism.api.MekanismConfig.generators;
|
||||
import mekanism.api.util.ListUtils;
|
||||
import mekanism.client.gui.GuiMekanism;
|
||||
|
@ -17,6 +18,7 @@ import mekanism.common.util.MekanismUtils;
|
|||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import mekanism.generators.client.gui.element.GuiTurbineTab;
|
||||
import mekanism.generators.client.gui.element.GuiTurbineTab.TurbineTab;
|
||||
import mekanism.generators.common.content.turbine.TurbineUpdateProtocol;
|
||||
import mekanism.generators.common.tile.turbine.TileEntityTurbineCasing;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
@ -59,7 +61,7 @@ public class GuiIndustrialTurbine extends GuiMekanism
|
|||
@Override
|
||||
public List<String> getInfo()
|
||||
{
|
||||
double energyMultiplier = generators.turbineBaseEnergyPerSteam*Math.min(tileEntity.structure.blades, tileEntity.structure.coils*generators.turbineBladesPerCoil);
|
||||
double energyMultiplier = (general.maxEnergyPerSteam/TurbineUpdateProtocol.MAX_BLADES)*Math.min(tileEntity.structure.blades, tileEntity.structure.coils*generators.turbineBladesPerCoil);
|
||||
|
||||
return ListUtils.asList(
|
||||
LangUtils.localize("gui.storing") + ": " + MekanismUtils.getEnergyDisplay(tileEntity.getEnergy()),
|
||||
|
@ -77,7 +79,7 @@ public class GuiIndustrialTurbine extends GuiMekanism
|
|||
fontRendererObj.drawString(LangUtils.localize("container.inventory"), 8, (ySize - 96) + 4, 0x404040);
|
||||
fontRendererObj.drawString(tileEntity.getInventoryName(), (xSize/2)-(fontRendererObj.getStringWidth(tileEntity.getInventoryName())/2), 5, 0x404040);
|
||||
|
||||
double energyMultiplier = generators.turbineBaseEnergyPerSteam*Math.min(tileEntity.structure.blades, tileEntity.structure.coils*generators.turbineBladesPerCoil);
|
||||
double energyMultiplier = (general.maxEnergyPerSteam/TurbineUpdateProtocol.MAX_BLADES)*Math.min(tileEntity.structure.blades, tileEntity.structure.coils*generators.turbineBladesPerCoil);
|
||||
|
||||
double rate = tileEntity.structure.lowerVolume*(tileEntity.structure.clientDispersers*generators.turbineDisperserGasFlow);
|
||||
rate = Math.min(rate, tileEntity.structure.vents*generators.turbineVentGasFlow);
|
||||
|
|
|
@ -3,6 +3,7 @@ package mekanism.generators.client.gui;
|
|||
import java.util.List;
|
||||
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.api.MekanismConfig.general;
|
||||
import mekanism.api.MekanismConfig.generators;
|
||||
import mekanism.api.util.ListUtils;
|
||||
import mekanism.client.gui.GuiMekanism;
|
||||
|
@ -14,6 +15,7 @@ import mekanism.common.util.MekanismUtils;
|
|||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import mekanism.generators.client.gui.element.GuiTurbineTab;
|
||||
import mekanism.generators.client.gui.element.GuiTurbineTab.TurbineTab;
|
||||
import mekanism.generators.common.content.turbine.TurbineUpdateProtocol;
|
||||
import mekanism.generators.common.tile.turbine.TileEntityTurbineCasing;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
|
@ -37,7 +39,7 @@ public class GuiTurbineStats extends GuiMekanism
|
|||
@Override
|
||||
public List<String> getInfo()
|
||||
{
|
||||
double energyMultiplier = generators.turbineBaseEnergyPerSteam*Math.min(tileEntity.structure.blades, tileEntity.structure.coils*generators.turbineBladesPerCoil);
|
||||
double energyMultiplier = (general.maxEnergyPerSteam/TurbineUpdateProtocol.MAX_BLADES)*Math.min(tileEntity.structure.blades, tileEntity.structure.coils*generators.turbineBladesPerCoil);
|
||||
|
||||
return ListUtils.asList(
|
||||
LangUtils.localize("gui.storing") + ": " + MekanismUtils.getEnergyDisplay(tileEntity.getEnergy()),
|
||||
|
@ -75,7 +77,7 @@ public class GuiTurbineStats extends GuiMekanism
|
|||
fontRendererObj.drawString(LangUtils.localize("gui.blades") + ": " + tileEntity.structure.blades + (bladesLimiting ? limiting : ""), 14, 81, 0x404040);
|
||||
fontRendererObj.drawString(LangUtils.localize("gui.coils") + ": " + tileEntity.structure.coils + (coilsLimiting ? limiting : ""), 14, 90, 0x404040);
|
||||
|
||||
double energyMultiplier = generators.turbineBaseEnergyPerSteam*Math.min(tileEntity.structure.blades, tileEntity.structure.coils*generators.turbineBladesPerCoil);
|
||||
double energyMultiplier = (general.maxEnergyPerSteam/TurbineUpdateProtocol.MAX_BLADES)*Math.min(tileEntity.structure.blades, tileEntity.structure.coils*generators.turbineBladesPerCoil);
|
||||
double rate = tileEntity.structure.lowerVolume*(tileEntity.structure.clientDispersers*generators.turbineDisperserGasFlow);
|
||||
rate = Math.min(rate, tileEntity.structure.vents*generators.turbineVentGasFlow);
|
||||
|
||||
|
|
|
@ -100,7 +100,6 @@ public class GeneratorsCommonProxy implements IGuiProvider
|
|||
loadWindConfiguration();
|
||||
|
||||
generators.turbineBladesPerCoil = Mekanism.configuration.get("generation", "TurbineBladesPerCoil", 4).getInt();
|
||||
generators.turbineBaseEnergyPerSteam = Mekanism.configuration.get("generation", "TurbineBaseEnergyPerSteam", 10D).getDouble();
|
||||
generators.turbineVentGasFlow = Mekanism.configuration.get("generation", "TurbineVentGasFlow", 16000D).getDouble();
|
||||
generators.turbineDisperserGasFlow = Mekanism.configuration.get("generation", "TurbineDisperserGasFlow", 640D).getDouble();
|
||||
|
||||
|
|
|
@ -208,7 +208,6 @@ public class MekanismGenerators implements IModule
|
|||
dataStream.writeInt(generators.windGenerationMaxY);
|
||||
|
||||
dataStream.writeInt(generators.turbineBladesPerCoil);
|
||||
dataStream.writeDouble(generators.turbineBaseEnergyPerSteam);
|
||||
dataStream.writeDouble(generators.turbineVentGasFlow);
|
||||
dataStream.writeDouble(generators.turbineDisperserGasFlow);
|
||||
}
|
||||
|
@ -230,7 +229,6 @@ public class MekanismGenerators implements IModule
|
|||
generators.windGenerationMaxY = dataStream.readInt();
|
||||
|
||||
generators.turbineBladesPerCoil = dataStream.readInt();
|
||||
generators.turbineBaseEnergyPerSteam = dataStream.readDouble();
|
||||
generators.turbineVentGasFlow = dataStream.readDouble();
|
||||
generators.turbineDisperserGasFlow = dataStream.readDouble();
|
||||
}
|
||||
|
|
|
@ -25,6 +25,7 @@ import net.minecraftforge.common.util.ForgeDirection;
|
|||
public class TurbineUpdateProtocol extends UpdateProtocol<SynchronizedTurbineData>
|
||||
{
|
||||
public static final int FLUID_PER_TANK = TankUpdateProtocol.FLUID_PER_TANK;
|
||||
public static final int MAX_BLADES = 28;
|
||||
|
||||
public TurbineUpdateProtocol(TileEntityTurbineCasing tileEntity)
|
||||
{
|
||||
|
|
|
@ -5,6 +5,7 @@ import io.netty.buffer.ByteBuf;
|
|||
import java.util.ArrayList;
|
||||
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.MekanismConfig.general;
|
||||
import mekanism.api.MekanismConfig.generators;
|
||||
import mekanism.api.Range4D;
|
||||
import mekanism.api.energy.IStrictEnergyStorage;
|
||||
|
@ -63,7 +64,7 @@ public class TileEntityTurbineCasing extends TileEntityMultiblock<SynchronizedTu
|
|||
|
||||
if(stored > 0 && getEnergy() < structure.getEnergyCapacity())
|
||||
{
|
||||
double energyMultiplier = generators.turbineBaseEnergyPerSteam*Math.min(structure.blades, structure.coils*generators.turbineBladesPerCoil);
|
||||
double energyMultiplier = (general.maxEnergyPerSteam/TurbineUpdateProtocol.MAX_BLADES)*Math.min(structure.blades, structure.coils*generators.turbineBladesPerCoil);
|
||||
double rate = structure.lowerVolume*(structure.getDispersers()*generators.turbineDisperserGasFlow);
|
||||
rate = Math.min(rate, structure.vents*generators.turbineVentGasFlow);
|
||||
|
||||
|
|
Loading…
Reference in a new issue