mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-22 10:55:19 -04:00
Can now equip a second ring slot.
This commit is contained in:
parent
9471beafd9
commit
50eed15eed
1 changed files with 6 additions and 1 deletions
|
@ -260,7 +260,12 @@ module.exports = class InventoryModal extends ModalView
|
|||
selectedItem = @items.get(selectedItemEl.data('item-id'))
|
||||
return unless selectedItem
|
||||
allowedSlots = selectedItem.getAllowedSlots()
|
||||
slotEl = @$el.find(".item-slot[data-slot='#{allowedSlots[0]}']")
|
||||
firstSlot = unequippedSlot = null
|
||||
for allowedSlot in allowedSlots
|
||||
slotEl = @$el.find(".item-slot[data-slot='#{allowedSlot}']")
|
||||
firstSlot ?= slotEl
|
||||
unequippedSlot ?= slotEl unless slotEl.find('img').length
|
||||
slotEl = unequippedSlot ? firstSlot
|
||||
selectedItemEl.effect('transfer', to: slotEl, duration: 500, easing: 'easeOutCubic')
|
||||
unequipped = @unequipItemFromSlot(slotEl)
|
||||
selectedItemEl.addClass('equipped')
|
||||
|
|
Loading…
Reference in a new issue