Made hero attribute reactive and iterated inventory UI

This commit is contained in:
Thaum
2015-02-03 10:47:16 +00:00
parent 4377da5275
commit aa9cfbf04e
13 changed files with 86 additions and 44 deletions

View File

@@ -23,7 +23,7 @@ Containers.helpers({
},
totalWeight: function(){
var weight = this.weight;
Items.find({container: this._id, equipped: false}, {fields: {weight: 1, value: 1}}).forEach(function(item){
Items.find({container: this._id, equipped: false}, {fields: {quantity: 1, weight: 1}}).forEach(function(item){
weight += item.totalWeight();
});
return weight;