1
0
forked from noxious/client

Replaced walk sound, removed redundant logic, removed emits in favour of using mapEditor directly (less logic), added soundStorage clear to reset cmd

This commit is contained in:
2025-02-09 21:54:21 +01:00
parent 3bcb16fa9c
commit 82a854e647
6 changed files with 29 additions and 36 deletions

View File

@ -2,7 +2,7 @@
<Debug />
<Notifications />
<BackgroundImageLoader />
<GmPanel v-if="gameStore.character?.role === 'gm'" @open-map-editor="mapEditor.toggleActive" />
<GmPanel v-if="gameStore.character?.role === 'gm'" />
<component :is="currentScreen" />
</template>
@ -48,10 +48,9 @@ addEventListener('click', (event) => {
const classList = ['btn-cyan', 'btn-red', 'btn-indigo', 'btn-empty', 'btn-sound']
const target = event.target as HTMLElement
// console.log(target) // Uncomment to log the clicked element
if (!classList.some((className) => target.classList.contains(className))) {
return // Only play sound if the clicked element is a button
if (classList.some((className) => target.classList.contains(className))) {
playSound('/assets/sounds/button-click.wav')
}
playSound('/assets/sounds/button-click.wav')
})
// Watch for "G" key press and toggle the gm panel