mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-02-26 14:34:58 -05:00
Merge branch 'master' into production
This commit is contained in:
commit
eee15b4b0c
4 changed files with 47 additions and 65 deletions
|
@ -279,12 +279,13 @@ self.retrieveValueFromFrame = function retrieveValueFromFrame(args) {
|
||||||
self.enableFlowOnThangSpell = function (thangID, spellID, userCodeMap) {
|
self.enableFlowOnThangSpell = function (thangID, spellID, userCodeMap) {
|
||||||
try {
|
try {
|
||||||
var options = userCodeMap[thangID][spellID].originalOptions;
|
var options = userCodeMap[thangID][spellID].originalOptions;
|
||||||
if (options.includeFlow === true && options.noSerializationInFlow === true)
|
if (options.includeFlow === true && options.noSerializationInFlow === true && options.noVariablesInFlow === false)
|
||||||
return;
|
return;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
options.includeFlow = true;
|
options.includeFlow = true;
|
||||||
options.noSerializationInFlow = true;
|
options.noSerializationInFlow = true;
|
||||||
|
options.noVariablesInFlow = false;
|
||||||
var temporaryAether = Aether.deserialize(userCodeMap[thangID][spellID]);
|
var temporaryAether = Aether.deserialize(userCodeMap[thangID][spellID]);
|
||||||
temporaryAether.transpile(temporaryAether.raw);
|
temporaryAether.transpile(temporaryAether.raw);
|
||||||
userCodeMap[thangID][spellID] = temporaryAether.serialize();
|
userCodeMap[thangID][spellID] = temporaryAether.serialize();
|
||||||
|
|
|
@ -9,6 +9,8 @@ module.exports.createAetherOptions = (options) ->
|
||||||
functionName: options.functionName
|
functionName: options.functionName
|
||||||
protectAPI: not options.skipProtectAPI
|
protectAPI: not options.skipProtectAPI
|
||||||
includeFlow: Boolean options.includeFlow
|
includeFlow: Boolean options.includeFlow
|
||||||
|
noVariablesInFlow: true
|
||||||
|
skipDuplicateUserInfoInFlow: true # Optimization that won't work if we are stepping with frames
|
||||||
yieldConditionally: options.functionName is 'plan'
|
yieldConditionally: options.functionName is 'plan'
|
||||||
simpleLoops: true
|
simpleLoops: true
|
||||||
globals: ['Vector', '_']
|
globals: ['Vector', '_']
|
||||||
|
|
|
@ -234,7 +234,11 @@ module.exports = class ThangType extends CocoModel
|
||||||
|
|
||||||
getPortraitStage: (spriteOptionsOrKey, size=100) ->
|
getPortraitStage: (spriteOptionsOrKey, size=100) ->
|
||||||
canvas = $("<canvas width='#{size}' height='#{size}'></canvas>")
|
canvas = $("<canvas width='#{size}' height='#{size}'></canvas>")
|
||||||
stage = new createjs.Stage(canvas[0])
|
try
|
||||||
|
stage = new createjs.Stage(canvas[0])
|
||||||
|
catch err
|
||||||
|
console.error "Error trying to create #{@get('name')} avatar stage:", err, "with window as", window
|
||||||
|
return null
|
||||||
return stage unless @isFullyLoaded()
|
return stage unless @isFullyLoaded()
|
||||||
key = spriteOptionsOrKey
|
key = spriteOptionsOrKey
|
||||||
key = if _.isString(key) then key else @spriteSheetKey(@fillOptions(key))
|
key = if _.isString(key) then key else @spriteSheetKey(@fillOptions(key))
|
||||||
|
|
|
@ -2,25 +2,24 @@
|
||||||
@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: $headings-font-family
|
font-family: $headings-font-family
|
||||||
font-weight: bold
|
font-weight: bold
|
||||||
|
|
||||||
.one-line
|
.one-line
|
||||||
white-space: nowrap
|
white-space: nowrap
|
||||||
overflow: hidden
|
overflow: hidden
|
||||||
text-overflow: ellipsis
|
text-overflow: ellipsis
|
||||||
|
|
||||||
|
|
||||||
//- Clear modal defaults
|
//- Clear modal defaults
|
||||||
.modal-dialog
|
.modal-dialog
|
||||||
padding: 0
|
padding: 0
|
||||||
width: 1230px
|
width: 1230px
|
||||||
height: 660px
|
height: 660px
|
||||||
background: none
|
background: none
|
||||||
|
|
||||||
//- Background
|
//- Background
|
||||||
#play-items-modal-bg, #play-items-modal-narrow-bg
|
#play-items-modal-bg, #play-items-modal-narrow-bg
|
||||||
position: absolute
|
position: absolute
|
||||||
|
@ -29,9 +28,8 @@
|
||||||
|
|
||||||
#play-items-modal-narrow-bg
|
#play-items-modal-narrow-bg
|
||||||
display: none
|
display: none
|
||||||
|
|
||||||
//- Header
|
//- Header
|
||||||
|
|
||||||
h1
|
h1
|
||||||
position: absolute
|
position: absolute
|
||||||
left: 200px
|
left: 200px
|
||||||
|
@ -40,10 +38,8 @@
|
||||||
font-size: 38px
|
font-size: 38px
|
||||||
text-shadow: black 4px 4px 0, black -4px -4px 0, black 4px -4px 0, black -4px 4px 0, black 4px 0px 0, black 0px -4px 0, black -4px 0px 0, black 0px 4px 0
|
text-shadow: black 4px 4px 0, black -4px -4px 0, black 4px -4px 0, black -4px 4px 0, black 4px 0px 0, black 0px -4px 0, black -4px 0px 0, black 0px 4px 0
|
||||||
margin: 0
|
margin: 0
|
||||||
|
|
||||||
|
|
||||||
//- Gems count
|
|
||||||
|
|
||||||
|
//- Gems count
|
||||||
#gems-count-container
|
#gems-count-container
|
||||||
position: absolute
|
position: absolute
|
||||||
left: 425px
|
left: 425px
|
||||||
|
@ -51,17 +47,15 @@
|
||||||
width: 160px
|
width: 160px
|
||||||
height: 66px
|
height: 66px
|
||||||
@include rotate(5deg)
|
@include rotate(5deg)
|
||||||
|
|
||||||
#gems-count
|
#gems-count
|
||||||
position: absolute
|
position: absolute
|
||||||
left: 75px
|
left: 75px
|
||||||
top: 17px
|
top: 17px
|
||||||
font-size: 25px
|
font-size: 25px
|
||||||
color: rgb(1,64,91)
|
color: rgb(1,64,91)
|
||||||
|
|
||||||
|
|
||||||
//- Close modal button
|
//- Close modal button
|
||||||
|
|
||||||
#close-modal
|
#close-modal
|
||||||
position: absolute
|
position: absolute
|
||||||
left: 602px
|
left: 602px
|
||||||
|
@ -70,30 +64,28 @@
|
||||||
height: 60px
|
height: 60px
|
||||||
color: white
|
color: white
|
||||||
text-align: center
|
text-align: center
|
||||||
font-size: 30px
|
font-size: 30px
|
||||||
padding-top: 7px
|
padding-top: 7px
|
||||||
cursor: pointer
|
cursor: pointer
|
||||||
@include rotate(-3deg)
|
@include rotate(-3deg)
|
||||||
|
|
||||||
&:hover
|
&:hover
|
||||||
color: yellow
|
color: yellow
|
||||||
|
|
||||||
|
|
||||||
//- Nav bar
|
//- Nav bar
|
||||||
|
|
||||||
.nav
|
.nav
|
||||||
position: absolute
|
position: absolute
|
||||||
top: 125px
|
top: 125px
|
||||||
left: -31px
|
left: -31px
|
||||||
width: 178px
|
width: 178px
|
||||||
|
|
||||||
li
|
li
|
||||||
background: url(/images/pages/play/modal/menu-tab.png)
|
background: url(/images/pages/play/modal/menu-tab.png)
|
||||||
padding: 5px
|
padding: 5px
|
||||||
margin: -5px 0
|
margin: -5px 0
|
||||||
height: 80px
|
height: 80px
|
||||||
padding: 0
|
padding: 0
|
||||||
|
|
||||||
a
|
a
|
||||||
font-size: 18px
|
font-size: 18px
|
||||||
line-height: 50px
|
line-height: 50px
|
||||||
|
@ -101,18 +93,15 @@
|
||||||
color: rgb(195,153,124)
|
color: rgb(195,153,124)
|
||||||
font-weight: bold
|
font-weight: bold
|
||||||
padding: 10px 7px
|
padding: 10px 7px
|
||||||
|
|
||||||
|
|
||||||
li.active
|
li.active
|
||||||
background: url(/images/pages/play/modal/menu-tab-selected.png)
|
background: url(/images/pages/play/modal/menu-tab-selected.png)
|
||||||
width: 197px
|
width: 197px
|
||||||
|
|
||||||
a
|
a
|
||||||
color: white
|
color: white
|
||||||
|
|
||||||
|
|
||||||
//- Hero Type Select
|
//- Hero Type Select
|
||||||
|
|
||||||
#hero-type-select
|
#hero-type-select
|
||||||
position: absolute
|
position: absolute
|
||||||
top: 102px
|
top: 102px
|
||||||
|
@ -121,21 +110,19 @@
|
||||||
padding: 2px 0
|
padding: 2px 0
|
||||||
z-index: 3
|
z-index: 3
|
||||||
border-radius: 2px
|
border-radius: 2px
|
||||||
|
|
||||||
label
|
label
|
||||||
background: rgb(58,47,38)
|
background: rgb(58,47,38)
|
||||||
color: rgb(195,153,124)
|
color: rgb(195,153,124)
|
||||||
border: 2px solid rgb(85,70,57)
|
border: 2px solid rgb(85,70,57)
|
||||||
margin: 0 2px
|
margin: 0 2px
|
||||||
|
|
||||||
&.active
|
&.active
|
||||||
background: rgb(33,28,21)
|
background: rgb(33,28,21)
|
||||||
border: 2px solid rgb(64,53,41)
|
border: 2px solid rgb(64,53,41)
|
||||||
color: white
|
color: white
|
||||||
|
|
||||||
|
|
||||||
//- Item List
|
|
||||||
|
|
||||||
|
//- Item List
|
||||||
.tab-content
|
.tab-content
|
||||||
position: absolute
|
position: absolute
|
||||||
top: 116px
|
top: 116px
|
||||||
|
@ -143,7 +130,7 @@
|
||||||
width: 669px
|
width: 669px
|
||||||
height: 507px
|
height: 507px
|
||||||
overflow: hidden
|
overflow: hidden
|
||||||
|
|
||||||
&.filter-warrior
|
&.filter-warrior
|
||||||
.item.Ranger, .item.Wizard
|
.item.Ranger, .item.Wizard
|
||||||
display: none
|
display: none
|
||||||
|
@ -151,20 +138,18 @@
|
||||||
&.filter-ranger
|
&.filter-ranger
|
||||||
.item.Warrior, .item.Wizard
|
.item.Warrior, .item.Wizard
|
||||||
display: none
|
display: none
|
||||||
|
|
||||||
&.filter-wizard
|
&.filter-wizard
|
||||||
.item.Ranger, .item.Warrior
|
.item.Ranger, .item.Warrior
|
||||||
display: none
|
display: none
|
||||||
|
|
||||||
.tab-pane
|
.tab-pane
|
||||||
height: 100%
|
height: 100%
|
||||||
|
|
||||||
.nano-content
|
.nano-content
|
||||||
padding: 26px 51px 26px 26px
|
padding: 26px 51px 26px 26px
|
||||||
|
|
||||||
|
|
||||||
//- Item box
|
//- Item box
|
||||||
|
|
||||||
.item
|
.item
|
||||||
cursor: pointer
|
cursor: pointer
|
||||||
width: 187px
|
width: 187px
|
||||||
|
@ -178,7 +163,7 @@
|
||||||
|
|
||||||
&.silhouetted
|
&.silhouetted
|
||||||
cursor: default
|
cursor: default
|
||||||
|
|
||||||
strong
|
strong
|
||||||
position: absolute
|
position: absolute
|
||||||
top: 7px
|
top: 7px
|
||||||
|
@ -201,7 +186,7 @@
|
||||||
top: 25px
|
top: 25px
|
||||||
width: 110px
|
width: 110px
|
||||||
height: 110px
|
height: 110px
|
||||||
|
|
||||||
.glyphicon-lock
|
.glyphicon-lock
|
||||||
font-size: 60px
|
font-size: 60px
|
||||||
position: absolute
|
position: absolute
|
||||||
|
@ -212,11 +197,11 @@
|
||||||
right: 0
|
right: 0
|
||||||
margin-left: auto
|
margin-left: auto
|
||||||
margin-right: auto
|
margin-right: auto
|
||||||
|
|
||||||
&.bolder
|
&.bolder
|
||||||
font-weight: bolder
|
font-weight: bolder
|
||||||
color: rgb(211,200,175)
|
color: rgb(211,200,175)
|
||||||
|
|
||||||
.unlock-button, .unequippable
|
.unlock-button, .unequippable
|
||||||
right: 1px
|
right: 1px
|
||||||
bottom: 0
|
bottom: 0
|
||||||
|
@ -228,7 +213,7 @@
|
||||||
position: absolute
|
position: absolute
|
||||||
line-height: 41px
|
line-height: 41px
|
||||||
display: inline-block
|
display: inline-block
|
||||||
|
|
||||||
.cost
|
.cost
|
||||||
position: absolute
|
position: absolute
|
||||||
height: 41px
|
height: 41px
|
||||||
|
@ -239,14 +224,14 @@
|
||||||
font-size: 16px
|
font-size: 16px
|
||||||
color: rgb(22,61,73)
|
color: rgb(22,61,73)
|
||||||
font-weight: bold
|
font-weight: bold
|
||||||
|
|
||||||
img
|
img
|
||||||
width: 22px
|
width: 22px
|
||||||
height: 22px
|
height: 22px
|
||||||
margin-right: 8px
|
margin-right: 8px
|
||||||
position: relative
|
position: relative
|
||||||
top: -2px
|
top: -2px
|
||||||
|
|
||||||
.owned, .locked
|
.owned, .locked
|
||||||
position: absolute
|
position: absolute
|
||||||
left: 0
|
left: 0
|
||||||
|
@ -260,41 +245,35 @@
|
||||||
&.selected
|
&.selected
|
||||||
background: url(/images/pages/play/modal/item-box-background-selected.png)
|
background: url(/images/pages/play/modal/item-box-background-selected.png)
|
||||||
|
|
||||||
|
|
||||||
//- Item details. Non-specific item-details-view styling is in item-details-view.sass.
|
//- Item details. Non-specific item-details-view styling is in item-details-view.sass.
|
||||||
|
|
||||||
#item-details-view
|
#item-details-view
|
||||||
|
|
||||||
#item-title
|
#item-title
|
||||||
left: 910px
|
left: 910px
|
||||||
top: 60px
|
top: 60px
|
||||||
|
|
||||||
#item-details-body
|
#item-details-body
|
||||||
left: 860px
|
left: 860px
|
||||||
|
|
||||||
#selected-item-unlock-button
|
#selected-item-unlock-button
|
||||||
left: 856px
|
left: 856px
|
||||||
|
|
||||||
|
|
||||||
#play-items-modal, #inventory-modal
|
#play-items-modal, #inventory-modal
|
||||||
|
|
||||||
//- Item list scrollbar
|
//- Item list scrollbar
|
||||||
|
|
||||||
.nano-pane
|
.nano-pane
|
||||||
width: 16px
|
width: 16px
|
||||||
background: black
|
background: black
|
||||||
border: 3px solid rgb(97,76,58)
|
border: 3px solid rgb(97,76,58)
|
||||||
|
|
||||||
.nano-slider
|
.nano-slider
|
||||||
background: rgb(244,170,66)
|
background: rgb(244,170,66)
|
||||||
border: 3px solid black
|
border: 3px solid black
|
||||||
border-radius: 10px
|
border-radius: 10px
|
||||||
margin-left: -3px
|
margin-left: -3px
|
||||||
margin-right: -3px
|
margin-right: -3px
|
||||||
|
|
||||||
|
|
||||||
//- Item icons w/shadows (both in list and details areas)
|
//- Item icons w/shadows (both in list and details areas)
|
||||||
|
|
||||||
.item-img, .item-shadow, .item-silhouette
|
.item-img, .item-shadow, .item-silhouette
|
||||||
position: absolute
|
position: absolute
|
||||||
margin-left: auto
|
margin-left: auto
|
||||||
|
@ -311,7 +290,7 @@
|
||||||
// left: 5px
|
// left: 5px
|
||||||
// @include filter(contrast(0%) brightness(0%))
|
// @include filter(contrast(0%) brightness(0%))
|
||||||
// opacity: 0.2
|
// opacity: 0.2
|
||||||
|
|
||||||
.item-silhouette
|
.item-silhouette
|
||||||
opacity: 0.2
|
opacity: 0.2
|
||||||
//@include filter(contrast(0%) brightness(0%))
|
//@include filter(contrast(0%) brightness(0%))
|
||||||
|
@ -328,9 +307,7 @@
|
||||||
font-weight: bold
|
font-weight: bold
|
||||||
z-index: 2
|
z-index: 2
|
||||||
|
|
||||||
|
|
||||||
//- Unlock buttons (both in list and details areas)
|
//- Unlock buttons (both in list and details areas)
|
||||||
|
|
||||||
.unlock-button
|
.unlock-button
|
||||||
position: absolute
|
position: absolute
|
||||||
border: 3px solid rgb(7,65,83)
|
border: 3px solid rgb(7,65,83)
|
||||||
|
@ -338,7 +315,7 @@
|
||||||
color: white
|
color: white
|
||||||
font-size: 16px
|
font-size: 16px
|
||||||
border-radius: 0
|
border-radius: 0
|
||||||
|
|
||||||
&:disabled
|
&:disabled
|
||||||
background: rgb(72, 106, 113)
|
background: rgb(72, 106, 113)
|
||||||
opacity: 1
|
opacity: 1
|
||||||
|
@ -353,7 +330,6 @@
|
||||||
margin-top: 20px
|
margin-top: 20px
|
||||||
|
|
||||||
//- Use the two-column layout and background image if we are on a narrow screen.
|
//- Use the two-column layout and background image if we are on a narrow screen.
|
||||||
|
|
||||||
@media only screen and (max-width: 1300px)
|
@media only screen and (max-width: 1300px)
|
||||||
#play-items-modal
|
#play-items-modal
|
||||||
overflow-x: hidden
|
overflow-x: hidden
|
||||||
|
@ -384,13 +360,13 @@
|
||||||
padding-left: 20px
|
padding-left: 20px
|
||||||
|
|
||||||
#item-details-view
|
#item-details-view
|
||||||
|
|
||||||
#item-title
|
#item-title
|
||||||
left: 698px
|
left: 698px
|
||||||
|
|
||||||
#item-details-body
|
#item-details-body
|
||||||
left: 648px
|
left: 648px
|
||||||
|
|
||||||
#selected-item-unlock-button, .unequippable
|
#selected-item-unlock-button, .unequippable
|
||||||
left: 645px
|
left: 645px
|
||||||
|
|
||||||
|
@ -401,4 +377,3 @@ body[lang='pt-PT'], body[lang^='pt-BR']
|
||||||
body[lang='ru']
|
body[lang='ru']
|
||||||
#play-items-modal .unlock-button
|
#play-items-modal .unlock-button
|
||||||
font-size: 10px
|
font-size: 10px
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue