Make the sound config options apply again.

This commit is contained in:
Ben Spiers 2014-08-30 02:37:02 +01:00
parent 05c7e63c55
commit 779759ac1e
4 changed files with 10 additions and 5 deletions

View file

@ -40,9 +40,10 @@ public class MekanismConfig
public static class client
{
public static boolean enablePlayerSounds = true;
public static boolean enableMachineSounds = true;
public static boolean fancyUniversalCableRender = true;
public static boolean holidays = true;
public static double baseSoundVolume = 1;
public static float baseSoundVolume = 1F;
public static boolean machineEffects = true;
public static boolean oldTransmitterRender = false;
public static boolean replaceSoundsWhenResuming = true;

View file

@ -180,10 +180,11 @@ public class ClientProxy extends CommonProxy
{
super.loadConfiguration();
client.enablePlayerSounds = Mekanism.configuration.get("client", "EnableSounds", true).getBoolean(true);
client.enablePlayerSounds = Mekanism.configuration.get("client", "EnablePlayerSounds", true).getBoolean(true);
client.enableMachineSounds = Mekanism.configuration.get("client", "EnableMachineSounds", true).getBoolean(true);
client.fancyUniversalCableRender = Mekanism.configuration.get("client", "FancyUniversalCableRender", true).getBoolean(true);
client.holidays = Mekanism.configuration.get("client", "Holidays", true).getBoolean(true);
client.baseSoundVolume = Mekanism.configuration.get("client", "SoundVolume", 1D).getDouble(1D);
client.baseSoundVolume = (float)Mekanism.configuration.get("client", "SoundVolume", 1D).getDouble(1D);
client.machineEffects = Mekanism.configuration.get("client", "MachineEffects", true).getBoolean(true);
client.oldTransmitterRender = Mekanism.configuration.get("client", "OldTransmitterRender", false).getBoolean();
client.replaceSoundsWhenResuming = Mekanism.configuration.get("client", "ReplaceSoundsWhenResuming", true,

View file

@ -1,5 +1,7 @@
package mekanism.client.sound;
import mekanism.api.MekanismConfig.client;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@ -136,7 +138,7 @@ public class Sound implements ISound {
@Override
public float getVolume() {
return volume;
return volume * client.baseSoundVolume;
}
@Override

View file

@ -1,5 +1,6 @@
package mekanism.common.tile;
import mekanism.api.MekanismConfig.client;
import mekanism.api.Pos3D;
import mekanism.client.sound.IHasSound;
import mekanism.client.sound.IResettableSound;
@ -104,7 +105,7 @@ public abstract class TileEntityNoisyElectricBlock extends TileEntityElectricBlo
@Override
public void onUpdate()
{
if(worldObj.isRemote && shouldPlaySound() && SoundHandler.canRestartSound(sound))
if(worldObj.isRemote && shouldPlaySound() && SoundHandler.canRestartSound(sound) && client.enableMachineSounds)
{
sound.reset();
SoundHandler.playSound(sound);