diff --git a/src/features/world/containers/BumpkinContainer.ts b/src/features/world/containers/BumpkinContainer.ts index 79596a41d5d..d5cc5d4cbc0 100644 --- a/src/features/world/containers/BumpkinContainer.ts +++ b/src/features/world/containers/BumpkinContainer.ts @@ -12,6 +12,10 @@ import { InventoryItemName } from "features/game/types/game"; import { ITEM_DETAILS } from "features/game/types/images"; import { ITEM_IDS } from "features/game/types/bumpkin"; import { CONFIG } from "lib/config"; +import { + AudioLocalStorageKeys, + getCachedAudioSetting, +} from "features/game/lib/audio"; const NAME_ALIASES: Partial> = { "pumpkin' pete": "pete", @@ -691,7 +695,14 @@ export class BumpkinContainer extends Phaser.GameObjects.Container { ) { try { this.sprite.anims.play(this.digAnimationKey as string, true); - this.scene.sound.play("dig", { volume: 0.1 }); + const audioMuted = getCachedAudioSetting( + AudioLocalStorageKeys.audioMuted, + false, + ); + + if (!audioMuted) { + this.scene.sound.play("dig", { volume: 0.1 }); + } } catch (e) { // eslint-disable-next-line no-console console.log("Bumpkin Container: Error playing dig animation: ", e); @@ -707,7 +718,14 @@ export class BumpkinContainer extends Phaser.GameObjects.Container { ) { try { this.sprite.anims.play(this.drillAnimationKey as string, true); - this.scene.sound.play("drill", { volume: 0.1 }); + const audioMuted = getCachedAudioSetting( + AudioLocalStorageKeys.audioMuted, + false, + ); + + if (!audioMuted) { + this.scene.sound.play("drill", { volume: 0.1 }); + } } catch (e) { // eslint-disable-next-line no-console console.log("Bumpkin Container: Error playing drill animation: ", e);