Implemented a new playAudio function in ContentAPI.kt

Implemented a new Send function in AudioManager.java
Implemented KBD lair teleport levers lever operating sound using the new playAudio function
Implemented KBD lair teleport levers pulling animation
This commit is contained in:
Zerken
2023-06-21 15:12:24 +00:00
committed by Ryan
parent cef956722a
commit e0f99de75b
3 changed files with 34 additions and 1 deletions
+15
View File
@@ -818,6 +818,21 @@ fun playAudio(player: Player, audio: Audio, global: Boolean = false) {
player.audioManager.send(audio, global)
}
/**
* Plays the given Audio for the given Entity
* @param player the player to play the audio for
* @param audio the audio to play
* @param volume the volume
* @param delay the delay
* @param global if other nearby entities should be able to hear it
* @param location the location where the audio will play
* @param radius the distance the audio can be heard from the given location
*/
@JvmOverloads
fun playAudio(player: Player, audio: Int, volume: Int = 10, delay: Int = 0, global: Boolean = false, location: Location? = null, radius: Int = 15) {
player.audioManager.send(audio, volume, delay, global, location, radius)
}
/**
* Opens a dialogue with the given dialogue key or dialogue file, depending which is passed.
* @param player the player to open the dialogue for