mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-29 02:25:37 -05:00
Merge branch 'master' into production
This commit is contained in:
commit
330f917013
2 changed files with 4 additions and 4 deletions
|
@ -81,7 +81,7 @@ module.exports = class WorldMapView extends RootView
|
||||||
$('body').append($('<img src="http://code.org/api/hour/begin_codecombat.png" style="visibility: hidden;">'))
|
$('body').append($('<img src="http://code.org/api/hour/begin_codecombat.png" style="visibility: hidden;">'))
|
||||||
trackedHourOfCode = true
|
trackedHourOfCode = true
|
||||||
|
|
||||||
@requiresSubscription = @terrain isnt 'dungeon' and not me.isPremium()
|
@requiresSubscription = not me.isPremium()
|
||||||
|
|
||||||
destroy: ->
|
destroy: ->
|
||||||
@setupManager?.destroy()
|
@setupManager?.destroy()
|
||||||
|
|
|
@ -528,18 +528,18 @@ module.exports = class InventoryModal extends ModalView
|
||||||
|
|
||||||
#- Paper doll equipment updating
|
#- Paper doll equipment updating
|
||||||
onEquipmentChanged: ->
|
onEquipmentChanged: ->
|
||||||
|
heroClass = @selectedHero?.get('heroClass') ? 'Warrior'
|
||||||
|
gender = if @selectedHero?.get('slug') in heroGenders.male then 'male' else 'female'
|
||||||
|
@$el.find('#hero-image, #hero-image-hair, #hero-image-head, #hero-image-thumb').removeClass().addClass "#{gender} #{heroClass}"
|
||||||
equipment = @getCurrentEquipmentConfig()
|
equipment = @getCurrentEquipmentConfig()
|
||||||
return unless _.size(equipment) and @supermodel.finished()
|
return unless _.size(equipment) and @supermodel.finished()
|
||||||
@removeDollImages()
|
@removeDollImages()
|
||||||
heroClass = @selectedHero?.get('heroClass') ? 'Warrior'
|
|
||||||
gender = if @selectedHero?.get('slug') in heroGenders.male then 'male' else 'female'
|
|
||||||
slotsWithImages = []
|
slotsWithImages = []
|
||||||
for slot, original of equipment
|
for slot, original of equipment
|
||||||
item = _.find @items.models, (item) -> item.get('original') is original
|
item = _.find @items.models, (item) -> item.get('original') is original
|
||||||
continue unless dollImages = item?.get('dollImages')
|
continue unless dollImages = item?.get('dollImages')
|
||||||
didAdd = @addDollImage slot, dollImages, heroClass, gender
|
didAdd = @addDollImage slot, dollImages, heroClass, gender
|
||||||
slotsWithImages.push slot if didAdd
|
slotsWithImages.push slot if didAdd
|
||||||
@$el.find('#hero-image, #hero-image-hair, #hero-image-head, #hero-image-thumb').removeClass().addClass "#{gender} #{heroClass}"
|
|
||||||
@$el.find('#hero-image-hair').toggle not ('head' in slotsWithImages)
|
@$el.find('#hero-image-hair').toggle not ('head' in slotsWithImages)
|
||||||
@$el.find('#hero-image-thumb').toggle not ('gloves' in slotsWithImages)
|
@$el.find('#hero-image-thumb').toggle not ('gloves' in slotsWithImages)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue