mirror of
https://github.com/kihashi/stardew_community_checklist.git
synced 2025-10-19 08:03:17 +00:00
Added a function to determine if an item is complete.
This commit is contained in:
parent
bf8fd39c48
commit
ad537b1435
9
main.js
9
main.js
@ -133,6 +133,15 @@ var v = new Vue({
|
||||
return this.static.bundles
|
||||
.filter(function(b){ return b.room === roomId; })
|
||||
.reduce(function(p, c){ return p + Math.min(v.user_data[c.id].length, c.items_required); }, 0);
|
||||
},
|
||||
isCompleted: function (item) {
|
||||
for(i=0; i < item.bundles.length; i++){
|
||||
if(!this.isItemInBundle(item.bundles[i], item.id, i)){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user