Configurable gas storage capacities for flamethrower, jetpack & scuba tank

This commit is contained in:
aidancbrady 2015-06-30 15:01:14 -07:00
parent 8fb0209a11
commit e86df43477
6 changed files with 17 additions and 6 deletions

View file

@ -53,6 +53,9 @@ public class MekanismConfig
public static boolean aestheticWorldDamage;
public static boolean opsBypassRestrictions;
public static double solarEvaporationSpeed;
public static int maxJetpackGas;
public static int maxScubaGas;
public static int maxFlamethrowerGas;
}
public static class client

View file

@ -260,6 +260,9 @@ public class CommonProxy
general.aestheticWorldDamage = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "AestheticWorldDamage", true).getBoolean();
general.opsBypassRestrictions = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "OpsBypassRestrictions", true).getBoolean();
general.solarEvaporationSpeed = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "SolarEvaporationSpeed", 1.0D).getDouble();
general.maxJetpackGas = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "MaxJetpackGas", 24000).getInt();
general.maxScubaGas = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "MaxScubaGas", 24000).getInt();
general.maxFlamethrowerGas = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "MaxFlamethrowerGas", 24000).getInt();
general.blacklistIC2 = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "BlacklistIC2Power", false).getBoolean();
general.blacklistRF = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "BlacklistRFPower", false).getBoolean();

View file

@ -2,6 +2,7 @@ package mekanism.common.item;
import java.util.List;
import mekanism.api.MekanismConfig.general;
import mekanism.api.gas.Gas;
import mekanism.api.gas.GasRegistry;
import mekanism.api.gas.GasStack;
@ -18,7 +19,6 @@ import cpw.mods.fml.relauncher.SideOnly;
public class ItemFlamethrower extends ItemMekanism implements IGasItem
{
public int MAX_GAS = 24000;
public int TRANSFER_RATE = 16;
public ItemFlamethrower()
@ -55,7 +55,7 @@ public class ItemFlamethrower extends ItemMekanism implements IGasItem
@Override
public int getMaxGas(ItemStack itemstack)
{
return MAX_GAS;
return general.maxFlamethrowerGas;
}
@Override

View file

@ -31,7 +31,6 @@ import cpw.mods.fml.relauncher.SideOnly;
public class ItemJetpack extends ItemArmor implements IGasItem, ISpecialArmor
{
public int MAX_GAS = 24000;
public int TRANSFER_RATE = 16;
public ItemJetpack()
@ -105,7 +104,7 @@ public class ItemJetpack extends ItemArmor implements IGasItem, ISpecialArmor
@Override
public int getMaxGas(ItemStack itemstack)
{
return MAX_GAS;
return general.maxJetpackGas;
}
@Override

View file

@ -3,6 +3,7 @@ package mekanism.common.item;
import java.util.List;
import mekanism.api.EnumColor;
import mekanism.api.MekanismConfig.general;
import mekanism.api.gas.Gas;
import mekanism.api.gas.GasRegistry;
import mekanism.api.gas.GasStack;
@ -27,7 +28,6 @@ import cpw.mods.fml.relauncher.SideOnly;
public class ItemScubaTank extends ItemArmor implements IGasItem
{
public int MAX_GAS = 24000;
public int TRANSFER_RATE = 16;
public ItemScubaTank()
@ -98,7 +98,7 @@ public class ItemScubaTank extends ItemArmor implements IGasItem
@Override
public int getMaxGas(ItemStack itemstack)
{
return MAX_GAS;
return general.maxScubaGas;
}
@Override

View file

@ -59,6 +59,9 @@ public class PacketConfigSync implements IMessageHandler<ConfigSyncMessage, IMes
dataStream.writeBoolean(general.aestheticWorldDamage);
dataStream.writeBoolean(general.opsBypassRestrictions);
dataStream.writeDouble(general.solarEvaporationSpeed);
dataStream.writeInt(general.maxJetpackGas);
dataStream.writeInt(general.maxScubaGas);
dataStream.writeInt(general.maxFlamethrowerGas);
for(MachineType type : MachineType.getValidMachines())
{
@ -133,6 +136,9 @@ public class PacketConfigSync implements IMessageHandler<ConfigSyncMessage, IMes
general.aestheticWorldDamage = dataStream.readBoolean();
general.opsBypassRestrictions = dataStream.readBoolean();
general.solarEvaporationSpeed = dataStream.readDouble();
general.maxJetpackGas = dataStream.readInt();
general.maxScubaGas = dataStream.readInt();
general.maxFlamethrowerGas = dataStream.readInt();
for(MachineType type : MachineType.getValidMachines())
{