Play sound on new vote.

This commit is contained in:
armored-dragon 2024-09-10 15:51:41 -05:00
parent 2b48831cb7
commit e428f3be82
No known key found for this signature in database
GPG key ID: C7207ACC3382AD8B
2 changed files with 2 additions and 1 deletions

Binary file not shown.

View file

@ -13,7 +13,6 @@
// TODO: Documentation
// TODO: Allow host voting
// TODO: Sound for new vote
// TODO: Debug mode?
// FIXME: Handle ties
@ -391,6 +390,8 @@
// TODO: This is still silly. Try using UUIDs per prompt and check if we are answering the same question by id?
// Don't recreate the prompt if we already have the matching question
if (message.prompt.question == poll.question) return;
const newPollSound = SoundCache.getSound(Script.resolvePath("./sound/new_vote.mp3"))
Audio.playSystemSound(newPollSound, {volume: 0.5});
_emitEvent({type: "poll_prompt", prompt: message.prompt});
poll.question = message.prompt.question;