mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-27 06:23:41 -04:00
Sorting items by tier instead of gems so that the unlock order will be consistent, and so that we can show the Ring of Speed early despite its high price.
This commit is contained in:
parent
2c0bf2fef1
commit
c701ca9eb0
2 changed files with 2 additions and 2 deletions
app/views
|
@ -72,7 +72,7 @@ module.exports = class InventoryModal extends ModalView
|
|||
@itemGroups.availableItems = new Backbone.Collection()
|
||||
@itemGroups.restrictedItems = new Backbone.Collection()
|
||||
@itemGroups.lockedItems = new Backbone.Collection()
|
||||
itemGroup.comparator = ((m) -> m.get('gems') ? m.get('tier')) for itemGroup in _.values @itemGroups
|
||||
itemGroup.comparator = ((m) -> m.get('tier') ? m.get('gems')) for itemGroup in _.values @itemGroups
|
||||
|
||||
equipped = _.values(@equipment)
|
||||
@sortItem(item, equipped) for item in @items.models
|
||||
|
|
|
@ -87,7 +87,7 @@ module.exports = class PlayItemsModal extends ModalView
|
|||
category = slotToCategory[model.getAllowedSlots()[0]] or 'misc'
|
||||
@itemCategoryCollections[category] ?= new Backbone.Collection()
|
||||
collection = @itemCategoryCollections[category]
|
||||
collection.comparator = (m) -> m.get('gems') ? m.get('tier')
|
||||
collection.comparator = (m) -> m.get('tier') ? m.get('gems')
|
||||
collection.add(model)
|
||||
model.name = utils.i18n model.attributes, 'name'
|
||||
model.affordable = cost <= gemsOwned
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue