Made hero attribute reactive and iterated inventory UI
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user