api: add sound volume accessors and vars

This commit is contained in:
Adam
2019-09-21 12:40:20 -04:00
parent ba0c2cc84a
commit 1705fa642c
2 changed files with 41 additions and 1 deletions

View File

@@ -944,6 +944,42 @@ public interface Client extends GameEngine
*/
List<GraphicsObject> getGraphicsObjects();
/**
* Gets the music volume
* @return volume 0-255 inclusive
*/
int getMusicVolume();
/**
* Sets the music volume
* @param volume 0-255 inclusive
*/
void setMusicVolume(int volume);
/**
* Gets the sound effect volume
* @return volume 0-127 inclusive
*/
int getSoundEffectVolume();
/**
* Sets the sound effect volume
* @param volume 0-127 inclusive
*/
void setSoundEffectVolume(int volume);
/**
* Gets the area sound effect volume
* @return volume 0-127 inclusive
*/
int getAreaSoundEffectVolume();
/**
* Sets the area sound effect volume
* @param volume 0-127 inclusive
*/
void setAreaSoundEffectVolume(int volume);
/**
* Play a sound effect at the player's current location. This is how UI,
* and player-generated (e.g. mining, woodcutting) sound effects are

View File

@@ -162,7 +162,11 @@ public enum VarPlayer
MUSIC_TRACKS_UNLOCKED_16(1009),
MUSIC_TRACKS_UNLOCKED_17(1338),
MUSIC_TRACKS_UNLOCKED_18(1681),
MUSIC_TRACKS_UNLOCKED_19(2065);
MUSIC_TRACKS_UNLOCKED_19(2065),
MUSIC_VOLUME(168),
SOUND_EFFECT_VOLUME(169),
AREA_EFFECT_VOLUME(872);
private final int id;
}