Audio Refactor

1st of many audio refactors, the end goal is removing AudioManager.java and using contentAPI functions for all sound
Refactored playAudio
Refactored playGlobalAudio
Fixed lunar teleport sounds to not play if teleblocked
Refactored the following sounds:
All the special attack and DFS sounds defaulting to new API radius of 8 instead of 5
Dropping coins, item, and destroying object sounds fixed
Ectophial refill sound
Agility pyramid sounds
Emptying a fishbowl
Enchanted jewellery teleport sound
Enchanted jewellery enchant tab sound
All the sounds for Elemental Workshop 1 listeners
The sound when getting experience from a lamp
Blessing and repairing a grave
Hunter pitfall sounds
Hunter sound when catching a kebbit with a noose
Lunar cure me and cure group spell sound
High and low alchemy spells
Silver crafting at a furnace
Spinning at a spinning wheel
Drinking from a waterskin in the desert
Sound when being blessed by drezel in nature's spirit quest
Sound when poison immunity has 30 seconds left and when your immunity expires
Shearing regular sheep and the penguin sheep at lumbridge
Sound when regular spell book charge spell expires
GE sounds: making 0 coin offer when buying, not having enough money, placing a buy offer, not enough room in inventory
Sound when filling vessels from a water source
Regular and ancient combat spells
This commit is contained in:
Zerken
2023-08-20 07:21:24 +00:00
committed by Ryan
parent 7a585796be
commit a105821427
69 changed files with 180 additions and 231 deletions
@@ -9,15 +9,14 @@ import core.game.interaction.IntType
import core.game.interaction.InteractionListener
import core.game.node.entity.player.Player
import core.game.node.entity.player.link.TeleportManager
import core.game.node.entity.player.link.audio.Audio
import core.game.node.item.Item
import core.game.node.scenery.Scenery
import core.game.node.scenery.SceneryBuilder
import core.game.world.GameWorld
import core.game.world.map.Location
import core.game.world.update.flag.context.Animation
import core.tools.Log
import org.rs09.consts.Items
import org.rs09.consts.Sounds
import rs09.game.content.activity.castlewars.areas.CastleWarsWaitingArea
import java.util.*
@@ -80,7 +79,7 @@ class CastleWarsListeners : InteractionListener {
// If item is added to inventory, play pickup sound
if (addItem(player, rewardItem)) {
playAudio(player, Audio(2582))
playAudio(player, Sounds.PICK2_2582)
// Warn player inventory full using custom dialogue box
} else {
@@ -127,7 +126,7 @@ class CastleWarsListeners : InteractionListener {
// Bucket fill animation
animate(player, 832)
// Bucket fill sound
playAudio(player, Audio(2609, 1))
playAudio(player, Sounds.TAP_FILL_2609)
// Replace empty -> full water bucket
replaceSlot(player, used.asItem().slot, Item(Items.BUCKET_OF_WATER_1929))
return@onUseWith true
@@ -142,7 +141,7 @@ class CastleWarsListeners : InteractionListener {
// Delay sound to line up with "jump" movement
runTask(player, 1) {
// Play jumping sound
playAudio(player, Audio(2461))
playAudio(player, Sounds.JUMP_2461)
}
return@on true
}