Added atomic disassembler energy usage to config file [#2146]

This commit is contained in:
Brian Lewis 2015-03-03 09:59:53 -06:00
parent 112c1a1ba9
commit 4d8f43dbad
4 changed files with 10 additions and 7 deletions

View file

@ -206,6 +206,7 @@ public class CommonProxy
Mekanism.FROM_H2 = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "HydrogenEnergyDensity", 200D, "THIS DETERMINES ELECTROLYTIC SEPARATOR USAGE").getDouble(200D); Mekanism.FROM_H2 = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "HydrogenEnergyDensity", 200D, "THIS DETERMINES ELECTROLYTIC SEPARATOR USAGE").getDouble(200D);
Mekanism.ETHENE_BURN_TIME = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "EthyleneBurnTime", 40).getInt(40); Mekanism.ETHENE_BURN_TIME = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "EthyleneBurnTime", 40).getInt(40);
Mekanism.ENERGY_PER_REDSTONE = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "EnergyPerRedstone", 10000D).getDouble(10000D); Mekanism.ENERGY_PER_REDSTONE = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "EnergyPerRedstone", 10000D).getDouble(10000D);
Mekanism.ATOMICDISASSEM_ENERGY_USAGE = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "AtomicDisassemblerEnergyUsage", 10).getInt(10);
Mekanism.VOICE_PORT = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "VoicePort", 36123, null, 1, 65535).getInt(); 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. //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.maxUpgradeMultiplier = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "UpgradeModifier", 10, null, 1, Integer.MAX_VALUE).getInt();

View file

@ -331,6 +331,7 @@ public class Mekanism
public static double FROM_TE; public static double FROM_TE;
public static double FROM_UE = 1/TO_UE; public static double FROM_UE = 1/TO_UE;
public static int ETHENE_BURN_TIME = 40; public static int ETHENE_BURN_TIME = 40;
public static int ATOMICDISASSEM_ENERGY_USAGE = 10;
public static boolean blacklistBC; public static boolean blacklistBC;
public static boolean blacklistIC2; public static boolean blacklistIC2;

View file

@ -9,8 +9,8 @@ import java.util.Set;
import mekanism.api.Coord4D; import mekanism.api.Coord4D;
import mekanism.api.EnumColor; import mekanism.api.EnumColor;
import mekanism.api.ListUtils; import mekanism.api.ListUtils;
import mekanism.common.Mekanism;
import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EntityLivingBase;
@ -28,8 +28,7 @@ import cpw.mods.fml.common.eventhandler.Event.Result;
public class ItemAtomicDisassembler extends ItemEnergized public class ItemAtomicDisassembler extends ItemEnergized
{ {
public double ENERGY_USAGE = 10; public double HOE_USAGE = 10 * Mekanism.ATOMICDISASSEM_ENERGY_USAGE;
public double HOE_USAGE = 100;
public ItemAtomicDisassembler() public ItemAtomicDisassembler()
{ {
@ -80,10 +79,10 @@ public class ItemAtomicDisassembler extends ItemEnergized
{ {
if(block.getBlockHardness(world, x, y, z) != 0.0D) if(block.getBlockHardness(world, x, y, z) != 0.0D)
{ {
setEnergy(itemstack, getEnergy(itemstack) - (ENERGY_USAGE*getEfficiency(itemstack))); setEnergy(itemstack, getEnergy(itemstack) - (Mekanism.ATOMICDISASSEM_ENERGY_USAGE*getEfficiency(itemstack)));
} }
else { else {
setEnergy(itemstack, getEnergy(itemstack) - (ENERGY_USAGE*(getEfficiency(itemstack))/2)); setEnergy(itemstack, getEnergy(itemstack) - (Mekanism.ATOMICDISASSEM_ENERGY_USAGE*(getEfficiency(itemstack))/2));
} }
return true; return true;
@ -125,7 +124,7 @@ public class ItemAtomicDisassembler extends ItemEnergized
for(Coord4D coord : found) for(Coord4D coord : found)
{ {
if(coord.equals(orig) || getEnergy(itemstack) < (ENERGY_USAGE*getEfficiency(itemstack))) if(coord.equals(orig) || getEnergy(itemstack) < (Mekanism.ATOMICDISASSEM_ENERGY_USAGE*getEfficiency(itemstack)))
{ {
continue; continue;
} }
@ -138,7 +137,7 @@ public class ItemAtomicDisassembler extends ItemEnergized
block2.breakBlock(player.worldObj, coord.xCoord, coord.yCoord, coord.zCoord, block, meta); block2.breakBlock(player.worldObj, coord.xCoord, coord.yCoord, coord.zCoord, block, meta);
block2.dropBlockAsItem(player.worldObj, coord.xCoord, coord.yCoord, coord.zCoord, meta, 0); block2.dropBlockAsItem(player.worldObj, coord.xCoord, coord.yCoord, coord.zCoord, meta, 0);
setEnergy(itemstack, getEnergy(itemstack) - (ENERGY_USAGE*getEfficiency(itemstack))); setEnergy(itemstack, getEnergy(itemstack) - (Mekanism.ATOMICDISASSEM_ENERGY_USAGE*getEfficiency(itemstack)));
} }
} }
} }

View file

@ -43,6 +43,7 @@ public class PacketConfigSync implements IMessageHandler<ConfigSyncMessage, IMes
dataStream.writeDouble(Mekanism.FROM_H2); dataStream.writeDouble(Mekanism.FROM_H2);
dataStream.writeInt(Mekanism.ETHENE_BURN_TIME); dataStream.writeInt(Mekanism.ETHENE_BURN_TIME);
dataStream.writeDouble(Mekanism.ENERGY_PER_REDSTONE); dataStream.writeDouble(Mekanism.ENERGY_PER_REDSTONE);
dataStream.writeInt(Mekanism.ATOMICDISASSEM_ENERGY_USAGE);
dataStream.writeInt(Mekanism.VOICE_PORT); dataStream.writeInt(Mekanism.VOICE_PORT);
dataStream.writeInt(Mekanism.maxUpgradeMultiplier); dataStream.writeInt(Mekanism.maxUpgradeMultiplier);
dataStream.writeInt(Mekanism.activeType.ordinal()); dataStream.writeInt(Mekanism.activeType.ordinal());
@ -98,6 +99,7 @@ public class PacketConfigSync implements IMessageHandler<ConfigSyncMessage, IMes
Mekanism.FROM_H2 = dataStream.readDouble(); Mekanism.FROM_H2 = dataStream.readDouble();
Mekanism.ETHENE_BURN_TIME = dataStream.readInt(); Mekanism.ETHENE_BURN_TIME = dataStream.readInt();
Mekanism.ENERGY_PER_REDSTONE = dataStream.readDouble(); Mekanism.ENERGY_PER_REDSTONE = dataStream.readDouble();
Mekanism.ATOMICDISASSEM_ENERGY_USAGE = dataStream.readInt();
Mekanism.VOICE_PORT = dataStream.readInt(); Mekanism.VOICE_PORT = dataStream.readInt();
Mekanism.maxUpgradeMultiplier = dataStream.readInt(); Mekanism.maxUpgradeMultiplier = dataStream.readInt();
Mekanism.activeType = EnergyType.values()[dataStream.readInt()]; Mekanism.activeType = EnergyType.values()[dataStream.readInt()];