[WIP] Play Sounds in the new Client (#9012)
* move audioThemes to content - add audio settings * copy audioFiles to website/static/audio - playSounds on $emit() * Play Sounds for Rewards, Purchasing Items / Quests * remove shop http-api calls * play reward sound when buying gem * fix lint / always show mysterybox
This commit is contained in:
@@ -417,6 +417,22 @@ export default {
|
||||
return;
|
||||
}
|
||||
|
||||
switch (this.task.type) {
|
||||
case 'habit':
|
||||
this.$root.$emit('playSound', direction === 'up' ? 'Plus_Habit' : 'Minus_Habit');
|
||||
break;
|
||||
case 'todo':
|
||||
this.$root.$emit('playSound', 'Todo');
|
||||
break;
|
||||
case 'daily':
|
||||
this.$root.$emit('playSound', 'Daily');
|
||||
break;
|
||||
case 'reward':
|
||||
this.$root.$emit('playSound', 'Reward');
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
if (task.group.approval.required) task.group.approval.requested = true;
|
||||
|
||||
const response = await axios.post(`/api/v3/tasks/${task._id}/score/${direction}`);
|
||||
@@ -443,7 +459,8 @@ export default {
|
||||
if (drop) {
|
||||
let text;
|
||||
let type;
|
||||
// TODO $rootScope.playSound('Item_Drop');
|
||||
|
||||
this.$root.$emit('playSound', 'Item_Drop');
|
||||
|
||||
// Note: For Mystery Item gear, drop.type will be 'head', 'armor', etc
|
||||
// so we use drop.notificationType below.
|
||||
|
||||
Reference in New Issue
Block a user