Equipment ordered by color, name

This commit is contained in:
Thaum
2015-03-11 08:16:39 +00:00
parent a387ce1c8b
commit 297e54cdc2
2 changed files with 2 additions and 10 deletions

View File

@@ -30,11 +30,6 @@
<div class="caption">{{round equipmentWeight}}lbs</div>
</div>
<div flex class="equipmentMain">
{{#if armor}}
{{#with armor}}
{{>inventoryItem}}
{{/with}}
{{/if}}
{{#each equipment}}
{{>inventoryItem}}
{{/each}}

View File

@@ -7,13 +7,10 @@ Template.inventory.helpers({
return Containers.find({charId: this._id}, {sort: {color: 1, name: 1}})
},
items: function(charId, containerId){
return Items.find({charId: charId, equipped: false, container: containerId }, {sort: {color: 1, name: 1}})
},
armor: function(){
return Items.findOne({ charId: this._id, equipped: true, equipmentSlot: "armor" })
return Items.find({charId: charId, equipped: false, container: containerId }, {sort: {color: 1, name: 1}});
},
equipment: function(){
return Items.find({ charId: this._id, equipped: true, equipmentSlot: {$ne: "armor"} })
return Items.find({ charId: this._id, equipped: true }, {sort: {color: 1, name: 1}});
},
showAddButtons: function(){
return Template.instance().showAddButtons.get();