mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-14 05:55:00 -04:00
Impossible to select another slot and hide the available item the arrow is requiring you to equip.
This commit is contained in:
parent
2e3755d2b9
commit
184e4c124a
1 changed files with 4 additions and 1 deletions
|
@ -166,6 +166,7 @@ module.exports = class InventoryView extends CocoView
|
|||
@onSelectionChanged()
|
||||
|
||||
onItemSlotClick: (e) ->
|
||||
return if @remainingRequiredEquipment?.length # Don't let them select a slot if we need them to first equip some require gear.
|
||||
slot = $(e.target).closest('.item-slot')
|
||||
wasActive = slot.hasClass('selected')
|
||||
@unselectAllSlots()
|
||||
|
@ -237,7 +238,9 @@ module.exports = class InventoryView extends CocoView
|
|||
if itemID is itemIDToUnequip
|
||||
unequipped = $(el).removeClass('equipped')
|
||||
break
|
||||
@requireLevelEquipment() if unequipped
|
||||
if unequipped
|
||||
@clearSelection()
|
||||
@requireLevelEquipment()
|
||||
return unequipped
|
||||
|
||||
equipSelectedItemToSlot: (slot) ->
|
||||
|
|
Loading…
Add table
Reference in a new issue