From c607a73ebce1abb22af959096fbc008a34cb2941 Mon Sep 17 00:00:00 2001 From: Wlowscha <54003515+Wlowscha@users.noreply.github.com> Date: Mon, 9 Jun 2025 13:39:25 +0200 Subject: [PATCH] Added soundName to HeldItem (possibly useless) --- src/battle-scene.ts | 4 ++-- src/items/held-item.ts | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/battle-scene.ts b/src/battle-scene.ts index 19eca6fd4cc..bf6bd4833dc 100644 --- a/src/battle-scene.ts +++ b/src/battle-scene.ts @@ -2694,7 +2694,7 @@ export default class BattleScene extends SceneBase { if (!ignoreUpdate) { this.updateModifiers(pokemon.isPlayer()); } - const soundName = modifier.type.soundName; + const soundName = allHeldItems[heldItemId].soundName; if (playSound && !this.sound.get(soundName)) { this.playSound(soundName); } @@ -2769,7 +2769,7 @@ export default class BattleScene extends SceneBase { this.updateModifiers(source.isPlayer()); } - const soundName = modifier.type.soundName; + const soundName = allHeldItems[heldItemId].soundName; if (playSound && !this.sound.get(soundName)) { this.playSound(soundName); } diff --git a/src/items/held-item.ts b/src/items/held-item.ts index bf5d92653df..96ff712a0c6 100644 --- a/src/items/held-item.ts +++ b/src/items/held-item.ts @@ -46,6 +46,9 @@ export class HeldItem { public isStealable = true; public isSuppressable = true; + //TODO: If this is actually never changed by any subclass, perhaps it should not be here + public soundName = "se/restore"; + constructor(type: HeldItemId, maxStackCount = 1) { this.type = type; this.maxStackCount = maxStackCount;