Make the sound config options apply again.
This commit is contained in:
parent
05c7e63c55
commit
779759ac1e
4 changed files with 10 additions and 5 deletions
|
@ -40,9 +40,10 @@ public class MekanismConfig
|
||||||
public static class client
|
public static class client
|
||||||
{
|
{
|
||||||
public static boolean enablePlayerSounds = true;
|
public static boolean enablePlayerSounds = true;
|
||||||
|
public static boolean enableMachineSounds = true;
|
||||||
public static boolean fancyUniversalCableRender = true;
|
public static boolean fancyUniversalCableRender = true;
|
||||||
public static boolean holidays = true;
|
public static boolean holidays = true;
|
||||||
public static double baseSoundVolume = 1;
|
public static float baseSoundVolume = 1F;
|
||||||
public static boolean machineEffects = true;
|
public static boolean machineEffects = true;
|
||||||
public static boolean oldTransmitterRender = false;
|
public static boolean oldTransmitterRender = false;
|
||||||
public static boolean replaceSoundsWhenResuming = true;
|
public static boolean replaceSoundsWhenResuming = true;
|
||||||
|
|
|
@ -180,10 +180,11 @@ public class ClientProxy extends CommonProxy
|
||||||
{
|
{
|
||||||
super.loadConfiguration();
|
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.fancyUniversalCableRender = Mekanism.configuration.get("client", "FancyUniversalCableRender", true).getBoolean(true);
|
||||||
client.holidays = Mekanism.configuration.get("client", "Holidays", 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.machineEffects = Mekanism.configuration.get("client", "MachineEffects", true).getBoolean(true);
|
||||||
client.oldTransmitterRender = Mekanism.configuration.get("client", "OldTransmitterRender", false).getBoolean();
|
client.oldTransmitterRender = Mekanism.configuration.get("client", "OldTransmitterRender", false).getBoolean();
|
||||||
client.replaceSoundsWhenResuming = Mekanism.configuration.get("client", "ReplaceSoundsWhenResuming", true,
|
client.replaceSoundsWhenResuming = Mekanism.configuration.get("client", "ReplaceSoundsWhenResuming", true,
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
package mekanism.client.sound;
|
package mekanism.client.sound;
|
||||||
|
|
||||||
|
import mekanism.api.MekanismConfig.client;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
|
@ -136,7 +138,7 @@ public class Sound implements ISound {
|
||||||
@Override
|
@Override
|
||||||
public float getVolume() {
|
public float getVolume() {
|
||||||
|
|
||||||
return volume;
|
return volume * client.baseSoundVolume;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package mekanism.common.tile;
|
package mekanism.common.tile;
|
||||||
|
|
||||||
|
import mekanism.api.MekanismConfig.client;
|
||||||
import mekanism.api.Pos3D;
|
import mekanism.api.Pos3D;
|
||||||
import mekanism.client.sound.IHasSound;
|
import mekanism.client.sound.IHasSound;
|
||||||
import mekanism.client.sound.IResettableSound;
|
import mekanism.client.sound.IResettableSound;
|
||||||
|
@ -104,7 +105,7 @@ public abstract class TileEntityNoisyElectricBlock extends TileEntityElectricBlo
|
||||||
@Override
|
@Override
|
||||||
public void onUpdate()
|
public void onUpdate()
|
||||||
{
|
{
|
||||||
if(worldObj.isRemote && shouldPlaySound() && SoundHandler.canRestartSound(sound))
|
if(worldObj.isRemote && shouldPlaySound() && SoundHandler.canRestartSound(sound) && client.enableMachineSounds)
|
||||||
{
|
{
|
||||||
sound.reset();
|
sound.reset();
|
||||||
SoundHandler.playSound(sound);
|
SoundHandler.playSound(sound);
|
||||||
|
|
Loading…
Reference in a new issue