Added toggle for always playing music
This commit is contained in:
@@ -164,8 +164,11 @@ public class SoundControl{
|
||||
//this just fades out the last track to make way for ingame music
|
||||
silence();
|
||||
|
||||
//play music at intervals
|
||||
if(Time.timeSinceMillis(lastPlayed) > 1000 * musicInterval / 60f){
|
||||
if(Core.settings.getBool("alwaysmusic")){
|
||||
if(current == null){
|
||||
playRandom();
|
||||
}
|
||||
}else if(Time.timeSinceMillis(lastPlayed) > 1000 * musicInterval / 60f){
|
||||
//chance to play it per interval
|
||||
if(Mathf.chance(musicChance)){
|
||||
lastPlayed = Time.millis();
|
||||
|
||||
@@ -297,6 +297,7 @@ public class SettingsMenuDialog extends BaseDialog{
|
||||
}
|
||||
|
||||
void addSettings(){
|
||||
sound.checkPref("alwaysmusic", false);
|
||||
sound.sliderPref("musicvol", 100, 0, 100, 1, i -> i + "%");
|
||||
sound.sliderPref("sfxvol", 100, 0, 100, 1, i -> i + "%");
|
||||
sound.sliderPref("ambientvol", 100, 0, 100, 1, i -> i + "%");
|
||||
|
||||
Reference in New Issue
Block a user