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:
@ -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
|
||||
|
Reference in New Issue
Block a user