Merge branch 'master' into production

This commit is contained in:
Nick Winter 2014-12-07 18:51:05 -08:00
commit cf3aebc1d8
33 changed files with 156 additions and 42 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View file

@ -77,6 +77,13 @@ initializeUtilityServices = ->
require('core/services/segmentio')() require('core/services/segmentio')()
setupConsoleLogging = -> setupConsoleLogging = ->
# IE9 doesn't expose console object unless debugger tools are loaded
unless console?
window.console =
info: ->
log: ->
error: ->
debug: ->
unless console.debug unless console.debug
# Needed for IE10 and earlier # Needed for IE10 and earlier
console.debug = console.log console.debug = console.log

View file

@ -19,6 +19,13 @@ class CocoModel extends Backbone.Model
@on 'error', @onError, @ @on 'error', @onError, @
@on 'add', @onLoaded, @ @on 'add', @onLoaded, @
@saveBackup = _.debounce(@saveBackup, 500) @saveBackup = _.debounce(@saveBackup, 500)
# IE9 doesn't expose console object unless debugger tools are loaded
unless console?
window.console =
info: ->
log: ->
error: ->
debug: ->
console.debug = console.log unless console.debug # Needed for IE10 and earlier console.debug = console.log unless console.debug # Needed for IE10 and earlier
setProjection: (project) -> setProjection: (project) ->

View file

@ -95,7 +95,7 @@ $user-achievements-scale: 0.8
padding: $overall-scale * 24px $overall-scale * 30px $overall-scale * 20px $overall-scale * 60px padding: $overall-scale * 24px $overall-scale * 30px $overall-scale * 20px $overall-scale * 60px
.achievement-title .achievement-title
font-family: Open Sans Condensed font-family: $headings-font-family
font-variant: small-caps font-variant: small-caps
font-size: $overall-scale * 28px font-size: $overall-scale * 28px
padding-left: $overall-scale * -50px padding-left: $overall-scale * -50px

View file

@ -75,7 +75,7 @@ $font-size-h6: ceil($font-size-base * 0.85) !default; // ~12px
$line-height-base: 1.428571429 !default; // 20/14 $line-height-base: 1.428571429 !default; // 20/14
$line-height-computed: floor($font-size-base * $line-height-base) !default; // ~20px $line-height-computed: floor($font-size-base * $line-height-base) !default; // ~20px
$headings-font-family: 'Open Sans Condensed', cursive; // empty to use BS default, $baseFontFamily; $headings-font-family: 'Open Sans Condensed', "Helvetica Neue", Helvetica, Arial, sans-serif; // empty to use BS default, $baseFontFamily;
$headings-font-weight: 700 !default; $headings-font-weight: 700 !default;
$headings-line-height: 1.1 !default; $headings-line-height: 1.1 !default;
$headings-color: #317EAC; $headings-color: #317EAC;

View file

@ -140,12 +140,12 @@ table.table
body[lang='ja'] body[lang='ja']
h1, h2, h3, h4, h5, h6 h1, h2, h3, h4, h5, h6
font-family: "ヒラギノ角ゴ Pro W3", "Hiragino Kaku Gothic Pro", Osaka, "メイリオ", Meiryo, " Pゴシック", "MS PGothic", 'Open Sans Condensed', sans-serif font-family: "ヒラギノ角ゴ Pro W3", "Hiragino Kaku Gothic Pro", Osaka, "メイリオ", Meiryo, " Pゴシック", "MS PGothic", 'Open Sans Condensed', 'Helvetica Neue', Helvetica, Arial, sans-serif
font-variant: small-caps font-variant: small-caps
letter-spacing: -1px !important letter-spacing: -1px !important
.header-font .header-font
font-family: "ヒラギノ角ゴ Pro W3", "Hiragino Kaku Gothic Pro", Osaka, "メイリオ", Meiryo, " Pゴシック", "MS PGothic", 'Open Sans Condensed', sans-serif font-family: "ヒラギノ角ゴ Pro W3", "Hiragino Kaku Gothic Pro", Osaka, "メイリオ", Meiryo, " Pゴシック", "MS PGothic", 'Open Sans Condensed', 'Helvetica Neue', Helvetica, Arial, sans-serif
font-variant: small-caps font-variant: small-caps
letter-spacing: -1px !important letter-spacing: -1px !important
@ -216,6 +216,10 @@ kbd
width: 25px width: 25px
height: 25px height: 25px
&.gem-30
width: 30px
height: 30px
&.gem-40 &.gem-40
width: 40px width: 40px
height: 40px height: 40px
@ -225,6 +229,7 @@ kbd
height: 60px height: 60px
.popover .popover
border-style: solid
border-image: url(/images/level/popover_background.png) 29 39 fill stretch border-image: url(/images/level/popover_background.png) 29 39 fill stretch
border-width: 15px 20px border-width: 15px 20px
.arrow .arrow
@ -238,16 +243,19 @@ kbd
border: 0 border: 0
border-radius: 0 border-radius: 0
@include box-shadow(none) @include box-shadow(none)
border-style: solid
border-image: url(/images/common/button-background-active-border.png) 14 20 20 20 fill round border-image: url(/images/common/button-background-active-border.png) 14 20 20 20 fill round
border-width: 7px 10px 10px 10px border-width: 7px 10px 10px 10px
padding: 0 padding: 0
font-family: Open Sans Condensed font-family: $headings-font-family
text-transform: uppercase text-transform: uppercase
font-weight: bold font-weight: bold
color: rgb(248, 197, 146) color: rgb(248, 197, 146)
&.btn-lg &.btn-lg
border-width: 14px 20px 20px 20px border-width: 14px 20px 20px 20px
height: 60px
line-height: 34px
&.btn-primary &.btn-primary
border-image-source: url(/images/common/button-background-primary-active-border.png) border-image-source: url(/images/common/button-background-primary-active-border.png)

