mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2026-08-23 03:15:10 -06:00
sound overhaul for origami & balloon minigame
This commit is contained in:
parent
673e011127
commit
63af11240a
2 changed files with 21 additions and 16 deletions
|
|
@ -66,15 +66,13 @@ class BalloonFlightInterface : InterfaceListener {
|
|||
private const val STARTING_SANDBAGS = 8
|
||||
private const val STARTING_LOGS = 10
|
||||
|
||||
private const val SOUND_RED_ROPE_3239 = 3239
|
||||
private const val SOUND_WIND_3240 = 3240
|
||||
private const val SOUND_ROPE_3242 = 3242
|
||||
private const val SOUND_BALLOON_MOVE_3246 = 3246
|
||||
private const val SOUND_RELAX_3247 = 3247
|
||||
private const val SOUND_SANDBAG_3249 = 3249
|
||||
private const val SOUND_BURN_LOG_3251 = 3251
|
||||
private const val SOUND_RELAX_3247 = 3247
|
||||
private const val SOUND_ROPE_3242 = 3242
|
||||
private const val SOUND_RED_ROPE_3239 = 3239
|
||||
// cant find source material for using these two:
|
||||
// zep_construct=3248
|
||||
// zep_hammering_1=3250
|
||||
|
||||
|
||||
private const val MUSIC_FLOATING_FREE_206 = 206
|
||||
|
||||
|
|
@ -250,7 +248,7 @@ class BalloonFlightInterface : InterfaceListener {
|
|||
return
|
||||
}
|
||||
|
||||
playControlSound(player, buttonId)
|
||||
playControlSounds(player, buttonId)
|
||||
if (!moveBalloon(player, move)) {
|
||||
return
|
||||
}
|
||||
|
|
@ -456,16 +454,17 @@ class BalloonFlightInterface : InterfaceListener {
|
|||
)
|
||||
}
|
||||
|
||||
private fun playControlSound(player: Player, buttonId: Int) {
|
||||
val sound = when (buttonId) {
|
||||
BalloonFlightRoutes.BUTTON_SANDBAG -> SOUND_SANDBAG_3249
|
||||
BalloonFlightRoutes.BUTTON_BURN_LOG -> SOUND_BURN_LOG_3251
|
||||
BalloonFlightRoutes.BUTTON_RELAX -> SOUND_RELAX_3247
|
||||
BalloonFlightRoutes.BUTTON_NORMAL_ROPE -> SOUND_ROPE_3242
|
||||
BalloonFlightRoutes.BUTTON_RED_ROPE -> SOUND_RED_ROPE_3239
|
||||
private fun playControlSounds(player: Player, buttonId: Int) {
|
||||
val sounds = when (buttonId) {
|
||||
BalloonFlightRoutes.BUTTON_SANDBAG -> intArrayOf(SOUND_SANDBAG_3249)
|
||||
BalloonFlightRoutes.BUTTON_BURN_LOG -> intArrayOf(SOUND_BURN_LOG_3251)
|
||||
BalloonFlightRoutes.BUTTON_RELAX -> intArrayOf(SOUND_BALLOON_MOVE_3246, SOUND_RELAX_3247)
|
||||
BalloonFlightRoutes.BUTTON_NORMAL_ROPE -> intArrayOf(SOUND_ROPE_3242, SOUND_WIND_3240)
|
||||
BalloonFlightRoutes.BUTTON_RED_ROPE -> intArrayOf(SOUND_RED_ROPE_3239)
|
||||
else -> return
|
||||
}
|
||||
playAudio(player, sound)
|
||||
|
||||
sounds.forEach { playAudio(player, it) }
|
||||
}
|
||||
|
||||
private fun hideMinimap(player: Player) {
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import core.api.animate
|
|||
import core.api.freeSlots
|
||||
import core.api.getQuestStage
|
||||
import core.api.openDialogue
|
||||
import core.api.playAudio
|
||||
import core.api.removeItem
|
||||
import core.api.rewardXP
|
||||
import core.api.sendMessage
|
||||
|
|
@ -32,6 +33,9 @@ import org.rs09.consts.Scenery
|
|||
*/
|
||||
|
||||
class EnlightenedJourneyListeners : InteractionListener, MapArea {
|
||||
companion object {
|
||||
private const val SOUND_CONSTRUCT_3248 = 3248
|
||||
}
|
||||
|
||||
override fun defineListeners() {
|
||||
/** Make balloon structure. */
|
||||
|
|
@ -45,6 +49,7 @@ class EnlightenedJourneyListeners : InteractionListener, MapArea {
|
|||
removeItem(player, Item(Items.PAPYRUS_970, 1))
|
||||
removeItem(player, Item(Items.BALL_OF_WOOL_1759, 1))
|
||||
addItem(player, Items.BALLOON_STRUCTURE_9933, 1)
|
||||
playAudio(player, SOUND_CONSTRUCT_3248)
|
||||
sendMessage(player, "You create the origami balloon structure.")
|
||||
}
|
||||
return@onUseWith true
|
||||
|
|
@ -61,6 +66,7 @@ class EnlightenedJourneyListeners : InteractionListener, MapArea {
|
|||
removeItem(player, Item(Items.CANDLE_36, 1))
|
||||
removeItem(player, Item(Items.BALLOON_STRUCTURE_9933, 1))
|
||||
addItem(player, Items.ORIGAMI_BALLOON_9934, 1)
|
||||
playAudio(player, SOUND_CONSTRUCT_3248)
|
||||
rewardXP(player, Skills.CRAFTING, 35.0)
|
||||
sendMessage(player, "You create an origami balloon.")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue