mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-06-30 21:42:20 +02:00
Added soundName to HeldItem (possibly useless)
This commit is contained in:
parent
8d63f06de2
commit
c607a73ebc
@ -2694,7 +2694,7 @@ export default class BattleScene extends SceneBase {
|
|||||||
if (!ignoreUpdate) {
|
if (!ignoreUpdate) {
|
||||||
this.updateModifiers(pokemon.isPlayer());
|
this.updateModifiers(pokemon.isPlayer());
|
||||||
}
|
}
|
||||||
const soundName = modifier.type.soundName;
|
const soundName = allHeldItems[heldItemId].soundName;
|
||||||
if (playSound && !this.sound.get(soundName)) {
|
if (playSound && !this.sound.get(soundName)) {
|
||||||
this.playSound(soundName);
|
this.playSound(soundName);
|
||||||
}
|
}
|
||||||
@ -2769,7 +2769,7 @@ export default class BattleScene extends SceneBase {
|
|||||||
this.updateModifiers(source.isPlayer());
|
this.updateModifiers(source.isPlayer());
|
||||||
}
|
}
|
||||||
|
|
||||||
const soundName = modifier.type.soundName;
|
const soundName = allHeldItems[heldItemId].soundName;
|
||||||
if (playSound && !this.sound.get(soundName)) {
|
if (playSound && !this.sound.get(soundName)) {
|
||||||
this.playSound(soundName);
|
this.playSound(soundName);
|
||||||
}
|
}
|
||||||
|
@ -46,6 +46,9 @@ export class HeldItem {
|
|||||||
public isStealable = true;
|
public isStealable = true;
|
||||||
public isSuppressable = 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) {
|
constructor(type: HeldItemId, maxStackCount = 1) {
|
||||||
this.type = type;
|
this.type = type;
|
||||||
this.maxStackCount = maxStackCount;
|
this.maxStackCount = maxStackCount;
|
||||||
|
Loading…
Reference in New Issue
Block a user