View file

@ -68,7 +68,7 @@
& > a, button, select & > a, button, select
font-size: 18px font-size: 18px
text-transform: uppercase text-transform: uppercase
font-family: Open Sans Condensed font-family: $headings-font-family
margin: 0 7px margin: 0 7px
button, select button, select

View file

@ -1,3 +1,4 @@
@import "app/styles/bootstrap/variables"
@import "app/styles/mixins" @import "app/styles/mixins"
#game-menu-modal #game-menu-modal
@ -67,7 +68,7 @@
color: rgb(195,153,124) color: rgb(195,153,124)
font-weight: bold font-weight: bold
padding: 14px 20px padding: 14px 20px
font-family: Open Sans Condensed font-family: $headings-font-family
text-transform: uppercase text-transform: uppercase
.glyphicon .glyphicon

View file

@ -92,7 +92,7 @@
label label
font-size: 20px font-size: 20px
text-transform: uppercase text-transform: uppercase
font-family: 'Open Sans Condensed' font-family: $headings-font-family
margin-bottom: 0 margin-bottom: 0
//- Check boxes //- Check boxes
@ -146,6 +146,7 @@
height: 70px height: 70px
font-size: 32px font-size: 32px
line-height: 42px line-height: 42px
border-style: solid
border-image: url(/images/level/code_toolbar_submit_button_active.png) 14 20 20 20 fill round border-image: url(/images/level/code_toolbar_submit_button_active.png) 14 20 20 20 fill round
border-width: 14px 20px 20px 20px border-width: 14px 20px 20px 20px
color: white color: white
@ -235,7 +236,7 @@
width: 200px width: 200px
color: rgb(254,188,68) color: rgb(254,188,68)
font-size: 20px font-size: 20px
font-family: 'Open Sans Condensed' font-family: $headings-font-family
font-weight: bold font-weight: bold
text-transform: uppercase text-transform: uppercase
text-shadow: black 1px 1px 0, black -1px -1px 0, black 1px -1px 0, black -1px 1px 0, black 1px 0px 0, black 0px -1px 0, black -1px 0px 0, black 0px 1px 0 text-shadow: black 1px 1px 0, black -1px -1px 0, black 1px -1px 0, black -1px 1px 0, black 1px 0px 0, black 0px -1px 0, black -1px 0px 0, black 0px 1px 0

View file

@ -21,7 +21,7 @@
.overlay-text .overlay-text
color: $yellow color: $yellow
font-family: Open Sans Condensed font-family: $headings-font-family
font-variant: small-caps font-variant: small-caps
@include transition(color .10s linear) @include transition(color .10s linear)

View file

@ -187,7 +187,7 @@ $level-resize-transition-time: 0.5s
#play-footer #play-footer
text-align: center text-align: center
font-family: "Open Sans Condensed" font-family: $headings-font-family
font-variant: small-caps font-variant: small-caps
font-size: 25px font-size: 25px
padding: 10px 0 padding: 10px 0

View file

@ -12,7 +12,7 @@
position: absolute position: absolute
z-index: 6 z-index: 6
text-transform: uppercase text-transform: uppercase
font-family: Open Sans Condensed font-family: $headings-font-family
font-weight: bold font-weight: bold
&.controls-disabled &.controls-disabled
@ -100,6 +100,7 @@
height: 60px height: 60px
margin: 0 auto margin: 0 auto
padding: 8px padding: 8px
border-style: solid
border-image: url(/images/level/control_bar_level_name_background.png) 30 fill round border-image: url(/images/level/control_bar_level_name_background.png) 30 fill round
border-width: 0 15px 15px 15px border-width: 0 15px 15px 15px
text-align: center text-align: center
@ -128,6 +129,7 @@
height: 60px height: 60px
margin: 0 auto margin: 0 auto
padding: 8px padding: 8px
border-style: solid
border-image: url(/images/level/control_bar_level_name_background.png) 30 fill round border-image: url(/images/level/control_bar_level_name_background.png) 30 fill round
border-width: 0 15px 15px 15px border-width: 0 15px 15px 15px
text-align: center text-align: center

View file

@ -6,6 +6,7 @@
left: -15px left: -15px
top: -100px top: -100px
@include transition(0.5s ease-in-out) @include transition(0.5s ease-in-out)
border-style: solid
border-image: url(/images/level/goals_background.png) 15 20 51 15 fill stretch border-image: url(/images/level/goals_background.png) 15 20 51 15 fill stretch
border-width: 8px 10px 25px 8px border-width: 8px 10px 25px 8px
margin: -8px -10px -25px -8px margin: -8px -10px -25px -8px

View file

@ -98,7 +98,7 @@
background-image: url(/images/level/hud_background.png) background-image: url(/images/level/hud_background.png)
color: white color: white
text-transform: uppercase text-transform: uppercase
font-family: Open Sans Condensed font-family: $headings-font-family
font-weight: bold font-weight: bold
font-size: 16px font-size: 16px
z-index: 4 z-index: 4

View file

@ -33,6 +33,7 @@
width: 750px width: 750px
background: transparent background: transparent
border: 0px solid transparent border: 0px solid transparent
border-style: solid
border-image: url("/images/pages/play/level/modal/victory_modal_border_background.png") 250 0 100 0 fill round border-image: url("/images/pages/play/level/modal/victory_modal_border_background.png") 250 0 100 0 fill round
border-width: 250px 0 100px 0 border-width: 250px 0 100px 0
border-radius: 12px border-radius: 12px
@ -114,7 +115,7 @@
color: $hero-yellow-text color: $hero-yellow-text
font-weight: bold font-weight: bold
text-transform: uppercase text-transform: uppercase
font-family: 'Open Sans Condensed' font-family: $headings-font-family
white-space: nowrap white-space: nowrap
overflow: hidden overflow: hidden
text-overflow: ellipsis text-overflow: ellipsis
@ -258,7 +259,7 @@
color: rgb(103, 92, 76) color: rgb(103, 92, 76)
text-transform: uppercase text-transform: uppercase
font-weight: bold font-weight: bold
font-family: 'Open Sans Condensed' font-family: $headings-font-family
font-size: 18px font-size: 18px
margin-top: 13px margin-top: 13px
line-height: 18px line-height: 18px
@ -302,7 +303,7 @@
.sign-up-blurb .sign-up-blurb
width: 175px width: 175px
font-family: 'Open Sans Condensed' font-family: $headings-font-family
font-weight: bold font-weight: bold
text-transform: uppercase text-transform: uppercase
font-size: 18px font-size: 18px

View file

@ -1,3 +1,6 @@
@import "app/styles/mixins"
@import "app/styles/bootstrap/variables"
#level-victory-modal #level-victory-modal
.victory-banner .victory-banner
float: right float: right
@ -55,4 +58,4 @@ body.ipad #level-victory-modal
.modal-body .modal-body
font-size: 30px font-size: 30px
font-family: Open Sans Condensed font-family: $headings-font-family

View file

@ -46,6 +46,7 @@
width: 45% width: 45%
width: -webkit-calc(50% - 10px) width: -webkit-calc(50% - 10px)
width: calc(50% - 10px) width: calc(50% - 10px)
border-style: solid
border-image: url(/images/level/code_toolbar_run_button_active.png) 14 20 20 20 fill round border-image: url(/images/level/code_toolbar_run_button_active.png) 14 20 20 20 fill round
border-width: 7px 10px 10px 10px border-width: 7px 10px 10px 10px

View file

@ -15,6 +15,7 @@
text-shadow: none text-shadow: none
color: white color: white
word-wrap: break-word word-wrap: break-word
border-style: solid
border-image: url(/images/level/code_editor_error_background.png) 16 20 fill round border-image: url(/images/level/code_editor_error_background.png) 16 20 fill round
border-width: 16px 20px border-width: 16px 20px

View file

@ -7,6 +7,7 @@
min-width: 250px min-width: 250px
max-width: 400px max-width: 400px
padding: 10px padding: 10px
border-style: solid
border-image: url(/images/level/popover_background.png) 18 fill round border-image: url(/images/level/popover_background.png) 18 fill round
border-width: 8px border-width: 8px
.progress .progress

View file

@ -9,6 +9,7 @@
left: 0% left: 0%
right: 10% right: 10%
padding: 4% padding: 4%
border-style: solid
border-image: url(/images/level/popover_background.png) 18 fill round border-image: url(/images/level/popover_background.png) 18 fill round
border-width: 15px border-width: 15px

View file

@ -93,7 +93,7 @@
margin-top: 10px margin-top: 10px
text-transform: uppercase text-transform: uppercase
display: inline-block display: inline-block
font-family: Open Sans Condensed font-family: $headings-font-family
font-weight: bold font-weight: bold
.method-label .method-label

View file

@ -11,6 +11,7 @@
max-height: 500px max-height: 500px
overflow: scroll overflow: scroll
padding: 4% padding: 4%
border-style: solid
border-image: url(/images/level/popover_background.png) 18 fill round border-image: url(/images/level/popover_background.png) 18 fill round
border-width: 15px border-width: 15px

View file

@ -55,6 +55,7 @@ body:not(.dialogue-view-active)
// Only those popovers which are our direct children (spell documentation) // Only those popovers which are our direct children (spell documentation)
max-width: 600px max-width: 600px
padding: 0 padding: 0
border-style: solid
border-image: url(/images/level/popover_background.png) 29 39 fill stretch border-image: url(/images/level/popover_background.png) 29 39 fill stretch
border-width: 15px 20px border-width: 15px 20px
@include box-shadow(0 0 0 #000) @include box-shadow(0 0 0 #000)

View file

@ -82,6 +82,7 @@
position: absolute position: absolute
z-index: 10 z-index: 10
pointer-events: none pointer-events: none
border-style: solid
border-image: url(/images/level/popover_background.png) 29 39 fill stretch border-image: url(/images/level/popover_background.png) 29 39 fill stretch
padding: 0 padding: 0
border-width: 15px 20px border-width: 15px 20px

View file

@ -37,6 +37,7 @@
.popover .popover
padding: 10px 10px 30px 10px padding: 10px 10px 30px 10px
border-style: solid
border-image: url(/images/level/popover_background.png) 18 fill round border-image: url(/images/level/popover_background.png) 18 fill round
border-width: 15px border-width: 15px
@include box-shadow(0 0 0 #000) @include box-shadow(0 0 0 #000)

View file

@ -1,10 +1,11 @@
@import "app/styles/bootstrap/variables"
@import "app/styles/mixins" @import "app/styles/mixins"
#item-details-view #item-details-view
.big-font .big-font
text-transform: uppercase text-transform: uppercase
font-family: "Open Sans Condensed" font-family: $headings-font-family
font-weight: bold font-weight: bold
.one-line .one-line

View file

@ -44,7 +44,7 @@ $heroCanvasHeight: 265px
top: 470px top: 470px
#gems-count #gems-count
font-family: 'Open Sans Condensed' font-family: $headings-font-family
font-size: 24.5px font-size: 24.5px
color: lighten(rgb(1,64,91), 50%) color: lighten(rgb(1,64,91), 50%)
@ -302,7 +302,7 @@ $heroCanvasHeight: 265px
text-align: center text-align: center
text-transform: uppercase text-transform: uppercase
font-size: 24.5px font-size: 24.5px
font-family: Open Sans Condensed font-family: $headings-font-family
color: white color: white
#purchase-hero-button #purchase-hero-button
@ -406,7 +406,7 @@ $heroCanvasHeight: 265px
text-align: center text-align: center
text-transform: uppercase text-transform: uppercase
font-size: 26px font-size: 26px
font-family: Open Sans Condensed font-family: $headings-font-family
color: white color: white

View file

@ -1,10 +1,11 @@
@import "app/styles/bootstrap/variables"
@import "app/styles/mixins" @import "app/styles/mixins"
#play-items-modal #play-items-modal
.big-font .big-font
text-transform: uppercase text-transform: uppercase
font-family: "Open Sans Condensed" font-family: $headings-font-family
font-weight: bold font-weight: bold
.one-line .one-line
@ -287,7 +288,7 @@
top: 70px top: 70px
font-size: 20px font-size: 20px
line-height: 20px line-height: 20px
font-family: Open Sans Condensed font-family: $headings-font-family
text-transform: uppercase text-transform: uppercase
font-weight: bold font-weight: bold
z-index: 2 z-index: 2

View file

@ -63,7 +63,7 @@
font-weight: bold font-weight: bold
line-height: 18px line-height: 18px
color: black color: black
font-family: 'Open Sans Condensed' font-family: $headings-font-family
font-size: 18px font-size: 18px
.point .point
@ -100,6 +100,7 @@
top: 430px top: 430px
font-size: 32px font-size: 32px
line-height: 42px line-height: 42px
border-style: solid
border-image: url(/images/level/code_toolbar_submit_button_active.png) 14 20 20 20 fill round border-image: url(/images/level/code_toolbar_submit_button_active.png) 14 20 20 20 fill round
border-width: 14px 20px 20px 20px border-width: 14px 20px 20px 20px
color: darken(white, 5%) color: darken(white, 5%)

View file

@ -218,6 +218,7 @@ $gameControlMargin: 30px
border-width: 15px border-width: 15px
// Using modernizr-mixin for compat detection // Using modernizr-mixin for compat detection
@include yep(borderimage) @include yep(borderimage)
border-style: solid
border-image: url(/images/level/popover_background.png) 18 fill round border-image: url(/images/level/popover_background.png) 18 fill round
@include nope(borderimage) @include nope(borderimage)
background-color: rgb(247, 242, 218) background-color: rgb(247, 242, 218)
@ -318,17 +319,74 @@ $gameControlMargin: 30px
.tooltip .tooltip
font-size: 24px font-size: 24px
.tooltip-arrow
display: none
.user-status .user-status
position: absolute position: absolute
bottom: 1% bottom: 16px
left: 1% left: 8px
text-align: center text-align: center
font-size: 24px font-size: 24px
color: white color: white
text-shadow: 1px 1px 0px black text-shadow: 0px 2px 1px black, 0px -2px 1px black, -2px 0px 1px black, 2px 0px 1px black
height: 32px
line-height: 32px
button .user-status-line
margin-left: 10px position: relative
button.btn.btn-illustrated
margin-left: 10px
min-width: 90px
height: 32px
color: white
.gem, .player-level-icon, .player-hero-icon
position: absolute
top: 1px
#gems-count
margin-left: 40px
.player-level
margin-left: 34px
.player-name
margin-left: 45px
$spriteSheetSize: 30px
.player-level-icon, .player-hero-icon
background: transparent url(/images/pages/play/play-spritesheet.png)
background-size: cover
background-position: (-2 * $spriteSheetSize) 0
display: inline-block
width: 30px
height: 30px
margin: 0px 2px
.player-hero-icon
margin-left: 10px
background-position: (-4 * $spriteSheetSize) 0
&.knight
background-position: (-5 * $spriteSheetSize) 0
&.librarian
background-position: (-6 * $spriteSheetSize) 0
&.ninja
background-position: (-7 * $spriteSheetSize) 0
&.potion-master
background-position: (-8 * $spriteSheetSize) 0
&.samurai
background-position: (-9 * $spriteSheetSize) 0
&.trapper
background-position: (-10 * $spriteSheetSize) 0
&.forest-archer
background-position: (-11 * $spriteSheetSize) 0
&.sorcerer
background-position: (-12 * $spriteSheetSize) 0
#volume-button #volume-button
position: absolute position: absolute

View file

@ -63,16 +63,19 @@
// a.btn.settings(href='/account', data-i18n="[title]play.settings") // a.btn.settings(href='/account', data-i18n="[title]play.settings")
.user-status.header-font .user-status.header-font
span.gem.gem-20 .user-status-line
span#gems-count.spr= me.gems() span.gem.gem-30
span.spl.spr(data-i18n="general.player_level") span#gems-count.spr= me.gems()
span.spr= me.level() span.player-level-icon
if me.get('anonymous') span.player-level.spr= me.level()
span.spr(data-i18n="play.anonymous") Anonymous Player span.player-hero-icon
button.btn.btn-default.btn-flat.btn-sm(data-toggle='coco-modal', data-target='core/AuthModal', data-i18n="login.log_in") if me.get('anonymous')
else span.player-name.spr(data-i18n="play.anonymous") Anonymous Player
span.spr= me.get('name') button.btn.btn-illustrated.login-button.btn-warning(data-i18n="login.log_in")
button#logout-button.btn.btn-default.btn-flat.btn-sm(data-i18n="login.log_out") Log Out button.btn.btn-illustrated.signup-button.btn-danger(data-i18n="signup.sign_up")
else
span.player-name.spr= me.get('name')
button#logout-button.btn.btn-default.btn-flat.btn-sm(data-i18n="login.log_out") Log Out
button.btn.btn-lg.btn-inverse#volume-button(title="Adjust volume") button.btn.btn-lg.btn-inverse#volume-button(title="Adjust volume")
.glyphicon.glyphicon-volume-off .glyphicon.glyphicon-volume-off

View file

@ -74,6 +74,7 @@ module.exports = class WorldMapView extends RootView
@hadEverChosenHero = me.get('heroConfig')?.thangType @hadEverChosenHero = me.get('heroConfig')?.thangType
@listenTo me, 'change:purchased', -> @renderSelectors('#gems-count') @listenTo me, 'change:purchased', -> @renderSelectors('#gems-count')
@listenTo me, 'change:spent', -> @renderSelectors('#gems-count') @listenTo me, 'change:spent', -> @renderSelectors('#gems-count')
@listenTo me, 'change:heroConfig', -> @updateHero()
window.tracker?.trackEvent 'Loaded World Map', category: 'World Map', ['Google Analytics'] window.tracker?.trackEvent 'Loaded World Map', category: 'World Map', ['Google Analytics']
# If it's a new player who didn't appear to come from Hour of Code, we register her here without setting the hourOfCode property. # If it's a new player who didn't appear to come from Hour of Code, we register her here without setting the hourOfCode property.
@ -141,8 +142,10 @@ module.exports = class WorldMapView extends RootView
level.color = 'rgb(80, 130, 200)' level.color = 'rgb(80, 130, 200)'
level.hidden = level.locked or level.disabled level.hidden = level.locked or level.disabled
# put lower levels in last, so in the world map they layer over one another properly. ## put lower levels in last, so in the world map they layer over one another properly.
context.campaign.levels = (_.sortBy context.campaign.levels, 'y').reverse() #context.campaign.levels = (_.sortBy context.campaign.levels, 'y').reverse()
# Actually, there's some logic that depends on the order of iteration of levels to determine
# which one to do next when you're coming here not from a level; can we do this another way?
context.levelStatusMap = @levelStatusMap context.levelStatusMap = @levelStatusMap
context.levelPlayCountMap = @levelPlayCountMap context.levelPlayCountMap = @levelPlayCountMap
@ -167,6 +170,7 @@ module.exports = class WorldMapView extends RootView
console.log "#{$(@).data('level-id')}\n x: #{(100 * x).toFixed(2)}\n y: #{(100 * y).toFixed(2)}\n" console.log "#{$(@).data('level-id')}\n x: #{(100 * x).toFixed(2)}\n y: #{(100 * y).toFixed(2)}\n"
@$el.addClass _.string.slugify @terrain @$el.addClass _.string.slugify @terrain
@updateVolume() @updateVolume()
@updateHero()
unless window.currentModal or not @fullyRendered unless window.currentModal or not @fullyRendered
@highlightElement '.level.next', delay: 500, duration: 60000, rotation: 0, sides: ['top'] @highlightElement '.level.next', delay: 500, duration: 60000, rotation: 0, sides: ['top']
if levelID = @$el.find('.level.next').data('level-id') if levelID = @$el.find('.level.next').data('level-id')
@ -345,6 +349,12 @@ module.exports = class WorldMapView extends RootView
newI = 2 newI = 2
@updateVolume volumes[newI] @updateVolume volumes[newI]
updateHero: ->
return unless hero = me.get('heroConfig')?.thangType
for slug, original of ThangType.heroes when original is hero
@$el.find('.player-hero-icon').removeClass().addClass('player-hero-icon ' + slug)
return
console.error "WorldMapView hero update couldn't find hero slug for original:", hero
dungeon = [ dungeon = [
{ {

View file

@ -202,6 +202,7 @@ module.exports = class PlayItemsModal extends ModalView
unlockButton.popover( unlockButton.popover(
animation: true animation: true
trigger: 'manual' trigger: 'manual'
placement: 'top'
content: ' ' # template has it content: ' ' # template has it
container: @$el container: @$el
template: popoverTemplate template: popoverTemplate