From 2acebb54c69f3eea7c49c3fd0eb150db31d9a6e8 Mon Sep 17 00:00:00 2001 From: David Beckley Date: Sun, 21 Sep 2014 23:02:06 -0700 Subject: [PATCH 01/16] Fix #1005 --- app/schemas/models/user.coffee | 1 + server/routes/auth.coffee | 1 + server_setup.coffee | 5 ++++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/schemas/models/user.coffee b/app/schemas/models/user.coffee index cf5764c7f..8eb22fd42 100644 --- a/app/schemas/models/user.coffee +++ b/app/schemas/models/user.coffee @@ -17,6 +17,7 @@ UserSchema = c.object simulatedBy: 0 simulatedFor: 0 jobProfile: {} + lastIP: '0.0.0.0' c.extendNamedProperties UserSchema # let's have the name be the first property diff --git a/server/routes/auth.coffee b/server/routes/auth.coffee index 666954496..f5a557465 100644 --- a/server/routes/auth.coffee +++ b/server/routes/auth.coffee @@ -183,6 +183,7 @@ module.exports.makeNewUser = makeNewUser = (req) -> user = new User({anonymous: true}) user.set 'testGroupNumber', Math.floor(Math.random() * 256) # also in app/lib/auth user.set 'preferredLanguage', languages.languageCodeFromAcceptedLanguages req.acceptedLanguages + user.set 'lastIP', req.connection.remoteAddress createMailOptions = (receiver, password) -> # TODO: use email templates here diff --git a/server_setup.coffee b/server_setup.coffee index 8a76573ef..2d3bb0fd7 100644 --- a/server_setup.coffee +++ b/server_setup.coffee @@ -95,7 +95,10 @@ exports.setupMiddleware = (app) -> setupFallbackRouteToIndex = (app) -> app.all '*', (req, res) -> if req.user - sendMain(req, res) + req.user.set('lastIP', req.connection.remoteAddress) + req.user.save (err) => + # ignore save error + sendMain(req, res) else user = auth.makeNewUser(req) makeNext = (req, res) -> -> sendMain(req, res) From e109cbbbdce9b95571e665366d9988fa52216737 Mon Sep 17 00:00:00 2001 From: Nick Winter Date: Tue, 23 Sep 2014 11:39:56 -0700 Subject: [PATCH 02/16] Hid world map level icons for now. Hid play counts when fewer than 20 players. Disabled Zatanna for now until it can stop doing this.this.moveRight()(). Disabled hover debugger for new hero levels for now. Fixed bug with victory modal not allowing replay of completed non-hero levels. --- app/templates/play/world-map-view.jade | 10 ++++---- app/views/play/WorldMapView.coffee | 2 +- app/views/play/level/LevelLoadingView.coffee | 5 +++- app/views/play/level/PlayLevelView.coffee | 2 +- app/views/play/level/tome/Spell.coffee | 2 +- app/views/play/level/tome/SpellView.coffee | 26 +++++++++++--------- app/views/play/level/tome/TomeView.coffee | 1 + 7 files changed, 27 insertions(+), 21 deletions(-) diff --git a/app/templates/play/world-map-view.jade b/app/templates/play/world-map-view.jade index 951c4f30c..81ada39d8 100644 --- a/app/templates/play/world-map-view.jade +++ b/app/templates/play/world-map-view.jade @@ -10,10 +10,10 @@ a(href=level.type == 'hero' ? '#' : level.disabled ? "/play" : "/play/#{level.levelPath || 'level'}/#{level.id}", disabled=level.disabled, data-level-id=level.id, data-level-path=level.levelPath || 'level', data-level-name=level.name) div(style="left: #{level.x}%; bottom: #{level.y}%", class="level-shadow" + (next ? " next" : "") + " " + levelStatusMap[level.id] || "") .level-info-container(data-level-id=level.id) - if level.image - img.level-image(src="#{level.image}", alt="#{level.name}") - else - img.level-image(src="/images/generic-icon.png", alt="#{level.name}") + //if level.image + // img.level-image(src="#{level.image}", alt="#{level.name}") + //else + // img.level-image(src="/images/generic-icon.png", alt="#{level.name}") div(class="level-info " + (levelStatusMap[level.id] || "")) h3= level.name + (level.disabled ? " (Coming soon!)" : "") .level-description= level.description @@ -21,7 +21,7 @@ each i in Array(level.difficulty) i.icon-star - var playCount = levelPlayCountMap[level.id] - if playCount + if playCount && playCount > 20 div span.spr #{playCount.sessions} span(data-i18n="play.players") players diff --git a/app/views/play/WorldMapView.coffee b/app/views/play/WorldMapView.coffee index 13bed4dcd..7c7899abe 100644 --- a/app/views/play/WorldMapView.coffee +++ b/app/views/play/WorldMapView.coffee @@ -574,7 +574,7 @@ hero = [ { name: 'The Final Kithmaze' type: 'hero' - difficulty: 2 + difficulty: 1 id: 'the-final-kithmaze' image: '/file/db/level/526bda3fe79aefde2a003e36/mobile_artillery_icon.png' description: 'To escape you must find your way through an Elder Kithman\'s maze.' diff --git a/app/views/play/level/LevelLoadingView.coffee b/app/views/play/level/LevelLoadingView.coffee index 73aa77011..4f2ad5cea 100644 --- a/app/views/play/level/LevelLoadingView.coffee +++ b/app/views/play/level/LevelLoadingView.coffee @@ -49,11 +49,14 @@ module.exports = class LevelLoadingView extends CocoView startUnveiling: (e) -> Backbone.Mediator.publish 'level:loading-view-unveiling', {} + _.delay @onClickStartLevel, 1000 # If they never mouse-up for the click (or a modal shows up and interrupts the click), do it anyway. - onClickStartLevel: (e) -> + onClickStartLevel: (e) => + return if @destroyed @unveil() unveil: -> + return if @$el.hasClass 'unveiled' @$el.addClass 'unveiled' loadingDetails = @$el.find('.loading-details') duration = parseFloat loadingDetails.css 'transition-duration' diff --git a/app/views/play/level/PlayLevelView.coffee b/app/views/play/level/PlayLevelView.coffee index 5a72ed7c8..7c0857ee4 100644 --- a/app/views/play/level/PlayLevelView.coffee +++ b/app/views/play/level/PlayLevelView.coffee @@ -329,7 +329,7 @@ module.exports = class PlayLevelView extends RootView onLevelStarted: -> return unless @surface? @loadingView.showReady() - if window.currentModal and not window.currentModal.destroyed + if window.currentModal and not window.currentModal.destroyed and window.currentModal.constructor isnt VictoryModal return Backbone.Mediator.subscribeOnce 'modal:closed', @onLevelStarted, @ @surface.showLevel() if @otherSession and @level.get('type', true) isnt 'hero' diff --git a/app/views/play/level/tome/Spell.coffee b/app/views/play/level/tome/Spell.coffee index 7c0da531a..be55f5c35 100644 --- a/app/views/play/level/tome/Spell.coffee +++ b/app/views/play/level/tome/Spell.coffee @@ -41,7 +41,7 @@ module.exports = class Spell @source = sessionSource @thangs = {} if @canRead() # We can avoid creating these views if we'll never use them. - @view = new SpellView {spell: @, session: @session, worker: @worker} + @view = new SpellView {spell: @, level: options.level, session: @session, worker: @worker} @view.render() # Get it ready and code loaded in advance @tabView = new SpellListTabEntryView spell: @, supermodel: @supermodel, language: @language @tabView.render() diff --git a/app/views/play/level/tome/SpellView.coffee b/app/views/play/level/tome/SpellView.coffee index 8f71c0c02..aba6881cb 100644 --- a/app/views/play/level/tome/SpellView.coffee +++ b/app/views/play/level/tome/SpellView.coffee @@ -100,11 +100,11 @@ module.exports = class SpellView extends CocoView @toggleControls null, @writable @aceSession.selection.on 'changeCursor', @onCursorActivity $(@ace.container).find('.ace_gutter').on 'click', '.ace_error, .ace_warning, .ace_info', @onAnnotationClick - @zatanna = new Zatanna @ace, - - liveCompletion: aceConfig.liveCompletion ? true - completers: - keywords: false + # TODO: restore Zatanna when it totally stops the this.this.moveRight()(); problem + #@zatanna = new Zatanna @ace, + # liveCompletion: aceConfig.liveCompletion ? true + # completers: + # keywords: false createACEShortcuts: -> @aceCommands = aceCommands = [] @@ -192,6 +192,7 @@ module.exports = class SpellView extends CocoView @ace.clearSelection() addZatannaSnippets: (e) -> + return unless @zatanna snippetEntries = [] for owner, props of e.propGroups for prop in props @@ -250,6 +251,7 @@ module.exports = class SpellView extends CocoView @createToolbarView() createDebugView: -> + return if @options.level.get('type', true) is 'hero' # We'll turn this on later, maybe, but not yet. @debugView = new SpellDebugView ace: @ace, thang: @thang, spell:@spell @$el.append @debugView.render().$el.hide() @@ -258,7 +260,7 @@ module.exports = class SpellView extends CocoView @$el.append @toolbarView.render().$el onMouseOut: (e) -> - @debugView.onMouseOut e + @debugView?.onMouseOut e getSource: -> @ace.getValue() # could also do @firepad.getText() @@ -269,7 +271,7 @@ module.exports = class SpellView extends CocoView @thang = thang @spellThang = @spell.thangs[@thang.id] @createDebugView() unless @debugView - @debugView.thang = @thang + @debugView?.thang = @thang @toolbarView?.toggleFlow false @updateAether false, false # @addZatannaSnippets() @@ -589,7 +591,7 @@ module.exports = class SpellView extends CocoView @decoratedGutter[row] = '' if not executed.length or (@spell.name is 'plan' and @spellThang.castAether.metrics.statementsExecuted < 20) @toolbarView?.toggleFlow false - @debugView.setVariableStates {} + @debugView?.setVariableStates {} return lastExecuted = _.last executed @toolbarView?.toggleFlow true @@ -606,7 +608,7 @@ module.exports = class SpellView extends CocoView marked[start.row] = true markerType = 'fullLine' else - @debugView.setVariableStates state.variables + @debugView?.setVariableStates state.variables gotVariableStates = true markerType = 'text' markerRange = new Range start.row, start.col, end.row, end.col @@ -618,7 +620,7 @@ module.exports = class SpellView extends CocoView @aceSession.removeGutterDecoration start.row, @decoratedGutter[start.row] if @decoratedGutter[start.row] isnt '' @aceSession.addGutterDecoration start.row, clazz @decoratedGutter[start.row] = clazz - @debugView.setVariableStates {} unless gotVariableStates + @debugView?.setVariableStates {} unless gotVariableStates null highlightComments: -> @@ -676,12 +678,12 @@ module.exports = class SpellView extends CocoView @ace.setDisplayIndentGuides aceConfig.indentGuides # default false @ace.setShowInvisibles aceConfig.invisibles # default false @ace.setKeyboardHandler @keyBindings[aceConfig.keyBindings ? 'default'] - @zatanna.set 'liveCompletion', (aceConfig.liveCompletion ? false) + @zatanna?.set 'liveCompletion', (aceConfig.liveCompletion ? false) onChangeLanguage: (e) -> return unless @spell.canWrite() @aceSession.setMode @editModes[e.language] - # @zatanna.set 'language', @editModes[e.language].substr('ace/mode/') + # @zatanna?.set 'language', @editModes[e.language].substr('ace/mode/') wasDefault = @getSource() is @spell.originalSource @spell.setLanguage e.language @reloadCode true if wasDefault diff --git a/app/views/play/level/tome/TomeView.coffee b/app/views/play/level/tome/TomeView.coffee index add1f18b3..f79f4edab 100644 --- a/app/views/play/level/tome/TomeView.coffee +++ b/app/views/play/level/tome/TomeView.coffee @@ -137,6 +137,7 @@ module.exports = class TomeView extends CocoView spectateView: @options.spectateView spectateOpponentCodeLanguage: @options.spectateOpponentCodeLanguage levelID: @options.levelID + level: @options.level for thangID, spellKeys of @thangSpells thang = world.getThangByID thangID From ba4d53e92b4038d9bb89bdb75e77f8c5704b85e3 Mon Sep 17 00:00:00 2001 From: Imperadeiro98 Date: Tue, 23 Sep 2014 21:37:08 +0100 Subject: [PATCH 03/16] Update pt-PT.coffee --- app/locale/pt-PT.coffee | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/locale/pt-PT.coffee b/app/locale/pt-PT.coffee index 3649717a1..a6841b74c 100644 --- a/app/locale/pt-PT.coffee +++ b/app/locale/pt-PT.coffee @@ -383,7 +383,7 @@ module.exports = nativeDescription: "Português (Portugal)", englishDescription: guide: "Guia" restart: "Reiniciar" goals: "Objetivos" -# goal: "Goal" + goal: "Objetivo" success: "Successo!" incomplete: "Incompletos" timed_out: "Ficou sem tempo" @@ -411,10 +411,10 @@ module.exports = nativeDescription: "Português (Portugal)", englishDescription: tome_cast_button_castable: "Lançar Feitiço" # Temporary, if tome_cast_button_run isn't translated. tome_cast_button_casting: "A Lançar" # Temporary, if tome_cast_button_running isn't translated. tome_cast_button_cast: "Feitiço Lançado" # Temporary, if tome_cast_button_ran isn't translated. -# tome_cast_button_run: "Run" -# tome_cast_button_running: "Running" -# tome_cast_button_ran: "Ran" -# tome_submit_button: "Submit" + tome_cast_button_run: "Correr" + tome_cast_button_running: "A Correr" + tome_cast_button_ran: "Corrido" + tome_submit_button: "Submeter" tome_select_spell: "Selecione um Feitiço" tome_select_a_thang: "Selecione Alguém para " tome_available_spells: "Feitiços Disponíveis" @@ -423,7 +423,7 @@ module.exports = nativeDescription: "Português (Portugal)", englishDescription: skip_tutorial: "Saltar (esc)" keyboard_shortcuts: "Atalhos do Teclado" loading_ready: "Pronto!" -# loading_start: "Start Level" + loading_start: "Iniciar Nível" tip_insert_positions: "Pressione Shift e Clique num ponto do mapa para inseri-lo no editor de feitiços." tip_toggle_play: "Alterne entre Jogar e Pausar com Ctrl+P." tip_scrub_shortcut: "Ctrl+[ rebobina e Ctrl+] avança." From 27dece30f776de8ecc949a63001d4927c7e2c811 Mon Sep 17 00:00:00 2001 From: David Beckley Date: Tue, 23 Sep 2014 17:03:53 -0700 Subject: [PATCH 04/16] Send response before saving to database --- server_setup.coffee | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/server_setup.coffee b/server_setup.coffee index 2d3bb0fd7..7b14c273d 100644 --- a/server_setup.coffee +++ b/server_setup.coffee @@ -95,10 +95,9 @@ exports.setupMiddleware = (app) -> setupFallbackRouteToIndex = (app) -> app.all '*', (req, res) -> if req.user + sendMain(req, res) req.user.set('lastIP', req.connection.remoteAddress) - req.user.save (err) => - # ignore save error - sendMain(req, res) + req.user.save else user = auth.makeNewUser(req) makeNext = (req, res) -> -> sendMain(req, res) From 069657a1d5e43bacfdae376df17f85483f6889ca Mon Sep 17 00:00:00 2001 From: David Beckley Date: Tue, 23 Sep 2014 17:07:54 -0700 Subject: [PATCH 05/16] Call save rather than return it --- server_setup.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server_setup.coffee b/server_setup.coffee index 7b14c273d..033055e7c 100644 --- a/server_setup.coffee +++ b/server_setup.coffee @@ -97,7 +97,7 @@ setupFallbackRouteToIndex = (app) -> if req.user sendMain(req, res) req.user.set('lastIP', req.connection.remoteAddress) - req.user.save + req.user.save() else user = auth.makeNewUser(req) makeNext = (req, res) -> -> sendMain(req, res) From a57cc0126e46e39d6b0e1aa9899a905f74295b04 Mon Sep 17 00:00:00 2001 From: Nick Winter Date: Tue, 23 Sep 2014 17:13:41 -0700 Subject: [PATCH 06/16] A few more tweaks for #1584. Hero victory now always goes to world map. --- app/locale/en.coffee | 1 + app/schemas/models/user.coffee | 2 +- app/templates/play/level/modal/victory.jade | 4 ++-- server/users/user_handler.coffee | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/locale/en.coffee b/app/locale/en.coffee index ae6758a46..b508c1b15 100644 --- a/app/locale/en.coffee +++ b/app/locale/en.coffee @@ -400,6 +400,7 @@ victory_rate_the_level: "Rate the level: " victory_return_to_ladder: "Return to Ladder" victory_play_next_level: "Play Next Level" + victory_play_continue: "Continue" victory_go_home: "Go Home" victory_review: "Tell us more!" victory_hour_of_code_done: "Are You Done?" diff --git a/app/schemas/models/user.coffee b/app/schemas/models/user.coffee index 8eb22fd42..3408167e9 100644 --- a/app/schemas/models/user.coffee +++ b/app/schemas/models/user.coffee @@ -17,7 +17,6 @@ UserSchema = c.object simulatedBy: 0 simulatedFor: 0 jobProfile: {} - lastIP: '0.0.0.0' c.extendNamedProperties UserSchema # let's have the name be the first property @@ -91,6 +90,7 @@ _.extend UserSchema.properties, mailChimp: {type: 'object'} hourOfCode: {type: 'boolean'} hourOfCodeComplete: {type: 'boolean'} + lastIP: {type: 'string'} emailLower: c.shortString() nameLower: c.shortString() diff --git a/app/templates/play/level/modal/victory.jade b/app/templates/play/level/modal/victory.jade index 0620c91e8..f3650785a 100644 --- a/app/templates/play/level/modal/victory.jade +++ b/app/templates/play/level/modal/victory.jade @@ -15,10 +15,10 @@ block modal-footer-content .ladder-submission-view else if level.get('type') === 'ladder' a.btn.btn-primary(href="/play/ladder/#{level.get('slug')}#my-matches", data-dismiss="modal", data-i18n="play_level.victory_go_ladder") Return to Ladder + else if level.get('type', true) === 'hero' + a.btn.btn-success(href="/play-hero", data-dismiss="modal", data-i18n="play_level.victory_continue") Continue else if hasNextLevel button.btn.btn-success.next-level-button(data-dismiss="modal", data-i18n="play_level.victory_play_next_level") Play Next Level - else if level.get('type', true) === 'hero' - a.btn.btn-success(href="/play-hero", data-dismiss="modal", data-i18n="play_level.victory_play_next_level") Play Next Level else a.btn.btn-primary(href="/", data-dismiss="modal", data-i18n="play_level.victory_go_home") Go Home if me.get('anonymous') diff --git a/server/users/user_handler.coffee b/server/users/user_handler.coffee index d2d718212..0e0e989ee 100644 --- a/server/users/user_handler.coffee +++ b/server/users/user_handler.coffee @@ -15,7 +15,7 @@ EarnedAchievement = require '../achievements/EarnedAchievement' UserRemark = require './remarks/UserRemark' {isID} = require '../lib/utils' -serverProperties = ['passwordHash', 'emailLower', 'nameLower', 'passwordReset'] +serverProperties = ['passwordHash', 'emailLower', 'nameLower', 'passwordReset', 'lastIP'] candidateProperties = [ 'jobProfile', 'jobProfileApproved', 'jobProfileNotes' ] From 8d7ed040af95628a0c4e3f209743acec25299de6 Mon Sep 17 00:00:00 2001 From: David Beckley Date: Tue, 23 Sep 2014 17:46:02 -0700 Subject: [PATCH 07/16] Add more quotes for #710 --- app/locale/en.coffee | 3 +++ app/templates/play/level/level_loading.jade | 3 +++ 2 files changed, 6 insertions(+) diff --git a/app/locale/en.coffee b/app/locale/en.coffee index ae6758a46..22ede92d2 100644 --- a/app/locale/en.coffee +++ b/app/locale/en.coffee @@ -452,6 +452,9 @@ tip_talk_is_cheap: "Talk is cheap. Show me the code. - Linus Torvalds" tip_first_language: "The most disastrous thing that you can ever learn is your first programming language. - Alan Kay" tip_hardware_problem: "Q: How many programmers does it take to change a light bulb? A: None, it's a hardware problem." + tip_hofstadters_law: "Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law." + tip_premature_optimization: "Premature optimization is the root of all evil. - Donald Knuth" + tip_brute_force: "When in doubt, use brute force. - Ken Thompson" time_current: "Now:" time_total: "Max:" time_goto: "Go to:" diff --git a/app/templates/play/level/level_loading.jade b/app/templates/play/level/level_loading.jade index 811b979f5..7b398b345 100644 --- a/app/templates/play/level/level_loading.jade +++ b/app/templates/play/level/level_loading.jade @@ -37,6 +37,9 @@ strong.tip.rare(data-i18n='play_level.tip_documented_bug') A documented bug is not a bug; it is a feature. strong.tip.rare(data-i18n='play_level.tip_talk_is_cheap') Talk is cheap. Show me the code. - Linus Torvalds strong.tip.rare(data-i18n='play_level.tip_first_language') The most disastrous thing that you can ever learn is your first programming language. - Alan Kay + strong.tip.rare(data-i18n='play_level.tip_hofstadters_law') Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law. + strong.tip.rare(data-i18n='play_level.tip_premature_optimization') Premature optimization is the root of all evil - Donald Knuth + strong.tip.rare(data-i18n='play_level.tip_brute_force') When in doubt, use brute force. - Ken Thompson strong.tip.rare span(data-i18n='play_level.tip_harry') Yer a Wizard, span= me.get('name', true) From f27c13e6eb64882a3066807f5656c61adb8e88b3 Mon Sep 17 00:00:00 2001 From: David Beckley Date: Tue, 23 Sep 2014 17:48:02 -0700 Subject: [PATCH 08/16] Propagate i18n --- app/locale/ar.coffee | 3 +++ app/locale/bg.coffee | 3 +++ app/locale/ca.coffee | 3 +++ app/locale/cs.coffee | 3 +++ app/locale/da.coffee | 3 +++ app/locale/de-AT.coffee | 3 +++ app/locale/de-CH.coffee | 3 +++ app/locale/de-DE.coffee | 3 +++ app/locale/el.coffee | 3 +++ app/locale/en-AU.coffee | 3 +++ app/locale/en-GB.coffee | 3 +++ app/locale/en-US.coffee | 3 +++ app/locale/es-419.coffee | 3 +++ app/locale/es-ES.coffee | 3 +++ app/locale/fa.coffee | 3 +++ app/locale/fi.coffee | 3 +++ app/locale/fr.coffee | 3 +++ app/locale/he.coffee | 3 +++ app/locale/hi.coffee | 3 +++ app/locale/hu.coffee | 3 +++ app/locale/id.coffee | 3 +++ app/locale/it.coffee | 3 +++ app/locale/ja.coffee | 3 +++ app/locale/ko.coffee | 3 +++ app/locale/lt.coffee | 3 +++ app/locale/ms.coffee | 3 +++ app/locale/nb.coffee | 3 +++ app/locale/nl-BE.coffee | 3 +++ app/locale/nl-NL.coffee | 3 +++ app/locale/nn.coffee | 3 +++ app/locale/no.coffee | 3 +++ app/locale/pl.coffee | 3 +++ app/locale/pt-BR.coffee | 3 +++ app/locale/pt-PT.coffee | 3 +++ app/locale/ro.coffee | 3 +++ app/locale/ru.coffee | 3 +++ app/locale/sk.coffee | 3 +++ app/locale/sl.coffee | 3 +++ app/locale/sr.coffee | 3 +++ app/locale/sv.coffee | 3 +++ app/locale/th.coffee | 3 +++ app/locale/tr.coffee | 3 +++ app/locale/uk.coffee | 3 +++ app/locale/ur.coffee | 3 +++ app/locale/vi.coffee | 3 +++ app/locale/zh-HANS.coffee | 3 +++ app/locale/zh-HANT.coffee | 3 +++ app/locale/zh-WUU-HANS.coffee | 3 +++ app/locale/zh-WUU-HANT.coffee | 3 +++ 49 files changed, 147 insertions(+) diff --git a/app/locale/ar.coffee b/app/locale/ar.coffee index 73cdd555e..ebadb0b11 100644 --- a/app/locale/ar.coffee +++ b/app/locale/ar.coffee @@ -452,6 +452,9 @@ module.exports = nativeDescription: "العربية", englishDescription: "Arabi # tip_talk_is_cheap: "Talk is cheap. Show me the code. - Linus Torvalds" # tip_first_language: "The most disastrous thing that you can ever learn is your first programming language. - Alan Kay" # tip_hardware_problem: "Q: How many programmers does it take to change a light bulb? A: None, it's a hardware problem." +# tip_hofstadters_law: "Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law." +# tip_premature_optimization: "Premature optimization is the root of all evil. - Donald Knuth" +# tip_brute_force: "When in doubt, use brute force. - Ken Thompson" # time_current: "Now:" # time_total: "Max:" # time_goto: "Go to:" diff --git a/app/locale/bg.coffee b/app/locale/bg.coffee index 74ec7cb52..40585ab7b 100644 --- a/app/locale/bg.coffee +++ b/app/locale/bg.coffee @@ -452,6 +452,9 @@ module.exports = nativeDescription: "български език", englishDescri # tip_talk_is_cheap: "Talk is cheap. Show me the code. - Linus Torvalds" # tip_first_language: "The most disastrous thing that you can ever learn is your first programming language. - Alan Kay" # tip_hardware_problem: "Q: How many programmers does it take to change a light bulb? A: None, it's a hardware problem." +# tip_hofstadters_law: "Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law." +# tip_premature_optimization: "Premature optimization is the root of all evil. - Donald Knuth" +# tip_brute_force: "When in doubt, use brute force. - Ken Thompson" # time_current: "Now:" # time_total: "Max:" # time_goto: "Go to:" diff --git a/app/locale/ca.coffee b/app/locale/ca.coffee index ebd9638c4..0fd22e96c 100644 --- a/app/locale/ca.coffee +++ b/app/locale/ca.coffee @@ -452,6 +452,9 @@ module.exports = nativeDescription: "Català", englishDescription: "Catalan", tr # tip_talk_is_cheap: "Talk is cheap. Show me the code. - Linus Torvalds" # tip_first_language: "The most disastrous thing that you can ever learn is your first programming language. - Alan Kay" # tip_hardware_problem: "Q: How many programmers does it take to change a light bulb? A: None, it's a hardware problem." +# tip_hofstadters_law: "Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law." +# tip_premature_optimization: "Premature optimization is the root of all evil. - Donald Knuth" +# tip_brute_force: "When in doubt, use brute force. - Ken Thompson" # time_current: "Now:" # time_total: "Max:" # time_goto: "Go to:" diff --git a/app/locale/cs.coffee b/app/locale/cs.coffee index adce49193..57000b49e 100644 --- a/app/locale/cs.coffee +++ b/app/locale/cs.coffee @@ -452,6 +452,9 @@ module.exports = nativeDescription: "čeština", englishDescription: "Czech", tr # tip_talk_is_cheap: "Talk is cheap. Show me the code. - Linus Torvalds" # tip_first_language: "The most disastrous thing that you can ever learn is your first programming language. - Alan Kay" # tip_hardware_problem: "Q: How many programmers does it take to change a light bulb? A: None, it's a hardware problem." +# tip_hofstadters_law: "Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law." +# tip_premature_optimization: "Premature optimization is the root of all evil. - Donald Knuth" +# tip_brute_force: "When in doubt, use brute force. - Ken Thompson" # time_current: "Now:" # time_total: "Max:" # time_goto: "Go to:" diff --git a/app/locale/da.coffee b/app/locale/da.coffee index 240a7761a..b8a438973 100644 --- a/app/locale/da.coffee +++ b/app/locale/da.coffee @@ -452,6 +452,9 @@ module.exports = nativeDescription: "dansk", englishDescription: "Danish", trans # tip_talk_is_cheap: "Talk is cheap. Show me the code. - Linus Torvalds" # tip_first_language: "The most disastrous thing that you can ever learn is your first programming language. - Alan Kay" # tip_hardware_problem: "Q: How many programmers does it take to change a light bulb? A: None, it's a hardware problem." +# tip_hofstadters_law: "Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law." +# tip_premature_optimization: "Premature optimization is the root of all evil. - Donald Knuth" +# tip_brute_force: "When in doubt, use brute force. - Ken Thompson" # time_current: "Now:" # time_total: "Max:" # time_goto: "Go to:" diff --git a/app/locale/de-AT.coffee b/app/locale/de-AT.coffee index 563cf941c..3917d496e 100644 --- a/app/locale/de-AT.coffee +++ b/app/locale/de-AT.coffee @@ -452,6 +452,9 @@ module.exports = nativeDescription: "Deutsch (Österreich)", englishDescription: tip_talk_is_cheap: "Reden ist billig. Zeig mir den Code. - Linus Torvalds" tip_first_language: "Das schwierigste, das du jemals lernen wirst, ist die erste Programmiersprache. - Alan Kay" tip_hardware_problem: "Q: Wie viele Programmierer braucht man um eine Glühbirne auszuwechseln? A: Keine, es ist ein Hardware-Problem." +# tip_hofstadters_law: "Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law." +# tip_premature_optimization: "Premature optimization is the root of all evil. - Donald Knuth" +# tip_brute_force: "When in doubt, use brute force. - Ken Thompson" time_current: "Aktuell" time_total: "Total" time_goto: "Gehe zu" diff --git a/app/locale/de-CH.coffee b/app/locale/de-CH.coffee index eedfd0517..d45eda4ee 100644 --- a/app/locale/de-CH.coffee +++ b/app/locale/de-CH.coffee @@ -452,6 +452,9 @@ module.exports = nativeDescription: "Deutsch (Schweiz)", englishDescription: "Ge tip_talk_is_cheap: "Rede isch billig. Zeig mir de Code. - Linus Torvalds" tip_first_language: "S Katastrophalste wo du chasch lerne, isch dini erst Programmiersproch. - Alan Kay" tip_hardware_problem: "Q: Wie viel Programmierer bruuchts zum e Glüehbire uswechsle? A: Keine, da isch es Hardware Problem." +# tip_hofstadters_law: "Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law." +# tip_premature_optimization: "Premature optimization is the root of all evil. - Donald Knuth" +# tip_brute_force: "When in doubt, use brute force. - Ken Thompson" time_current: "Jetzt:" time_total: "Max:" time_goto: "Goh zu:" diff --git a/app/locale/de-DE.coffee b/app/locale/de-DE.coffee index e2363cd60..d8bc668ac 100644 --- a/app/locale/de-DE.coffee +++ b/app/locale/de-DE.coffee @@ -452,6 +452,9 @@ module.exports = nativeDescription: "Deutsch (Deutschland)", englishDescription: tip_talk_is_cheap: "Reden ist billig. Zeig mir den Code. - Linus Torvalds" tip_first_language: "Das schwierigste, das du jemals lernen wirst, ist die erste Programmiersprache. - Alan Kay" tip_hardware_problem: "Q: Wie viele Programmierer braucht man um eine Glühbirne auszuwechseln? A: Keine, es ist ein Hardware-Problem." +# tip_hofstadters_law: "Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law." +# tip_premature_optimization: "Premature optimization is the root of all evil. - Donald Knuth" +# tip_brute_force: "When in doubt, use brute force. - Ken Thompson" time_current: "Aktuell" time_total: "Total" time_goto: "Gehe zu" diff --git a/app/locale/el.coffee b/app/locale/el.coffee index 99e5b665f..fcd7da4ab 100644 --- a/app/locale/el.coffee +++ b/app/locale/el.coffee @@ -452,6 +452,9 @@ module.exports = nativeDescription: "Ελληνικά", englishDescription: "Gre # tip_talk_is_cheap: "Talk is cheap. Show me the code. - Linus Torvalds" # tip_first_language: "The most disastrous thing that you can ever learn is your first programming language. - Alan Kay" # tip_hardware_problem: "Q: How many programmers does it take to change a light bulb? A: None, it's a hardware problem." +# tip_hofstadters_law: "Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law." +# tip_premature_optimization: "Premature optimization is the root of all evil. - Donald Knuth" +# tip_brute_force: "When in doubt, use brute force. - Ken Thompson" # time_current: "Now:" # time_total: "Max:" # time_goto: "Go to:" diff --git a/app/locale/en-AU.coffee b/app/locale/en-AU.coffee index 611087fef..09c37ea4d 100644 --- a/app/locale/en-AU.coffee +++ b/app/locale/en-AU.coffee @@ -452,6 +452,9 @@ module.exports = nativeDescription: "English (AU)", englishDescription: "English # tip_talk_is_cheap: "Talk is cheap. Show me the code. - Linus Torvalds" # tip_first_language: "The most disastrous thing that you can ever learn is your first programming language. - Alan Kay" # tip_hardware_problem: "Q: How many programmers does it take to change a light bulb? A: None, it's a hardware problem." +# tip_hofstadters_law: "Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law." +# tip_premature_optimization: "Premature optimization is the root of all evil. - Donald Knuth" +# tip_brute_force: "When in doubt, use brute force. - Ken Thompson" # time_current: "Now:" # time_total: "Max:" # time_goto: "Go to:" diff --git a/app/locale/en-GB.coffee b/app/locale/en-GB.coffee index 279439348..615de37f8 100644 --- a/app/locale/en-GB.coffee +++ b/app/locale/en-GB.coffee @@ -452,6 +452,9 @@ module.exports = nativeDescription: "English (UK)", englishDescription: "English # tip_talk_is_cheap: "Talk is cheap. Show me the code. - Linus Torvalds" # tip_first_language: "The most disastrous thing that you can ever learn is your first programming language. - Alan Kay" # tip_hardware_problem: "Q: How many programmers does it take to change a light bulb? A: None, it's a hardware problem." +# tip_hofstadters_law: "Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law." +# tip_premature_optimization: "Premature optimization is the root of all evil. - Donald Knuth" +# tip_brute_force: "When in doubt, use brute force. - Ken Thompson" # time_current: "Now:" # time_total: "Max:" # time_goto: "Go to:" diff --git a/app/locale/en-US.coffee b/app/locale/en-US.coffee index 97cd7df7e..4b970520e 100644 --- a/app/locale/en-US.coffee +++ b/app/locale/en-US.coffee @@ -452,6 +452,9 @@ module.exports = nativeDescription: "English (US)", englishDescription: "English # tip_talk_is_cheap: "Talk is cheap. Show me the code. - Linus Torvalds" # tip_first_language: "The most disastrous thing that you can ever learn is your first programming language. - Alan Kay" # tip_hardware_problem: "Q: How many programmers does it take to change a light bulb? A: None, it's a hardware problem." +# tip_hofstadters_law: "Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law." +# tip_premature_optimization: "Premature optimization is the root of all evil. - Donald Knuth" +# tip_brute_force: "When in doubt, use brute force. - Ken Thompson" # time_current: "Now:" # time_total: "Max:" # time_goto: "Go to:" diff --git a/app/locale/es-419.coffee b/app/locale/es-419.coffee index ea4fd1900..4b2cc94db 100644 --- a/app/locale/es-419.coffee +++ b/app/locale/es-419.coffee @@ -452,6 +452,9 @@ module.exports = nativeDescription: "español (América Latina)", englishDescrip tip_talk_is_cheap: "Hablar es barato. Muestrame el código. - Linus Torvalds" tip_first_language: "La cosa más desastroza que puedes aprender es tu primer lenguaje de programación. - Alan Kay" # tip_hardware_problem: "Q: How many programmers does it take to change a light bulb? A: None, it's a hardware problem." +# tip_hofstadters_law: "Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law." +# tip_premature_optimization: "Premature optimization is the root of all evil. - Donald Knuth" +# tip_brute_force: "When in doubt, use brute force. - Ken Thompson" time_current: "Ahora:" time_total: "Max:" time_goto: "Ir a:" diff --git a/app/locale/es-ES.coffee b/app/locale/es-ES.coffee index 0afd0a12c..4275bf6bf 100644 --- a/app/locale/es-ES.coffee +++ b/app/locale/es-ES.coffee @@ -452,6 +452,9 @@ module.exports = nativeDescription: "español (ES)", englishDescription: "Spanis tip_talk_is_cheap: "Hablar es fácil. Enséñame el código. - Linus Torvalds" tip_first_language: "La cosa más desastrosa que puedes aprender es tu primer lenguaje de programación. - Alan Kay" tip_hardware_problem: "P: Cuantos programadores hacen falta para cambiar una bombilla? R: Ninguno, es un problema de hardware." +# tip_hofstadters_law: "Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law." +# tip_premature_optimization: "Premature optimization is the root of all evil. - Donald Knuth" +# tip_brute_force: "When in doubt, use brute force. - Ken Thompson" time_current: "Ahora:" time_total: "Máx:" time_goto: "Ir a:" diff --git a/app/locale/fa.coffee b/app/locale/fa.coffee index c44349749..ae3d0373a 100644 --- a/app/locale/fa.coffee +++ b/app/locale/fa.coffee @@ -452,6 +452,9 @@ module.exports = nativeDescription: "فارسی", englishDescription: "Persian", # tip_talk_is_cheap: "Talk is cheap. Show me the code. - Linus Torvalds" # tip_first_language: "The most disastrous thing that you can ever learn is your first programming language. - Alan Kay" # tip_hardware_problem: "Q: How many programmers does it take to change a light bulb? A: None, it's a hardware problem." +# tip_hofstadters_law: "Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law." +# tip_premature_optimization: "Premature optimization is the root of all evil. - Donald Knuth" +# tip_brute_force: "When in doubt, use brute force. - Ken Thompson" # time_current: "Now:" # time_total: "Max:" # time_goto: "Go to:" diff --git a/app/locale/fi.coffee b/app/locale/fi.coffee index 88e3a1b6f..62a79f0e6 100644 --- a/app/locale/fi.coffee +++ b/app/locale/fi.coffee @@ -452,6 +452,9 @@ module.exports = nativeDescription: "suomi", englishDescription: "Finnish", tran # tip_talk_is_cheap: "Talk is cheap. Show me the code. - Linus Torvalds" # tip_first_language: "The most disastrous thing that you can ever learn is your first programming language. - Alan Kay" # tip_hardware_problem: "Q: How many programmers does it take to change a light bulb? A: None, it's a hardware problem." +# tip_hofstadters_law: "Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law." +# tip_premature_optimization: "Premature optimization is the root of all evil. - Donald Knuth" +# tip_brute_force: "When in doubt, use brute force. - Ken Thompson" # time_current: "Now:" # time_total: "Max:" # time_goto: "Go to:" diff --git a/app/locale/fr.coffee b/app/locale/fr.coffee index e0faf3997..fa743c337 100644 --- a/app/locale/fr.coffee +++ b/app/locale/fr.coffee @@ -452,6 +452,9 @@ module.exports = nativeDescription: "français", englishDescription: "French", t # tip_talk_is_cheap: "Talk is cheap. Show me the code. - Linus Torvalds" # tip_first_language: "The most disastrous thing that you can ever learn is your first programming language. - Alan Kay" # tip_hardware_problem: "Q: How many programmers does it take to change a light bulb? A: None, it's a hardware problem." +# tip_hofstadters_law: "Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law." +# tip_premature_optimization: "Premature optimization is the root of all evil. - Donald Knuth" +# tip_brute_force: "When in doubt, use brute force. - Ken Thompson" time_current: "Maintenant:" time_total: "Max:" time_goto: "Allez a:" diff --git a/app/locale/he.coffee b/app/locale/he.coffee index a41778774..e2614287f 100644 --- a/app/locale/he.coffee +++ b/app/locale/he.coffee @@ -452,6 +452,9 @@ module.exports = nativeDescription: "עברית", englishDescription: "Hebrew", # tip_talk_is_cheap: "Talk is cheap. Show me the code. - Linus Torvalds" # tip_first_language: "The most disastrous thing that you can ever learn is your first programming language. - Alan Kay" # tip_hardware_problem: "Q: How many programmers does it take to change a light bulb? A: None, it's a hardware problem." +# tip_hofstadters_law: "Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law." +# tip_premature_optimization: "Premature optimization is the root of all evil. - Donald Knuth" +# tip_brute_force: "When in doubt, use brute force. - Ken Thompson" # time_current: "Now:" # time_total: "Max:" # time_goto: "Go to:" diff --git a/app/locale/hi.coffee b/app/locale/hi.coffee index d2c28800e..d5f8681f1 100644 --- a/app/locale/hi.coffee +++ b/app/locale/hi.coffee @@ -452,6 +452,9 @@ module.exports = nativeDescription: "मानक हिन्दी", englishDe # tip_talk_is_cheap: "Talk is cheap. Show me the code. - Linus Torvalds" # tip_first_language: "The most disastrous thing that you can ever learn is your first programming language. - Alan Kay" # tip_hardware_problem: "Q: How many programmers does it take to change a light bulb? A: None, it's a hardware problem." +# tip_hofstadters_law: "Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law." +# tip_premature_optimization: "Premature optimization is the root of all evil. - Donald Knuth" +# tip_brute_force: "When in doubt, use brute force. - Ken Thompson" # time_current: "Now:" # time_total: "Max:" # time_goto: "Go to:" diff --git a/app/locale/hu.coffee b/app/locale/hu.coffee index 97090aee6..02fb8038a 100644 --- a/app/locale/hu.coffee +++ b/app/locale/hu.coffee @@ -452,6 +452,9 @@ module.exports = nativeDescription: "magyar", englishDescription: "Hungarian", t tip_talk_is_cheap: "Dumálni könnyű. Mutasd a kódot!. - Linus Torvalds" # tip_first_language: "The most disastrous thing that you can ever learn is your first programming language. - Alan Kay" # tip_hardware_problem: "Q: How many programmers does it take to change a light bulb? A: None, it's a hardware problem." +# tip_hofstadters_law: "Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law." +# tip_premature_optimization: "Premature optimization is the root of all evil. - Donald Knuth" +# tip_brute_force: "When in doubt, use brute force. - Ken Thompson" time_current: "Most:" # time_total: "Max:" # time_goto: "Go to:" diff --git a/app/locale/id.coffee b/app/locale/id.coffee index ee52dc477..7103e797d 100644 --- a/app/locale/id.coffee +++ b/app/locale/id.coffee @@ -452,6 +452,9 @@ module.exports = nativeDescription: "Bahasa Indonesia", englishDescription: "Ind # tip_talk_is_cheap: "Talk is cheap. Show me the code. - Linus Torvalds" # tip_first_language: "The most disastrous thing that you can ever learn is your first programming language. - Alan Kay" # tip_hardware_problem: "Q: How many programmers does it take to change a light bulb? A: None, it's a hardware problem." +# tip_hofstadters_law: "Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law." +# tip_premature_optimization: "Premature optimization is the root of all evil. - Donald Knuth" +# tip_brute_force: "When in doubt, use brute force. - Ken Thompson" # time_current: "Now:" # time_total: "Max:" # time_goto: "Go to:" diff --git a/app/locale/it.coffee b/app/locale/it.coffee index 1db6e7a21..b06c46f22 100644 --- a/app/locale/it.coffee +++ b/app/locale/it.coffee @@ -452,6 +452,9 @@ module.exports = nativeDescription: "Italiano", englishDescription: "Italian", t # tip_talk_is_cheap: "Talk is cheap. Show me the code. - Linus Torvalds" # tip_first_language: "The most disastrous thing that you can ever learn is your first programming language. - Alan Kay" # tip_hardware_problem: "Q: How many programmers does it take to change a light bulb? A: None, it's a hardware problem." +# tip_hofstadters_law: "Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law." +# tip_premature_optimization: "Premature optimization is the root of all evil. - Donald Knuth" +# tip_brute_force: "When in doubt, use brute force. - Ken Thompson" # time_current: "Now:" # time_total: "Max:" # time_goto: "Go to:" diff --git a/app/locale/ja.coffee b/app/locale/ja.coffee index 0ea77ce14..43965105e 100644 --- a/app/locale/ja.coffee +++ b/app/locale/ja.coffee @@ -452,6 +452,9 @@ module.exports = nativeDescription: "日本語", englishDescription: "Japanese", # tip_talk_is_cheap: "Talk is cheap. Show me the code. - Linus Torvalds" # tip_first_language: "The most disastrous thing that you can ever learn is your first programming language. - Alan Kay" # tip_hardware_problem: "Q: How many programmers does it take to change a light bulb? A: None, it's a hardware problem." +# tip_hofstadters_law: "Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law." +# tip_premature_optimization: "Premature optimization is the root of all evil. - Donald Knuth" +# tip_brute_force: "When in doubt, use brute force. - Ken Thompson" # time_current: "Now:" # time_total: "Max:" # time_goto: "Go to:" diff --git a/app/locale/ko.coffee b/app/locale/ko.coffee index 63147f454..cd09f086b 100644 --- a/app/locale/ko.coffee +++ b/app/locale/ko.coffee @@ -452,6 +452,9 @@ module.exports = nativeDescription: "한국어", englishDescription: "Korean", t tip_talk_is_cheap: "떠드는 건 가치가 없어요. 코드를 보여줘봐요. - Linus Torvalds" # tip_first_language: "The most disastrous thing that you can ever learn is your first programming language. - Alan Kay" # tip_hardware_problem: "Q: How many programmers does it take to change a light bulb? A: None, it's a hardware problem." +# tip_hofstadters_law: "Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law." +# tip_premature_optimization: "Premature optimization is the root of all evil. - Donald Knuth" +# tip_brute_force: "When in doubt, use brute force. - Ken Thompson" # time_current: "Now:" # time_total: "Max:" # time_goto: "Go to:" diff --git a/app/locale/lt.coffee b/app/locale/lt.coffee index 9bd874d15..28b7612b2 100644 --- a/app/locale/lt.coffee +++ b/app/locale/lt.coffee @@ -452,6 +452,9 @@ module.exports = nativeDescription: "lietuvių kalba", englishDescription: "Lith # tip_talk_is_cheap: "Talk is cheap. Show me the code. - Linus Torvalds" # tip_first_language: "The most disastrous thing that you can ever learn is your first programming language. - Alan Kay" # tip_hardware_problem: "Q: How many programmers does it take to change a light bulb? A: None, it's a hardware problem." +# tip_hofstadters_law: "Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law." +# tip_premature_optimization: "Premature optimization is the root of all evil. - Donald Knuth" +# tip_brute_force: "When in doubt, use brute force. - Ken Thompson" # time_current: "Now:" # time_total: "Max:" # time_goto: "Go to:" diff --git a/app/locale/ms.coffee b/app/locale/ms.coffee index 471d58d14..cbb98efaa 100644 --- a/app/locale/ms.coffee +++ b/app/locale/ms.coffee @@ -452,6 +452,9 @@ module.exports = nativeDescription: "Bahasa Melayu", englishDescription: "Bahasa # tip_talk_is_cheap: "Talk is cheap. Show me the code. - Linus Torvalds" # tip_first_language: "The most disastrous thing that you can ever learn is your first programming language. - Alan Kay" # tip_hardware_problem: "Q: How many programmers does it take to change a light bulb? A: None, it's a hardware problem." +# tip_hofstadters_law: "Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law." +# tip_premature_optimization: "Premature optimization is the root of all evil. - Donald Knuth" +# tip_brute_force: "When in doubt, use brute force. - Ken Thompson" # time_current: "Now:" # time_total: "Max:" # time_goto: "Go to:" diff --git a/app/locale/nb.coffee b/app/locale/nb.coffee index 577f22458..42da4cdb8 100644 --- a/app/locale/nb.coffee +++ b/app/locale/nb.coffee @@ -452,6 +452,9 @@ module.exports = nativeDescription: "Norsk Bokmål", englishDescription: "Norweg # tip_talk_is_cheap: "Talk is cheap. Show me the code. - Linus Torvalds" # tip_first_language: "The most disastrous thing that you can ever learn is your first programming language. - Alan Kay" # tip_hardware_problem: "Q: How many programmers does it take to change a light bulb? A: None, it's a hardware problem." +# tip_hofstadters_law: "Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law." +# tip_premature_optimization: "Premature optimization is the root of all evil. - Donald Knuth" +# tip_brute_force: "When in doubt, use brute force. - Ken Thompson" # time_current: "Now:" # time_total: "Max:" # time_goto: "Go to:" diff --git a/app/locale/nl-BE.coffee b/app/locale/nl-BE.coffee index c4d39e55d..d56d294d7 100644 --- a/app/locale/nl-BE.coffee +++ b/app/locale/nl-BE.coffee @@ -452,6 +452,9 @@ module.exports = nativeDescription: "Nederlands (België)", englishDescription: tip_talk_is_cheap: "Je kunt het goed uitleggen, maar toon me de code. - Linus Torvalds" tip_first_language: "Het ergste dat je kan leren is je eerste programmeertaal. - Alan Kay" # tip_hardware_problem: "Q: How many programmers does it take to change a light bulb? A: None, it's a hardware problem." +# tip_hofstadters_law: "Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law." +# tip_premature_optimization: "Premature optimization is the root of all evil. - Donald Knuth" +# tip_brute_force: "When in doubt, use brute force. - Ken Thompson" time_current: "Nu:" time_total: "Maximum:" time_goto: "Ga naar:" diff --git a/app/locale/nl-NL.coffee b/app/locale/nl-NL.coffee index de028fea1..cbdde2a0a 100644 --- a/app/locale/nl-NL.coffee +++ b/app/locale/nl-NL.coffee @@ -452,6 +452,9 @@ module.exports = nativeDescription: "Nederlands (Nederland)", englishDescription tip_talk_is_cheap: "Je kunt het goed uitleggen, maar toon me de code. - Linus Torvalds" tip_first_language: "Het ergste dat je kan leren is je eerste programmeertaal. - Alan Kay" # tip_hardware_problem: "Q: How many programmers does it take to change a light bulb? A: None, it's a hardware problem." +# tip_hofstadters_law: "Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law." +# tip_premature_optimization: "Premature optimization is the root of all evil. - Donald Knuth" +# tip_brute_force: "When in doubt, use brute force. - Ken Thompson" time_current: "Nu:" time_total: "Maximum:" time_goto: "Ga naar:" diff --git a/app/locale/nn.coffee b/app/locale/nn.coffee index 30422361e..80532d6d2 100644 --- a/app/locale/nn.coffee +++ b/app/locale/nn.coffee @@ -452,6 +452,9 @@ module.exports = nativeDescription: "Norwegian Nynorsk", englishDescription: "No # tip_talk_is_cheap: "Talk is cheap. Show me the code. - Linus Torvalds" # tip_first_language: "The most disastrous thing that you can ever learn is your first programming language. - Alan Kay" # tip_hardware_problem: "Q: How many programmers does it take to change a light bulb? A: None, it's a hardware problem." +# tip_hofstadters_law: "Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law." +# tip_premature_optimization: "Premature optimization is the root of all evil. - Donald Knuth" +# tip_brute_force: "When in doubt, use brute force. - Ken Thompson" # time_current: "Now:" # time_total: "Max:" # time_goto: "Go to:" diff --git a/app/locale/no.coffee b/app/locale/no.coffee index 6e40ea449..c13faf1ff 100644 --- a/app/locale/no.coffee +++ b/app/locale/no.coffee @@ -452,6 +452,9 @@ module.exports = nativeDescription: "Norsk", englishDescription: "Norwegian", tr # tip_talk_is_cheap: "Talk is cheap. Show me the code. - Linus Torvalds" # tip_first_language: "The most disastrous thing that you can ever learn is your first programming language. - Alan Kay" # tip_hardware_problem: "Q: How many programmers does it take to change a light bulb? A: None, it's a hardware problem." +# tip_hofstadters_law: "Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law." +# tip_premature_optimization: "Premature optimization is the root of all evil. - Donald Knuth" +# tip_brute_force: "When in doubt, use brute force. - Ken Thompson" # time_current: "Now:" # time_total: "Max:" # time_goto: "Go to:" diff --git a/app/locale/pl.coffee b/app/locale/pl.coffee index 7ed03b41e..349cf3fb2 100644 --- a/app/locale/pl.coffee +++ b/app/locale/pl.coffee @@ -452,6 +452,9 @@ module.exports = nativeDescription: "język polski", englishDescription: "Polish tip_talk_is_cheap: "Gadać jest łatwo. Pokażcie mi kod. - Linus Torvalds" tip_first_language: "Najbardziej zgubną rzeczą jakiej możesz się nauczyć jest twój pierwszy język programowania. - Alan Kay" tip_hardware_problem: "P: Ilu programistów potrzeba by wymienić żarówkę? O: Żadnego,to problem sprzętowy." +# tip_hofstadters_law: "Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law." +# tip_premature_optimization: "Premature optimization is the root of all evil. - Donald Knuth" +# tip_brute_force: "When in doubt, use brute force. - Ken Thompson" time_current: "Teraz:" # time_total: "Max:" time_goto: "Idź do:" diff --git a/app/locale/pt-BR.coffee b/app/locale/pt-BR.coffee index 0b857a5c0..666b902ab 100644 --- a/app/locale/pt-BR.coffee +++ b/app/locale/pt-BR.coffee @@ -452,6 +452,9 @@ module.exports = nativeDescription: "português do Brasil", englishDescription: # tip_talk_is_cheap: "Talk is cheap. Show me the code. - Linus Torvalds" # tip_first_language: "The most disastrous thing that you can ever learn is your first programming language. - Alan Kay" # tip_hardware_problem: "Q: How many programmers does it take to change a light bulb? A: None, it's a hardware problem." +# tip_hofstadters_law: "Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law." +# tip_premature_optimization: "Premature optimization is the root of all evil. - Donald Knuth" +# tip_brute_force: "When in doubt, use brute force. - Ken Thompson" # time_current: "Now:" # time_total: "Max:" # time_goto: "Go to:" diff --git a/app/locale/pt-PT.coffee b/app/locale/pt-PT.coffee index a6841b74c..f89c20a6d 100644 --- a/app/locale/pt-PT.coffee +++ b/app/locale/pt-PT.coffee @@ -452,6 +452,9 @@ module.exports = nativeDescription: "Português (Portugal)", englishDescription: tip_talk_is_cheap: "Falar é fácil. Mostre-me o código. - Linus Torvalds" tip_first_language: "A coisa mais desastrosa que pode aprender é a sua primeira linguagem de programação. - Alan Kay" tip_hardware_problem: "P: Quantos programadores são necessários para mudar uma lâmpada? R: Nenhum, é um problema de hardware." +# tip_hofstadters_law: "Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law." +# tip_premature_optimization: "Premature optimization is the root of all evil. - Donald Knuth" +# tip_brute_force: "When in doubt, use brute force. - Ken Thompson" time_current: "Agora:" time_total: "Máximo:" time_goto: "Ir para:" diff --git a/app/locale/ro.coffee b/app/locale/ro.coffee index 1e9d38390..12f8cde5e 100644 --- a/app/locale/ro.coffee +++ b/app/locale/ro.coffee @@ -452,6 +452,9 @@ module.exports = nativeDescription: "limba română", englishDescription: "Roman # tip_talk_is_cheap: "Talk is cheap. Show me the code. - Linus Torvalds" # tip_first_language: "The most disastrous thing that you can ever learn is your first programming language. - Alan Kay" # tip_hardware_problem: "Q: How many programmers does it take to change a light bulb? A: None, it's a hardware problem." +# tip_hofstadters_law: "Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law." +# tip_premature_optimization: "Premature optimization is the root of all evil. - Donald Knuth" +# tip_brute_force: "When in doubt, use brute force. - Ken Thompson" # time_current: "Now:" # time_total: "Max:" # time_goto: "Go to:" diff --git a/app/locale/ru.coffee b/app/locale/ru.coffee index d170fad91..a61cc1b09 100644 --- a/app/locale/ru.coffee +++ b/app/locale/ru.coffee @@ -452,6 +452,9 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi tip_talk_is_cheap: "Слова ничего не стоят. Покажи мне код. - Linus Torvalds" tip_first_language: "Наиболее катастрофическая вещь, которую вы можете выучить - ваш первый язык программирования. - Alan Kay" tip_hardware_problem: "В: Сколько программистов нужно, чтобы вкрутить лампочку? О: Нисколько, это проблемы с железом." +# tip_hofstadters_law: "Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law." +# tip_premature_optimization: "Premature optimization is the root of all evil. - Donald Knuth" +# tip_brute_force: "When in doubt, use brute force. - Ken Thompson" time_current: "Текущее:" time_total: "Максимальное:" time_goto: "Перейти на:" diff --git a/app/locale/sk.coffee b/app/locale/sk.coffee index 1417734b6..6e863cf00 100644 --- a/app/locale/sk.coffee +++ b/app/locale/sk.coffee @@ -452,6 +452,9 @@ module.exports = nativeDescription: "slovenčina", englishDescription: "Slovak", # tip_talk_is_cheap: "Talk is cheap. Show me the code. - Linus Torvalds" # tip_first_language: "The most disastrous thing that you can ever learn is your first programming language. - Alan Kay" # tip_hardware_problem: "Q: How many programmers does it take to change a light bulb? A: None, it's a hardware problem." +# tip_hofstadters_law: "Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law." +# tip_premature_optimization: "Premature optimization is the root of all evil. - Donald Knuth" +# tip_brute_force: "When in doubt, use brute force. - Ken Thompson" # time_current: "Now:" # time_total: "Max:" # time_goto: "Go to:" diff --git a/app/locale/sl.coffee b/app/locale/sl.coffee index 73284bb57..0fd9153ec 100644 --- a/app/locale/sl.coffee +++ b/app/locale/sl.coffee @@ -452,6 +452,9 @@ module.exports = nativeDescription: "slovenščina", englishDescription: "Sloven # tip_talk_is_cheap: "Talk is cheap. Show me the code. - Linus Torvalds" # tip_first_language: "The most disastrous thing that you can ever learn is your first programming language. - Alan Kay" # tip_hardware_problem: "Q: How many programmers does it take to change a light bulb? A: None, it's a hardware problem." +# tip_hofstadters_law: "Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law." +# tip_premature_optimization: "Premature optimization is the root of all evil. - Donald Knuth" +# tip_brute_force: "When in doubt, use brute force. - Ken Thompson" # time_current: "Now:" # time_total: "Max:" # time_goto: "Go to:" diff --git a/app/locale/sr.coffee b/app/locale/sr.coffee index 0013f5467..60e1e6fae 100644 --- a/app/locale/sr.coffee +++ b/app/locale/sr.coffee @@ -452,6 +452,9 @@ module.exports = nativeDescription: "српски", englishDescription: "Serbian # tip_talk_is_cheap: "Talk is cheap. Show me the code. - Linus Torvalds" # tip_first_language: "The most disastrous thing that you can ever learn is your first programming language. - Alan Kay" # tip_hardware_problem: "Q: How many programmers does it take to change a light bulb? A: None, it's a hardware problem." +# tip_hofstadters_law: "Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law." +# tip_premature_optimization: "Premature optimization is the root of all evil. - Donald Knuth" +# tip_brute_force: "When in doubt, use brute force. - Ken Thompson" # time_current: "Now:" # time_total: "Max:" # time_goto: "Go to:" diff --git a/app/locale/sv.coffee b/app/locale/sv.coffee index 814e5b7d8..9934f48a6 100644 --- a/app/locale/sv.coffee +++ b/app/locale/sv.coffee @@ -452,6 +452,9 @@ module.exports = nativeDescription: "Svenska", englishDescription: "Swedish", tr # tip_talk_is_cheap: "Talk is cheap. Show me the code. - Linus Torvalds" # tip_first_language: "The most disastrous thing that you can ever learn is your first programming language. - Alan Kay" # tip_hardware_problem: "Q: How many programmers does it take to change a light bulb? A: None, it's a hardware problem." +# tip_hofstadters_law: "Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law." +# tip_premature_optimization: "Premature optimization is the root of all evil. - Donald Knuth" +# tip_brute_force: "When in doubt, use brute force. - Ken Thompson" # time_current: "Now:" # time_total: "Max:" # time_goto: "Go to:" diff --git a/app/locale/th.coffee b/app/locale/th.coffee index baf2375bc..19db1394f 100644 --- a/app/locale/th.coffee +++ b/app/locale/th.coffee @@ -452,6 +452,9 @@ module.exports = nativeDescription: "ไทย", englishDescription: "Thai", tra # tip_talk_is_cheap: "Talk is cheap. Show me the code. - Linus Torvalds" # tip_first_language: "The most disastrous thing that you can ever learn is your first programming language. - Alan Kay" # tip_hardware_problem: "Q: How many programmers does it take to change a light bulb? A: None, it's a hardware problem." +# tip_hofstadters_law: "Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law." +# tip_premature_optimization: "Premature optimization is the root of all evil. - Donald Knuth" +# tip_brute_force: "When in doubt, use brute force. - Ken Thompson" # time_current: "Now:" # time_total: "Max:" # time_goto: "Go to:" diff --git a/app/locale/tr.coffee b/app/locale/tr.coffee index 8779891b1..7ec31ecb5 100644 --- a/app/locale/tr.coffee +++ b/app/locale/tr.coffee @@ -452,6 +452,9 @@ module.exports = nativeDescription: "Türkçe", englishDescription: "Turkish", t # tip_talk_is_cheap: "Talk is cheap. Show me the code. - Linus Torvalds" # tip_first_language: "The most disastrous thing that you can ever learn is your first programming language. - Alan Kay" # tip_hardware_problem: "Q: How many programmers does it take to change a light bulb? A: None, it's a hardware problem." +# tip_hofstadters_law: "Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law." +# tip_premature_optimization: "Premature optimization is the root of all evil. - Donald Knuth" +# tip_brute_force: "When in doubt, use brute force. - Ken Thompson" time_current: "Şimdi:" time_total: "Max:" time_goto: "Git:" diff --git a/app/locale/uk.coffee b/app/locale/uk.coffee index 81aef0316..97e9d51ff 100644 --- a/app/locale/uk.coffee +++ b/app/locale/uk.coffee @@ -452,6 +452,9 @@ module.exports = nativeDescription: "українська мова", englishDesc tip_talk_is_cheap: "Розмови нічого не варті. Покажи мені код. - Лінус Торвальдс" tip_first_language: "Найбільш катастрофічною річчю яку ви коли-небудь вчили є Ваша перша мова програмування. - Алан Кей" # tip_hardware_problem: "Q: How many programmers does it take to change a light bulb? A: None, it's a hardware problem." +# tip_hofstadters_law: "Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law." +# tip_premature_optimization: "Premature optimization is the root of all evil. - Donald Knuth" +# tip_brute_force: "When in doubt, use brute force. - Ken Thompson" time_current: "Зараз:" time_total: "Найбільше:" time_goto: "Перейти до:" diff --git a/app/locale/ur.coffee b/app/locale/ur.coffee index 241ea1f6d..f79793680 100644 --- a/app/locale/ur.coffee +++ b/app/locale/ur.coffee @@ -452,6 +452,9 @@ module.exports = nativeDescription: "اُردُو", englishDescription: "Urdu", # tip_talk_is_cheap: "Talk is cheap. Show me the code. - Linus Torvalds" # tip_first_language: "The most disastrous thing that you can ever learn is your first programming language. - Alan Kay" # tip_hardware_problem: "Q: How many programmers does it take to change a light bulb? A: None, it's a hardware problem." +# tip_hofstadters_law: "Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law." +# tip_premature_optimization: "Premature optimization is the root of all evil. - Donald Knuth" +# tip_brute_force: "When in doubt, use brute force. - Ken Thompson" # time_current: "Now:" # time_total: "Max:" # time_goto: "Go to:" diff --git a/app/locale/vi.coffee b/app/locale/vi.coffee index 61f5c3b24..6b54766dd 100644 --- a/app/locale/vi.coffee +++ b/app/locale/vi.coffee @@ -452,6 +452,9 @@ module.exports = nativeDescription: "Tiếng Việt", englishDescription: "Vietn # tip_talk_is_cheap: "Talk is cheap. Show me the code. - Linus Torvalds" # tip_first_language: "The most disastrous thing that you can ever learn is your first programming language. - Alan Kay" # tip_hardware_problem: "Q: How many programmers does it take to change a light bulb? A: None, it's a hardware problem." +# tip_hofstadters_law: "Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law." +# tip_premature_optimization: "Premature optimization is the root of all evil. - Donald Knuth" +# tip_brute_force: "When in doubt, use brute force. - Ken Thompson" # time_current: "Now:" # time_total: "Max:" # time_goto: "Go to:" diff --git a/app/locale/zh-HANS.coffee b/app/locale/zh-HANS.coffee index 1c691e261..d53514108 100644 --- a/app/locale/zh-HANS.coffee +++ b/app/locale/zh-HANS.coffee @@ -452,6 +452,9 @@ module.exports = nativeDescription: "简体中文", englishDescription: "Chinese tip_talk_is_cheap: "多说无用, 亮出你的代码. - Linus Torvalds" tip_first_language: "你所经历过最可怕的事情是你的第一门编程语言。 - Alan Kay" # tip_hardware_problem: "Q: How many programmers does it take to change a light bulb? A: None, it's a hardware problem." +# tip_hofstadters_law: "Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law." +# tip_premature_optimization: "Premature optimization is the root of all evil. - Donald Knuth" +# tip_brute_force: "When in doubt, use brute force. - Ken Thompson" time_current: "现在:" time_total: "最大:" time_goto: "跳到:" diff --git a/app/locale/zh-HANT.coffee b/app/locale/zh-HANT.coffee index f8921d45e..131d1647b 100644 --- a/app/locale/zh-HANT.coffee +++ b/app/locale/zh-HANT.coffee @@ -452,6 +452,9 @@ module.exports = nativeDescription: "繁体中文", englishDescription: "Chinese # tip_talk_is_cheap: "Talk is cheap. Show me the code. - Linus Torvalds" # tip_first_language: "The most disastrous thing that you can ever learn is your first programming language. - Alan Kay" # tip_hardware_problem: "Q: How many programmers does it take to change a light bulb? A: None, it's a hardware problem." +# tip_hofstadters_law: "Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law." +# tip_premature_optimization: "Premature optimization is the root of all evil. - Donald Knuth" +# tip_brute_force: "When in doubt, use brute force. - Ken Thompson" # time_current: "Now:" # time_total: "Max:" # time_goto: "Go to:" diff --git a/app/locale/zh-WUU-HANS.coffee b/app/locale/zh-WUU-HANS.coffee index 2fb7812b1..7db11e140 100644 --- a/app/locale/zh-WUU-HANS.coffee +++ b/app/locale/zh-WUU-HANS.coffee @@ -452,6 +452,9 @@ module.exports = nativeDescription: "吴语", englishDescription: "Wuu (Simplifi # tip_talk_is_cheap: "Talk is cheap. Show me the code. - Linus Torvalds" # tip_first_language: "The most disastrous thing that you can ever learn is your first programming language. - Alan Kay" # tip_hardware_problem: "Q: How many programmers does it take to change a light bulb? A: None, it's a hardware problem." +# tip_hofstadters_law: "Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law." +# tip_premature_optimization: "Premature optimization is the root of all evil. - Donald Knuth" +# tip_brute_force: "When in doubt, use brute force. - Ken Thompson" # time_current: "Now:" # time_total: "Max:" # time_goto: "Go to:" diff --git a/app/locale/zh-WUU-HANT.coffee b/app/locale/zh-WUU-HANT.coffee index d206c36bb..5db14e436 100644 --- a/app/locale/zh-WUU-HANT.coffee +++ b/app/locale/zh-WUU-HANT.coffee @@ -452,6 +452,9 @@ module.exports = nativeDescription: "吳語", englishDescription: "Wuu (Traditio tip_talk_is_cheap: "甮七講八講,代碼摜出望爻。- 林納斯·托華兹" tip_first_language: "爾經歷着最䁨嗰事幹是爾個頭一門編程語言。 - Alan Kay" # tip_hardware_problem: "Q: How many programmers does it take to change a light bulb? A: None, it's a hardware problem." +# tip_hofstadters_law: "Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law." +# tip_premature_optimization: "Premature optimization is the root of all evil. - Donald Knuth" +# tip_brute_force: "When in doubt, use brute force. - Ken Thompson" time_current: "瑲朞:" time_total: "頂大:" time_goto: "轉到:" From c1023b137f5e7678a035c65fcc1c20f9cbeae70a Mon Sep 17 00:00:00 2001 From: Nick Winter Date: Tue, 23 Sep 2014 18:21:27 -0700 Subject: [PATCH 09/16] Better pointing out of submit button when victory is ready. --- .../javascripts/workers/worker_world.js | 12 +++++-- app/lib/Angel.coffee | 10 ++++-- app/lib/world/world.coffee | 12 ++++--- app/schemas/subscriptions/god.coffee | 4 ++- app/styles/play/level/tome/cast_button.sass | 32 +++++++++++++------ .../play/level/tome/CastButtonView.coffee | 5 +++ 6 files changed, 54 insertions(+), 21 deletions(-) diff --git a/app/assets/javascripts/workers/worker_world.js b/app/assets/javascripts/workers/worker_world.js index 2ec1d73f8..7fa0d9794 100644 --- a/app/assets/javascripts/workers/worker_world.js +++ b/app/assets/javascripts/workers/worker_world.js @@ -363,7 +363,7 @@ self.runWorld = function runWorld(args) { for(var key in replacedLoDash) _[key] = replacedLoDash[key]; self.postMessage({type: 'start-load-frames'}); - self.world.loadFrames(self.onWorldLoaded, self.onWorldError, self.onWorldLoadProgress); + self.world.loadFrames(self.onWorldLoaded, self.onWorldError, self.onWorldLoadProgress, self.onWorldPreloaded); }; self.serializeFramesSoFar = function serializeFramesSoFar() { @@ -378,8 +378,9 @@ self.onWorldLoaded = function onWorldLoaded() { if(self.world.ended) self.goalManager.worldGenerationEnded(); var goalStates = self.goalManager.getGoalStates(); + var overallStatus = self.goalManager.checkOverallStatus(); if(self.world.ended) - self.postMessage({type: 'end-load-frames', goalStates: goalStates}); + self.postMessage({type: 'end-load-frames', goalStates: goalStates, overallStatus: overallStatus}); var t1 = new Date(); var diff = t1 - self.t0; if (self.world.headless) @@ -416,6 +417,13 @@ self.onWorldLoaded = function onWorldLoaded() { } }; +self.onWorldPreloaded = function onWorldPreloaded() { + self.goalManager.worldGenerationEnded(); + var goalStates = self.goalManager.getGoalStates(); + var overallStatus = self.goalManager.checkOverallStatus(); + self.postMessage({type: 'end-preload-frames', goalStates: goalStates, overallStatus: overallStatus}); +}; + self.onWorldError = function onWorldError(error) { if(error.isUserCodeProblem) { var errorKey = error.userInfo.key; diff --git a/app/lib/Angel.coffee b/app/lib/Angel.coffee index efa47c03b..94edc3088 100644 --- a/app/lib/Angel.coffee +++ b/app/lib/Angel.coffee @@ -66,7 +66,11 @@ module.exports = class Angel extends CocoClass clearTimeout @condemnTimeout when 'end-load-frames' clearTimeout @condemnTimeout - @beholdGoalStates event.data.goalStates # Work ends here if we're headless. + @beholdGoalStates event.data.goalStates, event.data.overallStatus # Work ends here if we're headless. + when 'end-preload-frames' + clearTimeout @condemnTimeout + @beholdGoalStates event.data.goalStates, event.data.overallStatus, true + # We have to abort like an infinite loop if we see one of these; they're not really recoverable when 'non-user-code-problem' @@ -105,9 +109,9 @@ module.exports = class Angel extends CocoClass else @log 'Received unsupported message:', event.data - beholdGoalStates: (goalStates) -> + beholdGoalStates: (goalStates, overallStatus, preload=false) -> return if @aborting - Backbone.Mediator.publish 'god:goals-calculated', goalStates: goalStates + Backbone.Mediator.publish 'god:goals-calculated', goalStates: goalStates, preload: preload, overallStatus: overallStatus @finishWork() if @shared.headless beholdWorld: (serialized, goalStates, startFrame, endFrame, streamingWorld) -> diff --git a/app/lib/world/world.coffee b/app/lib/world/world.coffee index 0cc3469de..43db43ca6 100644 --- a/app/lib/world/world.coffee +++ b/app/lib/world/world.coffee @@ -92,11 +92,11 @@ module.exports = class World (@runtimeErrors ?= []).push error (@unhandledRuntimeErrors ?= []).push error - loadFrames: (loadedCallback, errorCallback, loadProgressCallback, skipDeferredLoading, loadUntilFrame) -> + loadFrames: (loadedCallback, errorCallback, loadProgressCallback, preloadedCallback, skipDeferredLoading, loadUntilFrame) -> return if @aborted console.log 'Warning: loadFrames called on empty World (no thangs).' unless @thangs.length continueLaterFn = => - @loadFrames(loadedCallback, errorCallback, loadProgressCallback, skipDeferredLoading, loadUntilFrame) unless @destroyed + @loadFrames(loadedCallback, errorCallback, loadProgressCallback, preloadedCallback, skipDeferredLoading, loadUntilFrame) unless @destroyed if @realTime and not @countdownFinished return setTimeout @finishCountdown(continueLaterFn), REAL_TIME_COUNTDOWN_DELAY t1 = now() @@ -117,13 +117,15 @@ module.exports = class World for error in (@unhandledRuntimeErrors ? []) return unless errorCallback error # errorCallback tells us whether the error is recoverable @unhandledRuntimeErrors = [] - @finishLoadingFrames loadProgressCallback, loadedCallback + @finishLoadingFrames loadProgressCallback, loadedCallback, preloadedCallback - finishLoadingFrames: (loadProgressCallback, loadedCallback) -> + finishLoadingFrames: (loadProgressCallback, loadedCallback, preloadedCallback) -> unless @debugging @ended = true system.finish @thangs for system in @systems - unless @preloading + if @preloading + preloadedCallback() + else loadProgressCallback? 1 loadedCallback() diff --git a/app/schemas/subscriptions/god.coffee b/app/schemas/subscriptions/god.coffee index 6121b838d..014594893 100644 --- a/app/schemas/subscriptions/god.coffee +++ b/app/schemas/subscriptions/god.coffee @@ -1,6 +1,6 @@ c = require 'schemas/schemas' -goalStatesSchema = +goalStatesSchema = type: 'object' additionalProperties: type: 'object' @@ -41,6 +41,8 @@ module.exports = 'god:goals-calculated': c.object {required: ['goalStates']}, goalStates: goalStatesSchema + preload: {type: 'boolean'} + overallStatus: {type: ['string', 'null'], enum: ['success', 'failure', 'incomplete', null]} 'god:world-load-progress-changed': c.object {required: ['progress']}, progress: {type: 'number', minimum: 0, maximum: 1} diff --git a/app/styles/play/level/tome/cast_button.sass b/app/styles/play/level/tome/cast_button.sass index 1b1e2114f..5b50e7182 100644 --- a/app/styles/play/level/tome/cast_button.sass +++ b/app/styles/play/level/tome/cast_button.sass @@ -34,25 +34,37 @@ .btn padding: 3px 10px height: 40px + font-size: 22px .submit-button margin-left: 20px + min-width: 150px .cast-button margin-left: 10px + min-width: 150px @include opacity(0.77) &:hover, &.castable @include opacity(1) - &:not(.winnable) .cast-button.castable - font-weight: bold - -webkit-animation-name: castablePulse - -webkit-animation-duration: 3s - -webkit-animation-iteration-count: infinite + &:not(.winnable) - &.winnable .submit-button - font-weight: bold - -webkit-animation-name: winnablePulse - -webkit-animation-duration: 3s - -webkit-animation-iteration-count: infinite + .cast-button.castable + font-weight: bold + -webkit-animation-name: castablePulse + -webkit-animation-duration: 3s + -webkit-animation-iteration-count: infinite + + .submit-button + font-size: 16px + + &.winnable + .submit-button + font-weight: bold + -webkit-animation-name: winnablePulse + -webkit-animation-duration: 3s + -webkit-animation-iteration-count: infinite + + .cast-button + font-size: 16px diff --git a/app/views/play/level/tome/CastButtonView.coffee b/app/views/play/level/tome/CastButtonView.coffee index dafde5b0f..e30bac173 100644 --- a/app/views/play/level/tome/CastButtonView.coffee +++ b/app/views/play/level/tome/CastButtonView.coffee @@ -17,6 +17,7 @@ module.exports = class CastButtonView extends CocoView 'real-time-multiplayer:joined-game': 'onJoinedRealTimeMultiplayerGame' 'real-time-multiplayer:left-game': 'onLeftRealTimeMultiplayerGame' 'goal-manager:new-goal-states': 'onNewGoalStates' + 'god:goals-calculated': 'onGoalsCalculated' constructor: (options) -> super options @@ -85,6 +86,10 @@ module.exports = class CastButtonView extends CocoView if @winnable @$el.find('.submit-button').show() # In case we hid it, like on the first level. + onGoalsCalculated: (e) -> + return unless e.preload + @onNewGoalStates e + updateCastButton: -> return if _.some @spells, (spell) => not spell.loaded From af6e770c308839813d24499a65dfa00f8d05348c Mon Sep 17 00:00:00 2001 From: Nick Winter Date: Tue, 23 Sep 2014 18:23:28 -0700 Subject: [PATCH 10/16] Changed name of Stop button to Skip in real-time playback. --- app/locale/en.coffee | 1 + app/templates/play/level.jade | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/locale/en.coffee b/app/locale/en.coffee index d23569aa1..8a3bb5ec0 100644 --- a/app/locale/en.coffee +++ b/app/locale/en.coffee @@ -379,6 +379,7 @@ customize_wizard: "Customize Wizard" home: "Home" stop: "Stop" + skip: "Skip" game_menu: "Game Menu" guide: "Guide" restart: "Restart" diff --git a/app/templates/play/level.jade b/app/templates/play/level.jade index 2aa4664fe..68577ac71 100644 --- a/app/templates/play/level.jade +++ b/app/templates/play/level.jade @@ -25,7 +25,7 @@ #thang-hud - button.btn.btn-lg.btn-warning.banner.header-font#stop-real-time-playback-button(title="Stop real-time playback", data-i18n="play_level.stop") Stop + button.btn.btn-lg.btn-warning.banner.header-font#stop-real-time-playback-button(title="Stop real-time playback", data-i18n="play_level.skip") Skip .footer .content From 7b15ecfab2f018ff7e2d35a8cdc7f72d410dfffb Mon Sep 17 00:00:00 2001 From: Nick Winter Date: Tue, 23 Sep 2014 18:29:04 -0700 Subject: [PATCH 11/16] Improved comment visibility. --- app/styles/play/level/tome/spell.sass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/styles/play/level/tome/spell.sass b/app/styles/play/level/tome/spell.sass index 653e30709..dc19c89e1 100644 --- a/app/styles/play/level/tome/spell.sass +++ b/app/styles/play/level/tome/spell.sass @@ -124,7 +124,7 @@ // border-bottom: 1px dotted rgba(0, 51, 255, 0.25) .ace_text-layer .ace_comment - color: darken(rgb(103, 164, 200), 5%) + color: rgb(78, 38, 226) .ace_text-layer .ace_variable // https://github.com/codecombat/codecombat/issues/6 From e49385557885ac9f887667a6e3562b680dc31510 Mon Sep 17 00:00:00 2001 From: Nick Winter Date: Tue, 23 Sep 2014 18:32:07 -0700 Subject: [PATCH 12/16] Hiding spell tab hover docs for plan(). --- app/views/play/level/tome/SpellListTabEntryView.coffee | 1 + 1 file changed, 1 insertion(+) diff --git a/app/views/play/level/tome/SpellListTabEntryView.coffee b/app/views/play/level/tome/SpellListTabEntryView.coffee index 5d30e395c..86a6cec27 100644 --- a/app/views/play/level/tome/SpellListTabEntryView.coffee +++ b/app/views/play/level/tome/SpellListTabEntryView.coffee @@ -61,6 +61,7 @@ module.exports = class SpellListTabEntryView extends SpellListEntryView @avatar.render() buildDocs: -> + return if @spell.name is 'plan' # Too confusing for beginners @docsBuilt = true lcs = @supermodel.getModels LevelComponent found = false From 019f634d9f0d0f61bbbde9ca1d501bf5943a36b1 Mon Sep 17 00:00:00 2001 From: Nick Winter Date: Tue, 23 Sep 2014 18:39:52 -0700 Subject: [PATCH 13/16] Respecting coordinates setting. --- app/lib/surface/Surface.coffee | 5 +++-- app/views/editor/level/modals/WorldSelectModal.coffee | 2 +- app/views/editor/level/thangs/ThangsTabView.coffee | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/lib/surface/Surface.coffee b/app/lib/surface/Surface.coffee index 1a4f254d5..10e3c1f8f 100644 --- a/app/lib/surface/Surface.coffee +++ b/app/lib/surface/Surface.coffee @@ -47,7 +47,7 @@ module.exports = Surface = class Surface extends CocoClass grid: false navigateToSelection: true choosing: false # 'point', 'region', 'ratio-region' - coords: true + coords: null # use world defaults, or set to false/true to overrid playJingle: false showInvisible: false frameRate: 30 # Best as a divisor of 60, like 15, 30, 60, with RAF_SYNCHED timing. @@ -123,7 +123,8 @@ module.exports = Surface = class Surface extends CocoClass initCoordinates: -> @coordinateGrid ?= new CoordinateGrid {camera: @camera, layer: @gridLayer, textLayer: @surfaceTextLayer}, @world.size() @coordinateGrid.showGrid() if @world.showGrid or @options.grid - @coordinateDisplay ?= new CoordinateDisplay camera: @camera, layer: @surfaceTextLayer if @world.showCoordinates or @options.coords + showCoordinates = if @options.coords? then @options.coords else @world.showCoordinates + @coordinateDisplay ?= new CoordinateDisplay camera: @camera, layer: @surfaceTextLayer if showCoordinates hookUpChooseControls: -> chooserOptions = stage: @stage, surfaceLayer: @surfaceLayer, camera: @camera, restrictRatio: @options.choosing is 'ratio-region' diff --git a/app/views/editor/level/modals/WorldSelectModal.coffee b/app/views/editor/level/modals/WorldSelectModal.coffee index 95c949f7a..3424ec576 100644 --- a/app/views/editor/level/modals/WorldSelectModal.coffee +++ b/app/views/editor/level/modals/WorldSelectModal.coffee @@ -50,7 +50,7 @@ module.exports = class WorldSelectModal extends ModalView grid: true navigateToSelection: false choosing: @dataType - coords: false + coords: true thangTypes: @supermodel.getModels(ThangType) showInvisible: true } diff --git a/app/views/editor/level/thangs/ThangsTabView.coffee b/app/views/editor/level/thangs/ThangsTabView.coffee index 6a9b3376d..1808254cd 100644 --- a/app/views/editor/level/thangs/ThangsTabView.coffee +++ b/app/views/editor/level/thangs/ThangsTabView.coffee @@ -188,6 +188,7 @@ module.exports = class ThangsTabView extends CocoView @surface = new Surface @world, surfaceCanvas, { wizards: false paths: false + coords: true grid: true navigateToSelection: false thangTypes: @supermodel.getModels(ThangType) From 5397c518191aef47ea3c71a3e922d671b10ffb92 Mon Sep 17 00:00:00 2001 From: Nick Winter Date: Tue, 23 Sep 2014 18:59:08 -0700 Subject: [PATCH 14/16] Fixed world-threatening typo. --- app/lib/surface/Surface.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/lib/surface/Surface.coffee b/app/lib/surface/Surface.coffee index 10e3c1f8f..865d512e0 100644 --- a/app/lib/surface/Surface.coffee +++ b/app/lib/surface/Surface.coffee @@ -47,7 +47,7 @@ module.exports = Surface = class Surface extends CocoClass grid: false navigateToSelection: true choosing: false # 'point', 'region', 'ratio-region' - coords: null # use world defaults, or set to false/true to overrid + coords: null # use world defaults, or set to false/true to override playJingle: false showInvisible: false frameRate: 30 # Best as a divisor of 60, like 15, 30, 60, with RAF_SYNCHED timing. From 225fd0ca18f4c71ff84acd9b4754a6cfc278f212 Mon Sep 17 00:00:00 2001 From: Nick Winter Date: Tue, 23 Sep 2014 19:12:05 -0700 Subject: [PATCH 15/16] Moved world map level info to click from hover. --- app/styles/play/world-map-view.sass | 14 +++---- app/templates/play/world-map-view.jade | 7 +--- app/views/play/WorldMapView.coffee | 55 +++++++++++--------------- 3 files changed, 32 insertions(+), 44 deletions(-) diff --git a/app/styles/play/world-map-view.sass b/app/styles/play/world-map-view.sass index 3ed6a2e36..cf25d0606 100644 --- a/app/styles/play/world-map-view.sass +++ b/app/styles/play/world-map-view.sass @@ -116,13 +116,9 @@ $gameControlMargin: 30px display: none position: absolute z-index: 3 - padding: 10px 10px 30px 10px + padding: 10px border-image: url(/images/level/popover_background.png) 18 fill round border-width: 15px - - .level-image - float: left - margin-right: 20px .level-info.complete h3:after content: " - Complete!" @@ -133,9 +129,6 @@ $gameControlMargin: 30px color: desaturate(green, 50%) .level-info - width: 330px - float: left - h3 margin-top: 0 margin-bottom: 0px @@ -146,6 +139,11 @@ $gameControlMargin: 30px .campaign-label text-shadow: 0 1px 0 white + + .start-level + display: block + margin: 10px auto 0 auto + width: 200px .game-controls position: absolute diff --git a/app/templates/play/world-map-view.jade b/app/templates/play/world-map-view.jade index 81ada39d8..1d510edc6 100644 --- a/app/templates/play/world-map-view.jade +++ b/app/templates/play/world-map-view.jade @@ -9,11 +9,7 @@ div(style="left: #{level.x}%; bottom: #{level.y}%; background-color: #{campaign.color}", class="level" + (next ? " next" : "") + (level.disabled ? " disabled" : "") + " " + levelStatusMap[level.id] || "", data-level-id=level.id) a(href=level.type == 'hero' ? '#' : level.disabled ? "/play" : "/play/#{level.levelPath || 'level'}/#{level.id}", disabled=level.disabled, data-level-id=level.id, data-level-path=level.levelPath || 'level', data-level-name=level.name) div(style="left: #{level.x}%; bottom: #{level.y}%", class="level-shadow" + (next ? " next" : "") + " " + levelStatusMap[level.id] || "") - .level-info-container(data-level-id=level.id) - //if level.image - // img.level-image(src="#{level.image}", alt="#{level.name}") - //else - // img.level-image(src="/images/generic-icon.png", alt="#{level.name}") + .level-info-container(data-level-id=level.id, data-level-path=level.levelPath || 'level', data-level-name=level.name) div(class="level-info " + (levelStatusMap[level.id] || "")) h3= level.name + (level.disabled ? " (Coming soon!)" : "") .level-description= level.description @@ -28,6 +24,7 @@ span.spr , #{Math.round(playCount.playtime / 3600)} span(data-i18n="play.hours_played") hours played .campaign-label(style="color: #{campaign.color}")= campaign.name + button.btn.btn-success.btn-lg.start-level(data-i18n="common.play") Play .game-controls.header-font if me.isAdmin() diff --git a/app/views/play/WorldMapView.coffee b/app/views/play/WorldMapView.coffee index 7c7899abe..b0a1b900e 100644 --- a/app/views/play/WorldMapView.coffee +++ b/app/views/play/WorldMapView.coffee @@ -18,11 +18,12 @@ module.exports = class WorldMapView extends RootView template: template events: - 'click .map': 'onClickMap' + 'click .map-background': 'onClickMap' 'click .level a': 'onClickLevel' - 'mouseenter .level a': 'onMouseEnterLevel' - 'mouseleave .level a': 'onMouseLeaveLevel' - 'mousemove .map': 'onMouseMoveMap' + 'click .level-info-container .start-level': 'onClickStartLevel' + #'mouseenter .level a': 'onMouseEnterLevel' + #'mouseleave .level a': 'onMouseLeaveLevel' + #'mousemove .map': 'onMouseMoveMap' constructor: (options) -> super options @@ -78,6 +79,7 @@ module.exports = class WorldMapView extends RootView @render() onClickMap: (e) -> + @$levelInfo?.hide() # Easy-ish way of figuring out coordinates for placing level dots. x = e.offsetX / @$el.find('.map-background').width() y = (1 - e.offsetY / @$el.find('.map-background').height()) @@ -85,21 +87,30 @@ module.exports = class WorldMapView extends RootView onClickLevel: (e) -> e.preventDefault() + e.stopPropagation() + @$levelInfo?.hide() return if $(e.target).attr('disabled') - playLevelModal = new PlayLevelModal supermodel: @supermodel, levelID: $(e.target).data('level-id'), levelPath: $(e.target).data('level-path'), levelName: $(e.target).data('level-name') - @openModalView playLevelModal - - onMouseEnterLevel: (e) -> levelID = $(e.target).parents('.level').data('level-id') @$levelInfo = @$el.find(".level-info-container[data-level-id=#{levelID}]").show() @adjustLevelInfoPosition e - onMouseLeaveLevel: (e) -> - levelID = $(e.target).parents('.level').data('level-id') - @$el.find(".level-info-container[data-level-id='#{levelID}']").hide() + onClickStartLevel: (e) -> + container = $(e.target).parents('.level-info-container') + playLevelModal = new PlayLevelModal supermodel: @supermodel, levelID: container.data('level-id'), levelPath: container.data('level-path'), levelName: container.data('level-name') + @openModalView playLevelModal + @$levelInfo?.hide() - onMouseMoveMap: (e) -> - @adjustLevelInfoPosition e + #onMouseEnterLevel: (e) -> + # levelID = $(e.target).parents('.level').data('level-id') + # @$levelInfo = @$el.find(".level-info-container[data-level-id=#{levelID}]").show() + # @adjustLevelInfoPosition e + # + #onMouseLeaveLevel: (e) -> + # levelID = $(e.target).parents('.level').data('level-id') + # @$el.find(".level-info-container[data-level-id='#{levelID}']").hide() + # + #onMouseMoveMap: (e) -> + # @adjustLevelInfoPosition e adjustLevelInfoPosition: (e) -> return unless @$levelInfo @@ -476,7 +487,6 @@ hero = [ type: 'hero' difficulty: 1 id: 'dungeons-of-kithgard' - image: '/file/db/level/52740644904ac0411700067c/rescue_mission_icon.png' description: 'Grab the gem, but touch nothing else. Start here.' x: 17.23 y: 36.94 @@ -486,7 +496,6 @@ hero = [ type: 'hero' difficulty: 1 id: 'gems-in-the-deep' - image: '/file/db/level/529662dfe0df8f0000000007/grab_the_mushroom_icon.png' description: 'Quickly collect the gems; you will need them.' x: 22.6 y: 35.1 @@ -496,7 +505,6 @@ hero = [ type: 'hero' difficulty: 1 id: 'shadow-guard' - image: '/file/db/level/525dc5589a0765e496000006/drink_me_icon.png' description: 'Evade the Kithgard minion.' x: 27.74 y: 35.17 @@ -506,7 +514,6 @@ hero = [ type: 'hero' difficulty: 1 id: 'true-names' - image: '/file/db/level/5276c9bdcf83207a2801ff8f/taunt_icon.png' description: 'Learn an enemy\'s true name to defeat it.' x: 32.7 y: 36.7 @@ -516,7 +523,6 @@ hero = [ type: 'hero' difficulty: 1 id: 'the-raised-sword' - image: '/file/db/level/528aea2d7f37fc4e0700016b/its_a_trap_icon.png' description: 'Learn to equip yourself for combat.' x: 36.6 y: 39.5 @@ -526,7 +532,6 @@ hero = [ type: 'hero' difficulty: 1 id: 'the-first-kithmaze' - image: '/file/db/level/5275272c69abdcb12401216e/break_the_prison_icon.png' description: 'The builders of Kith constructed many mazes to confuse travelers.' x: 38.4 y: 43.5 @@ -536,7 +541,6 @@ hero = [ type: 'hero' difficulty: 1 id: 'the-second-kithmaze' - image: '/file/db/level/525f150306e1ab0962000018/taunt_icon.png' description: 'Many have tried, few have found their way through this maze.' x: 38.9 y: 48.1 @@ -546,7 +550,6 @@ hero = [ type: 'hero' difficulty: 1 id: 'new-sight' - image: '/file/db/level/525abfd9b12777d78e000009/cowardly_taunt_icon.png' description: 'A true name can only be seen with the correct lenses.' x: 39.3 y: 53.1 @@ -556,7 +559,6 @@ hero = [ type: 'hero' difficulty: 1 id: 'lowly-kithmen' - image: '/file/db/level/525ef8ef06e1ab0962000003/commanding_followers_icon.png' description: 'Use your glasses to seek out and attack the Kithmen.' x: 39.4 y: 57.7 @@ -566,7 +568,6 @@ hero = [ type: 'hero' difficulty: 1 id: 'a-bolt-in-the-dark' - image: '/file/db/level/525085419851b83f4b000001/mobile_artillery_icon.png' description: 'Kithmen are not the only ones to stand in your way.' x: 40.0 y: 63.2 @@ -576,7 +577,6 @@ hero = [ type: 'hero' difficulty: 1 id: 'the-final-kithmaze' - image: '/file/db/level/526bda3fe79aefde2a003e36/mobile_artillery_icon.png' description: 'To escape you must find your way through an Elder Kithman\'s maze.' x: 42.67 y: 67.98 @@ -586,7 +586,6 @@ hero = [ type: 'hero' difficulty: 1 id: 'kithgard-gates' - image: '/file/db/level/526fd3043c637ece50001bb2/the_herd_icon.png' description: 'Escape the Kithgard dungeons and don\'t let the guardians get you.' x: 47.38 y: 70.55 @@ -596,7 +595,6 @@ hero = [ type: 'hero' difficulty: 1 id: 'defence-of-plainswood' - image: '/file/db/level/525dc5589a0765e496000006/drink_me_icon.png' description: 'Protect the peasants from the pursuing ogres.' x: 52.66 y: 69.66 @@ -606,7 +604,6 @@ hero = [ # type: 'hero' # difficulty: 1 # id: '' - # image: '/file/db/level/529662dfe0df8f0000000007/grab_the_mushroom_icon.png' # description: '' # x: 58.46 # y: 66.38 @@ -616,7 +613,6 @@ hero = [ # type: 'hero' # difficulty: 1 # id: '' - # image: '/file/db/level/526ae95c1e5cd30000000008/zone_of_danger_icon.png' # description: '' # x: 63.11 # y: 62.74 @@ -626,7 +622,6 @@ hero = [ # type: 'hero' # difficulty: 1 # id: '' - # image: '/file/db/level/529662dfe0df8f0000000007/grab_the_mushroom_icon.png' # description: '' # x: 69.19 # y: 60.61 @@ -636,7 +631,6 @@ hero = [ # type: 'hero' # difficulty: 1 # id: '' - # image: '/file/db/level/52740644904ac0411700067c/rescue_mission_icon.png' # description: '' # x: 77.54 # y: 65.94 @@ -646,7 +640,6 @@ hero = [ # type: 'hero' # difficulty: 1 # id: '' - # image: '/file/db/level/526711d9add4f8965f000002/hunter_triplets_icon.png' # description: '' # x: 84.29 # y: 61.23 From 8d6b23274b7c6e814ce12f894d4c34739043d902 Mon Sep 17 00:00:00 2001 From: Nick Winter Date: Tue, 23 Sep 2014 22:10:18 -0700 Subject: [PATCH 16/16] Zoom in on hero during real-time playback. --- app/lib/surface/Surface.coffee | 5 +++++ app/templates/play/world-map-view.jade | 2 +- app/views/play/WorldMapView.coffee | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/lib/surface/Surface.coffee b/app/lib/surface/Surface.coffee index 865d512e0..878f92995 100644 --- a/app/lib/surface/Surface.coffee +++ b/app/lib/surface/Surface.coffee @@ -536,6 +536,9 @@ module.exports = Surface = class Surface extends CocoClass @onResize() @spriteBoss.selfWizardSprite?.toggle false @playing = false # Will start when countdown is done. + if @heroSprite + @previousCameraZoom = @camera.zoom + @camera.zoomTo @heroSprite.imageObject, 4, 3000 onRealTimePlaybackEnded: (e) -> return unless @realTime @@ -543,6 +546,8 @@ module.exports = Surface = class Surface extends CocoClass @onResize() @spriteBoss.selfWizardSprite?.toggle true @canvas.removeClass 'flag-color-selected' + if @previousCameraZoom + @camera.zoomTo @camera.newTarget or @camera.target, @previousCameraZoom, 3000 onFlagColorSelected: (e) -> @canvas.toggleClass 'flag-color-selected', Boolean(e.color) diff --git a/app/templates/play/world-map-view.jade b/app/templates/play/world-map-view.jade index 1d510edc6..f40b67fa2 100644 --- a/app/templates/play/world-map-view.jade +++ b/app/templates/play/world-map-view.jade @@ -6,7 +6,7 @@ each level in campaign.levels - var next = !seenNext && levelStatusMap[level.id] != "complete"; - seenNext = seenNext || next; - div(style="left: #{level.x}%; bottom: #{level.y}%; background-color: #{campaign.color}", class="level" + (next ? " next" : "") + (level.disabled ? " disabled" : "") + " " + levelStatusMap[level.id] || "", data-level-id=level.id) + div(style="left: #{level.x}%; bottom: #{level.y}%; background-color: #{campaign.color}", class="level" + (next ? " next" : "") + (level.disabled ? " disabled" : "") + " " + levelStatusMap[level.id] || "", data-level-id=level.id, title=level.name) a(href=level.type == 'hero' ? '#' : level.disabled ? "/play" : "/play/#{level.levelPath || 'level'}/#{level.id}", disabled=level.disabled, data-level-id=level.id, data-level-path=level.levelPath || 'level', data-level-name=level.name) div(style="left: #{level.x}%; bottom: #{level.y}%", class="level-shadow" + (next ? " next" : "") + " " + levelStatusMap[level.id] || "") .level-info-container(data-level-id=level.id, data-level-path=level.levelPath || 'level', data-level-name=level.name) diff --git a/app/views/play/WorldMapView.coffee b/app/views/play/WorldMapView.coffee index b0a1b900e..01d0ae359 100644 --- a/app/views/play/WorldMapView.coffee +++ b/app/views/play/WorldMapView.coffee @@ -72,6 +72,7 @@ module.exports = class WorldMapView extends RootView super() @onWindowResize() _.defer => @$el.find('.game-controls button').tooltip() # Have to defer or i18n doesn't take effect. + @$el.find('.level').tooltip() onSessionsLoaded: (e) -> for session in @sessions.models