net worth calculations now take into account your containers' values
This commit is contained in:
@@ -44,6 +44,12 @@ Template.inventory.helpers({
|
|||||||
).forEach(function(item){
|
).forEach(function(item){
|
||||||
worth += item.totalValue();
|
worth += item.totalValue();
|
||||||
});
|
});
|
||||||
|
Containers.find(
|
||||||
|
{charId: this._id},
|
||||||
|
{fields: {value : 1}}
|
||||||
|
).forEach(function(container) {
|
||||||
|
if(container.value) worth += container.value;
|
||||||
|
})
|
||||||
return worth;
|
return worth;
|
||||||
},
|
},
|
||||||
weightCarried: function(){
|
weightCarried: function(){
|
||||||
|
|||||||
Reference in New Issue
Block a user