Add upgrade modifier config
This commit is contained in:
parent
4964c1689f
commit
fa10c2ecb1
3 changed files with 5 additions and 3 deletions
|
@ -190,6 +190,7 @@ public class CommonProxy
|
|||
Mekanism.TO_BC = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "MJToJoules", .04D).getDouble(.04D);
|
||||
Mekanism.ENERGY_PER_REDSTONE = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "EnergyPerRedstone", 10000D).getDouble(10000D);
|
||||
Mekanism.VOICE_PORT = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "VoicePort", 36123).getInt();
|
||||
Mekanism.upgradeModifier = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL,"UpgradeModifier", 10).getInt();
|
||||
|
||||
Mekanism.TO_TE = Mekanism.TO_BC*10;
|
||||
Mekanism.FROM_TE = Mekanism.FROM_BC/10;
|
||||
|
|
|
@ -264,6 +264,7 @@ public class Mekanism
|
|||
public static int obsidianTNTDelay = 100;
|
||||
public static int UPDATE_DELAY = 10;
|
||||
public static int VOICE_PORT = 36123;
|
||||
public static int upgradeModifier = 10;
|
||||
public static double ENERGY_PER_REDSTONE = 10000;
|
||||
|
||||
public static double TO_IC2;
|
||||
|
|
|
@ -606,7 +606,7 @@ public final class MekanismUtils
|
|||
*/
|
||||
public static int getTicks(int speedUpgrade, int def)
|
||||
{
|
||||
return (int)(def * Math.pow(10, (-speedUpgrade/9.0)));
|
||||
return (int)(def * Math.pow(Mekanism.upgradeModifier, (-speedUpgrade/(double)(Mekanism.upgradeModifier-1))));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -618,7 +618,7 @@ public final class MekanismUtils
|
|||
*/
|
||||
public static double getEnergyPerTick(int speedUpgrade, int energyUpgrade, double def)
|
||||
{
|
||||
return def * Math.pow(10, ((speedUpgrade-energyUpgrade)/9.0));
|
||||
return def * Math.pow(Mekanism.upgradeModifier, ((speedUpgrade-energyUpgrade)/(double)(Mekanism.upgradeModifier-1)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -629,7 +629,7 @@ public final class MekanismUtils
|
|||
*/
|
||||
public static double getMaxEnergy(int energyUpgrade, double def)
|
||||
{
|
||||
return def * Math.pow(10, (energyUpgrade/9.0));
|
||||
return def * Math.pow(Mekanism.upgradeModifier, (energyUpgrade/(double)(Mekanism.upgradeModifier-1)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue