diff --git a/app/lib/surface/Mark.coffee b/app/lib/surface/Mark.coffee index ff4631aec..9752ca837 100644 --- a/app/lib/surface/Mark.coffee +++ b/app/lib/surface/Mark.coffee @@ -65,6 +65,8 @@ module.exports = class Mark extends CocoClass buildBounds: -> @mark = new createjs.Container() @mark.mouseChildren = false + style = @sprite.thang.drawsBoundsStyle + return if style is 'corner-text' and @sprite.thang.world.age is 0 # Confusingly make some semi-random colors that'll be consistent based on the drawsBoundsIndex @drawsBoundsIndex = @sprite.thang.drawsBoundsIndex @@ -72,11 +74,11 @@ module.exports = class Mark extends CocoClass color = "rgba(#{colors[0]}, #{colors[1]}, #{colors[2]}, 0.5)" [w, h] = [@sprite.thang.width * Camera.PPM, @sprite.thang.height * Camera.PPM * @camera.y2x] - if @sprite.thang.drawsBoundsStyle in ['border-text', 'corner-text'] + if style in ['border-text', 'corner-text'] @drawsBoundsBorderShape = shape = new createjs.Shape() shape.graphics.setStrokeStyle 5 shape.graphics.beginStroke color - if @sprite.thang.drawsBoundsStyle is 'border-text' + if style is 'border-text' shape.graphics.beginFill color.replace('0.5', '0.25') else shape.graphics.beginFill color @@ -88,13 +90,13 @@ module.exports = class Mark extends CocoClass shape.graphics.endFill() @mark.addChild shape - if @sprite.thang.drawsBoundsStyle is 'border-text' + if style is 'border-text' text = new createjs.Text '' + @drawsBoundsIndex, '20px Arial', color.replace('0.5', '1') text.regX = text.getMeasuredWidth() / 2 text.regY = text.getMeasuredHeight() / 2 text.shadow = new createjs.Shadow('#000000', 1, 1, 0) @mark.addChild text - else if @sprite.thang.drawsBoundsStyle is 'corner-text' + else if style is 'corner-text' return if @sprite.thang.world.age is 0 letter = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'[@drawsBoundsIndex % 26] text = new createjs.Text letter, '14px Arial', '#333333' # color.replace('0.5', '1') @@ -102,9 +104,9 @@ module.exports = class Mark extends CocoClass text.y = -h / 2 + 2 @mark.addChild text else - console.warn @sprite.thang.id, 'didn\'t know how to draw bounds style:', @sprite.thang.drawsBoundsStyle + console.warn @sprite.thang.id, 'didn\'t know how to draw bounds style:', style - if w > 0 and h > 0 and @sprite.thang.drawsBoundsStyle is 'border-text' + if w > 0 and h > 0 and style is 'border-text' @mark.cache -w / 2, -h / 2, w, h, 2 @lastWidth = @sprite.thang.width @lastHeight = @sprite.thang.height @@ -130,7 +132,7 @@ module.exports = class Mark extends CocoClass @mark.regX = width / 2 @mark.regY = height / 2 @mark.layerIndex = 10 - @mark.cache -1, 0, width+2, height # not actually faster than simple ellipse draw + @mark.cache -1, -1, width + 2, height + 2 # not actually faster than simple ellipse draw buildRadius: (range) -> alpha = 0.15 diff --git a/app/locale/pt-PT.coffee b/app/locale/pt-PT.coffee index ccfd1d33c..e61cf9f08 100644 --- a/app/locale/pt-PT.coffee +++ b/app/locale/pt-PT.coffee @@ -1,4 +1,4 @@ -module.exports = nativeDescription: "Português europeu", englishDescription: "Portuguese (Portugal)", translation: +module.exports = nativeDescription: "Português (Portugal)", englishDescription: "Portuguese (Portugal)", translation: common: loading: "A carregar..." saving: "A guardar..." @@ -12,11 +12,11 @@ module.exports = nativeDescription: "Português europeu", englishDescription: "P delay_3_sec: "3 segundos" delay_5_sec: "5 segundos" manual: "Manual" -# fork: "Fork" + fork: "Bifurcar" play: "Jogar" retry: "Tentar novamente" -# watch: "Watch" -# unwatch: "Unwatch" + watch: "Vigiar" + unwatch: "Desvigiar" submit_patch: "Submeter Versão" units: @@ -37,7 +37,7 @@ module.exports = nativeDescription: "Português europeu", englishDescription: "P modal: close: "Fechar" - okay: "Okay" + okay: "Ok" not_found: page_not_found: "Página não encontrada" @@ -81,7 +81,7 @@ module.exports = nativeDescription: "Português europeu", englishDescription: "P create_account_title: "Criar Conta para Guardar Progresso" description: "É grátis. Só são necessárias umas coisas e fica tudo pronto:" email_announcements: "Receber anúncios por e-mail" - coppa: "13+ ou não-EUA " + coppa: "Mais de 13 anos ou não estado-unidense " coppa_why: "(Porquê?)" creating: "A Criar Conta..." sign_up: "Registar" @@ -107,7 +107,7 @@ module.exports = nativeDescription: "Português europeu", englishDescription: "P adventurer_forum: "fórum do Aventureiro" adventurer_suffix: "." campaign_beginner: "Campanha para Iniciantes" - campaign_beginner_description: "... onde aprende a feitiçaria da programação." + campaign_beginner_description: "... onde aprende a magia da programação." campaign_dev: "Níveis mais Difíceis Aleatórios" campaign_dev_description: "... onde aprende a interface enquanto faz coisas um bocadinho mais difíceis." campaign_multiplayer: "Arenas Multijogador" @@ -325,7 +325,7 @@ module.exports = nativeDescription: "Português europeu", englishDescription: "P # pass_screen: "They will pass your technical screen." # pass_screen_blurb: "Review each candidate's code before reaching out. One employer found that 5x as many of our devs passed their technical screen than hiring from Hacker News." # make_hiring_easier: "Make my hiring easier, please." - what: "O Que é o CodeCombat?" + what: "O que é o CodeCombat?" # what_blurb: "CodeCombat is a multiplayer browser programming game. Players write code to control their forces in battle against other developers. We support JavaScript, Python, Lua, Clojure, CoffeeScript, and Io." # cost: "How much do we charge?" # cost_blurb: "We charge 15% of first year's salary and offer a 100% money back guarantee for 90 days. We don't charge for candidates who are already actively being interviewed at your company." @@ -756,20 +756,20 @@ module.exports = nativeDescription: "Português europeu", englishDescription: "P # helpful_ambassadors: "Our Helpful Ambassadors:" classes: - archmage_title: "Archmage" - archmage_title_description: "(Coder)" - artisan_title: "Artisan" +# archmage_title: "Archmage" +# archmage_title_description: "(Coder)" + artisan_title: "Artesão" artisan_title_description: "(Construtor de Níveis)" - adventurer_title: "Adventurer" - adventurer_title_description: "(Play-tester de Níveis)" - scribe_title: "Scribe" + adventurer_title: "Aventureiro" + adventurer_title_description: "(Testador de Níveis)" + scribe_title: "Escrivão" scribe_title_description: "(Editor de Artigos)" - diplomat_title: "Diplomat" + diplomat_title: "Diplomata" diplomat_title_description: "(Tradutor)" - ambassador_title: "Ambassador" + ambassador_title: "Embaixador" ambassador_title_description: "(Suporte)" - counselor_title: "Counselor" - counselor_title_description: "(Expert/ Professor)" + counselor_title: "Conselheiro" + counselor_title_description: "(Especialista/Professor)" ladder: please_login: "Por favor, faz log in antes de jogar um jogo para o campeonato." diff --git a/app/schemas/models/level_component.coffee b/app/schemas/models/level_component.coffee index 738e954ce..162abc617 100644 --- a/app/schemas/models/level_component.coffee +++ b/app/schemas/models/level_component.coffee @@ -23,6 +23,7 @@ PropertyDocumentationSchema = c.object { required: ['name', 'type', 'description'] }, name: {type: 'string', title: 'Name', description: 'Name of the property.'} + codeLanguages: c.array {title: 'Specific Code Languages', description: 'If present, then only the languages specified will show this documentation. Leave unset for language-independent documentation.', format: 'code-languages-array'}, c.shortString(title: 'Code Language', description: 'A specific code language to show this documentation for.', format: 'code-language') # not actual JS types, just whatever they describe... type: c.shortString(title: 'Type', description: 'Intended type of the property.') description: diff --git a/app/treema-ext.coffee b/app/treema-ext.coffee index a56b4a45a..314f30149 100644 --- a/app/treema-ext.coffee +++ b/app/treema-ext.coffee @@ -210,6 +210,12 @@ class CodeLanguagesObjectTreema extends TreemaNode.nodeMap.object childPropertiesAvailable: -> (key for key in _.keys(codeLanguages) when not @data[key]?) +class CodeLanguageTreema extends TreemaNode.nodeMap.string + buildValueForEditing: (valEl) -> + super(valEl) + valEl.find('input').autocomplete(source: _.keys(codeLanguages), minLength: 0, delay: 0, autoFocus: true) + valEl + class CodeTreema extends TreemaNode.nodeMap.ace constructor: -> super(arguments...) @@ -412,6 +418,7 @@ module.exports.setup = -> TreemaNode.setNodeSubclass('version', VersionTreema) TreemaNode.setNodeSubclass('markdown', LiveEditingMarkup) TreemaNode.setNodeSubclass('code-languages-object', CodeLanguagesObjectTreema) + TreemaNode.setNodeSubclass('code-language', CodeLanguageTreema) TreemaNode.setNodeSubclass('code', CodeTreema) TreemaNode.setNodeSubclass('coffee', CoffeeTreema) TreemaNode.setNodeSubclass('javascript', JavaScriptTreema) diff --git a/app/views/play/level/tome/spell_debug_view.coffee b/app/views/play/level/tome/spell_debug_view.coffee index 8d08dca71..e69fadc98 100644 --- a/app/views/play/level/tome/spell_debug_view.coffee +++ b/app/views/play/level/tome/spell_debug_view.coffee @@ -38,6 +38,8 @@ module.exports = class DebugView extends View @lastFrameRequested = -1 @workerIsSimulating = false @spellHasChanged = false + @currentFrame = 0 + @frameRate = 10 #only time it won't be set is at very beginning @debouncedTooltipUpdate = _.debounce @updateTooltipProgress, 100 pad2: (num) -> diff --git a/app/views/play/level/tome/spell_view.coffee b/app/views/play/level/tome/spell_view.coffee index 7c3114f59..745e3c9fe 100644 --- a/app/views/play/level/tome/spell_view.coffee +++ b/app/views/play/level/tome/spell_view.coffee @@ -599,6 +599,7 @@ module.exports = class SpellView extends View null highlightComments: -> + return # Slightly buggy and not that great, so let's not do it. lines = $(@ace.container).find('.ace_text-layer .ace_line_group') session = @aceSession top = Math.floor @ace.renderer.getScrollTopRow()