1
0
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:
John Cleaver 2016-04-11 23:21:07 -04:00
parent bf8fd39c48
commit ad537b1435

View File

@ -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;
}
}
});