WIP(multiassign): resume shared completion implementation

This commit is contained in:
SabreCat
2021-11-11 16:32:30 -06:00
parent 1f81e1971b
commit fa99458ca4
7 changed files with 80 additions and 120 deletions

View File

@@ -15,24 +15,8 @@ export default {
}),
},
methods: {
async beforeTaskScore (task) {
const { user } = this;
if (this.castingSpell) return false;
if (task.group.approval.required && !task.group.approval.approved) {
task.group.approval.requested = true;
const { data: groupPlans } = await this.$store.dispatch('guilds:getGroupPlans');
const groupPlan = groupPlans.find(g => g.id === task.group.id);
if (groupPlan) {
const managers = Object.keys(groupPlan.managers);
managers.push(groupPlan.leader);
if (managers.indexOf(user._id) !== -1) {
task.group.approval.approved = true;
}
}
}
return true;
async beforeTaskScore () {
return (!this.castingSpell);
},
playTaskScoreSound (task, direction) {
switch (task.type) { // eslint-disable-line default-case