mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-22 10:55:19 -04:00
Hid the misc tab until you have unlocked defense of plainswood, and by extension, the forest.
This commit is contained in:
parent
81569a5501
commit
afe590c5cc
2 changed files with 5 additions and 1 deletions
app
|
@ -13,7 +13,7 @@
|
|||
|
||||
ul.nav.nav-pills.nav-stacked
|
||||
for category, index in itemCategories
|
||||
li(class=index ? "" : "active")
|
||||
li(class=index ? "" : "active", id=category + '-tab')
|
||||
a.one-line(href="#item-category-" + category, data-toggle="tab")
|
||||
img.tab-icon(src="/images/pages/play/modal/item-icon-"+category+".png", draggable="false")
|
||||
span.big-font= itemCategoryNames[index]
|
||||
|
|
|
@ -7,6 +7,7 @@ BuyGemsModal = require 'views/play/modal/BuyGemsModal'
|
|||
CocoCollection = require 'collections/CocoCollection'
|
||||
ThangType = require 'models/ThangType'
|
||||
LevelComponent = require 'models/LevelComponent'
|
||||
Level = require 'models/Level'
|
||||
Purchase = require 'models/Purchase'
|
||||
|
||||
utils = require 'core/utils'
|
||||
|
@ -120,6 +121,9 @@ module.exports = class PlayItemsModal extends ModalView
|
|||
@itemDetailsView = new ItemDetailsView()
|
||||
@insertSubView(@itemDetailsView)
|
||||
@$el.find("a[href='#item-category-armor']").click() # Start on armor tab, if it's there.
|
||||
earnedLevels = me.get('earned')?.levels or []
|
||||
if Level.levels['defense-of-plainswood'] not in earnedLevels
|
||||
@$el.find('#misc-tab').hide()
|
||||
|
||||
onHidden: ->
|
||||
super()
|
||||
|
|
Loading…
Reference in a new issue