mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-24 22:04:49 +00:00
Make the sound config options apply again.
This commit is contained in:
1 parent
05c7e63c55
commit
779759ac1e
4 files changed
+10
-5
No files matched your search
@@ -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;
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user