add config for salination plant water transformation per update
This commit is contained in:
parent
1523b402b3
commit
986e0ac1b4
3 changed files with 5 additions and 4 deletions
|
@ -207,7 +207,8 @@ public class CommonProxy
|
|||
Mekanism.VOICE_PORT = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "VoicePort", 36123, null, 1, 65535).getInt();
|
||||
//If this is less than 1, upgrades make machines worse. If less than 0, I don't even know.
|
||||
Mekanism.maxUpgradeMultiplier = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "UpgradeModifier", 10, null, 1, Integer.MAX_VALUE).getInt();
|
||||
|
||||
Mekanism.salinationPlantWaterUsage = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "SalinationPlantSpeed", 40.0, "Millibuckets of water turned into brine by the plant per tick", 1.0, 9000.0).getDouble();
|
||||
|
||||
String s = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "EnergyType", "J", null, new String[]{"J", "RF", "MJ", "EU"}).getString();
|
||||
|
||||
if(s != null)
|
||||
|
|
|
@ -355,6 +355,7 @@ public class Mekanism
|
|||
public static double seismicVibratorUsage;
|
||||
public static double pressurizedReactionBaseUsage;
|
||||
public static double fluidicPlenisherUsage;
|
||||
public static double salinationPlantWaterUsage;
|
||||
|
||||
/**
|
||||
* Adds all in-game crafting, smelting and machine recipes.
|
||||
|
|
|
@ -33,7 +33,6 @@ public class TileEntitySalinationController extends TileEntitySalinationTank
|
|||
public static final int MAX_BRINE = 10000;
|
||||
public static final int MAX_SOLARS = 4;
|
||||
public static final int WARMUP = 10000;
|
||||
public static final double WATER_USAGE = 40;
|
||||
|
||||
public FluidTank waterTank = new FluidTank(0);
|
||||
public FluidTank brineTank = new FluidTank(MAX_BRINE);
|
||||
|
@ -93,14 +92,14 @@ public class TileEntitySalinationController extends TileEntitySalinationTank
|
|||
int brineNeeded = brineTank.getCapacity()-brineTank.getFluidAmount();
|
||||
int waterStored = waterTank.getFluidAmount();
|
||||
|
||||
partialWater += Math.min(waterTank.getFluidAmount(), getTemperature()*WATER_USAGE);
|
||||
partialWater += Math.min(waterTank.getFluidAmount(), getTemperature()*Mekanism.salinationPlantWaterUsage);
|
||||
|
||||
if(partialWater >= 1)
|
||||
{
|
||||
int waterInt = (int)Math.floor(partialWater);
|
||||
waterTank.drain(waterInt, true);
|
||||
partialWater %= 1;
|
||||
partialBrine += ((double)waterInt)/WATER_USAGE;
|
||||
partialBrine += ((double)waterInt)/Mekanism.salinationPlantWaterUsage;
|
||||
}
|
||||
|
||||
if(partialBrine >= 1)
|
||||
|
|
Loading…
Reference in a new issue