Merge branch 'master' into production

This commit is contained in:
Nick Winter 2014-09-23 23:04:43 -07:00
commit 6d0dd6de6c
76 changed files with 292 additions and 97 deletions

View file

@ -363,7 +363,7 @@ self.runWorld = function runWorld(args) {
for(var key in replacedLoDash) for(var key in replacedLoDash)
_[key] = replacedLoDash[key]; _[key] = replacedLoDash[key];
self.postMessage({type: 'start-load-frames'}); 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() { self.serializeFramesSoFar = function serializeFramesSoFar() {
@ -378,8 +378,9 @@ self.onWorldLoaded = function onWorldLoaded() {
if(self.world.ended) if(self.world.ended)
self.goalManager.worldGenerationEnded(); self.goalManager.worldGenerationEnded();
var goalStates = self.goalManager.getGoalStates(); var goalStates = self.goalManager.getGoalStates();
var overallStatus = self.goalManager.checkOverallStatus();
if(self.world.ended) 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 t1 = new Date();
var diff = t1 - self.t0; var diff = t1 - self.t0;
if (self.world.headless) 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) { self.onWorldError = function onWorldError(error) {
if(error.isUserCodeProblem) { if(error.isUserCodeProblem) {
var errorKey = error.userInfo.key; var errorKey = error.userInfo.key;

View file

@ -66,7 +66,11 @@ module.exports = class Angel extends CocoClass
clearTimeout @condemnTimeout clearTimeout @condemnTimeout
when 'end-load-frames' when 'end-load-frames'
clearTimeout @condemnTimeout 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 # We have to abort like an infinite loop if we see one of these; they're not really recoverable
when 'non-user-code-problem' when 'non-user-code-problem'
@ -105,9 +109,9 @@ module.exports = class Angel extends CocoClass
else else
@log 'Received unsupported message:', event.data @log 'Received unsupported message:', event.data
beholdGoalStates: (goalStates) -> beholdGoalStates: (goalStates, overallStatus, preload=false) ->
return if @aborting 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 @finishWork() if @shared.headless
beholdWorld: (serialized, goalStates, startFrame, endFrame, streamingWorld) -> beholdWorld: (serialized, goalStates, startFrame, endFrame, streamingWorld) ->

View file

@ -47,7 +47,7 @@ module.exports = Surface = class Surface extends CocoClass
grid: false grid: false
navigateToSelection: true navigateToSelection: true
choosing: false # 'point', 'region', 'ratio-region' choosing: false # 'point', 'region', 'ratio-region'
coords: true coords: null # use world defaults, or set to false/true to override
playJingle: false playJingle: false
showInvisible: false showInvisible: false
frameRate: 30 # Best as a divisor of 60, like 15, 30, 60, with RAF_SYNCHED timing. 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: -> initCoordinates: ->
@coordinateGrid ?= new CoordinateGrid {camera: @camera, layer: @gridLayer, textLayer: @surfaceTextLayer}, @world.size() @coordinateGrid ?= new CoordinateGrid {camera: @camera, layer: @gridLayer, textLayer: @surfaceTextLayer}, @world.size()
@coordinateGrid.showGrid() if @world.showGrid or @options.grid @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: -> hookUpChooseControls: ->
chooserOptions = stage: @stage, surfaceLayer: @surfaceLayer, camera: @camera, restrictRatio: @options.choosing is 'ratio-region' chooserOptions = stage: @stage, surfaceLayer: @surfaceLayer, camera: @camera, restrictRatio: @options.choosing is 'ratio-region'
@ -535,6 +536,9 @@ module.exports = Surface = class Surface extends CocoClass
@onResize() @onResize()
@spriteBoss.selfWizardSprite?.toggle false @spriteBoss.selfWizardSprite?.toggle false
@playing = false # Will start when countdown is done. @playing = false # Will start when countdown is done.
if @heroSprite
@previousCameraZoom = @camera.zoom
@camera.zoomTo @heroSprite.imageObject, 4, 3000
onRealTimePlaybackEnded: (e) -> onRealTimePlaybackEnded: (e) ->
return unless @realTime return unless @realTime
@ -542,6 +546,8 @@ module.exports = Surface = class Surface extends CocoClass
@onResize() @onResize()
@spriteBoss.selfWizardSprite?.toggle true @spriteBoss.selfWizardSprite?.toggle true
@canvas.removeClass 'flag-color-selected' @canvas.removeClass 'flag-color-selected'
if @previousCameraZoom
@camera.zoomTo @camera.newTarget or @camera.target, @previousCameraZoom, 3000
onFlagColorSelected: (e) -> onFlagColorSelected: (e) ->
@canvas.toggleClass 'flag-color-selected', Boolean(e.color) @canvas.toggleClass 'flag-color-selected', Boolean(e.color)

View file

@ -92,11 +92,11 @@ module.exports = class World
(@runtimeErrors ?= []).push error (@runtimeErrors ?= []).push error
(@unhandledRuntimeErrors ?= []).push error (@unhandledRuntimeErrors ?= []).push error
loadFrames: (loadedCallback, errorCallback, loadProgressCallback, skipDeferredLoading, loadUntilFrame) -> loadFrames: (loadedCallback, errorCallback, loadProgressCallback, preloadedCallback, skipDeferredLoading, loadUntilFrame) ->
return if @aborted return if @aborted
console.log 'Warning: loadFrames called on empty World (no thangs).' unless @thangs.length console.log 'Warning: loadFrames called on empty World (no thangs).' unless @thangs.length
continueLaterFn = => continueLaterFn = =>
@loadFrames(loadedCallback, errorCallback, loadProgressCallback, skipDeferredLoading, loadUntilFrame) unless @destroyed @loadFrames(loadedCallback, errorCallback, loadProgressCallback, preloadedCallback, skipDeferredLoading, loadUntilFrame) unless @destroyed
if @realTime and not @countdownFinished if @realTime and not @countdownFinished
return setTimeout @finishCountdown(continueLaterFn), REAL_TIME_COUNTDOWN_DELAY return setTimeout @finishCountdown(continueLaterFn), REAL_TIME_COUNTDOWN_DELAY
t1 = now() t1 = now()
@ -117,13 +117,15 @@ module.exports = class World
for error in (@unhandledRuntimeErrors ? []) for error in (@unhandledRuntimeErrors ? [])
return unless errorCallback error # errorCallback tells us whether the error is recoverable return unless errorCallback error # errorCallback tells us whether the error is recoverable
@unhandledRuntimeErrors = [] @unhandledRuntimeErrors = []
@finishLoadingFrames loadProgressCallback, loadedCallback @finishLoadingFrames loadProgressCallback, loadedCallback, preloadedCallback
finishLoadingFrames: (loadProgressCallback, loadedCallback) -> finishLoadingFrames: (loadProgressCallback, loadedCallback, preloadedCallback) ->
unless @debugging unless @debugging
@ended = true @ended = true
system.finish @thangs for system in @systems system.finish @thangs for system in @systems
unless @preloading if @preloading
preloadedCallback()
else
loadProgressCallback? 1 loadProgressCallback? 1
loadedCallback() loadedCallback()

View file

@ -452,6 +452,9 @@ module.exports = nativeDescription: "العربية", englishDescription: "Arabi
# tip_talk_is_cheap: "Talk is cheap. Show me the code. - Linus Torvalds" # 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_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_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_current: "Now:"
# time_total: "Max:" # time_total: "Max:"
# time_goto: "Go to:" # time_goto: "Go to:"

View file

@ -452,6 +452,9 @@ module.exports = nativeDescription: "български език", englishDescri
# tip_talk_is_cheap: "Talk is cheap. Show me the code. - Linus Torvalds" # 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_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_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_current: "Now:"
# time_total: "Max:" # time_total: "Max:"
# time_goto: "Go to:" # time_goto: "Go to:"

View file

@ -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_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_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_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_current: "Now:"
# time_total: "Max:" # time_total: "Max:"
# time_goto: "Go to:" # time_goto: "Go to:"

View file

@ -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_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_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_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_current: "Now:"
# time_total: "Max:" # time_total: "Max:"
# time_goto: "Go to:" # time_goto: "Go to:"

View file

@ -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_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_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_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_current: "Now:"
# time_total: "Max:" # time_total: "Max:"
# time_goto: "Go to:" # time_goto: "Go to:"

View file

@ -452,6 +452,9 @@ module.exports = nativeDescription: "Deutsch (Österreich)", englishDescription:
tip_talk_is_cheap: "Reden ist billig. Zeig mir den Code. - Linus Torvalds" 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_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_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_current: "Aktuell"
time_total: "Total" time_total: "Total"
time_goto: "Gehe zu" time_goto: "Gehe zu"

View file

@ -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_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_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_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_current: "Jetzt:"
time_total: "Max:" time_total: "Max:"
time_goto: "Goh zu:" time_goto: "Goh zu:"

View file

@ -452,6 +452,9 @@ module.exports = nativeDescription: "Deutsch (Deutschland)", englishDescription:
tip_talk_is_cheap: "Reden ist billig. Zeig mir den Code. - Linus Torvalds" 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_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_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_current: "Aktuell"
time_total: "Total" time_total: "Total"
time_goto: "Gehe zu" time_goto: "Gehe zu"

View file

@ -452,6 +452,9 @@ module.exports = nativeDescription: "Ελληνικά", englishDescription: "Gre
# tip_talk_is_cheap: "Talk is cheap. Show me the code. - Linus Torvalds" # 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_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_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_current: "Now:"
# time_total: "Max:" # time_total: "Max:"
# time_goto: "Go to:" # time_goto: "Go to:"

View file

@ -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_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_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_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_current: "Now:"
# time_total: "Max:" # time_total: "Max:"
# time_goto: "Go to:" # time_goto: "Go to:"

View file

@ -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_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_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_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_current: "Now:"
# time_total: "Max:" # time_total: "Max:"
# time_goto: "Go to:" # time_goto: "Go to:"

View file

@ -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_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_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_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_current: "Now:"
# time_total: "Max:" # time_total: "Max:"
# time_goto: "Go to:" # time_goto: "Go to:"

View file

@ -379,6 +379,7 @@
customize_wizard: "Customize Wizard" customize_wizard: "Customize Wizard"
home: "Home" home: "Home"
stop: "Stop" stop: "Stop"
skip: "Skip"
game_menu: "Game Menu" game_menu: "Game Menu"
guide: "Guide" guide: "Guide"
restart: "Restart" restart: "Restart"
@ -400,6 +401,7 @@
victory_rate_the_level: "Rate the level: " victory_rate_the_level: "Rate the level: "
victory_return_to_ladder: "Return to Ladder" victory_return_to_ladder: "Return to Ladder"
victory_play_next_level: "Play Next Level" victory_play_next_level: "Play Next Level"
victory_play_continue: "Continue"
victory_go_home: "Go Home" victory_go_home: "Go Home"
victory_review: "Tell us more!" victory_review: "Tell us more!"
victory_hour_of_code_done: "Are You Done?" victory_hour_of_code_done: "Are You Done?"
@ -452,6 +454,9 @@
tip_talk_is_cheap: "Talk is cheap. Show me the code. - Linus Torvalds" 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_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_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_current: "Now:"
time_total: "Max:" time_total: "Max:"
time_goto: "Go to:" time_goto: "Go to:"

View file

@ -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_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_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_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_current: "Ahora:"
time_total: "Max:" time_total: "Max:"
time_goto: "Ir a:" time_goto: "Ir a:"

View file

@ -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_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_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_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_current: "Ahora:"
time_total: "Máx:" time_total: "Máx:"
time_goto: "Ir a:" time_goto: "Ir a:"

View file

@ -452,6 +452,9 @@ module.exports = nativeDescription: "فارسی", englishDescription: "Persian",
# tip_talk_is_cheap: "Talk is cheap. Show me the code. - Linus Torvalds" # 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_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_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_current: "Now:"
# time_total: "Max:" # time_total: "Max:"
# time_goto: "Go to:" # time_goto: "Go to:"

View file

@ -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_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_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_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_current: "Now:"
# time_total: "Max:" # time_total: "Max:"
# time_goto: "Go to:" # time_goto: "Go to:"

View file

@ -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_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_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_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_current: "Maintenant:"
time_total: "Max:" time_total: "Max:"
time_goto: "Allez a:" time_goto: "Allez a:"

View file

@ -452,6 +452,9 @@ module.exports = nativeDescription: "עברית", englishDescription: "Hebrew",
# tip_talk_is_cheap: "Talk is cheap. Show me the code. - Linus Torvalds" # 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_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_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_current: "Now:"
# time_total: "Max:" # time_total: "Max:"
# time_goto: "Go to:" # time_goto: "Go to:"

View file

@ -452,6 +452,9 @@ module.exports = nativeDescription: "मानक हिन्दी", englishDe
# tip_talk_is_cheap: "Talk is cheap. Show me the code. - Linus Torvalds" # 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_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_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_current: "Now:"
# time_total: "Max:" # time_total: "Max:"
# time_goto: "Go to:" # time_goto: "Go to:"

View file

@ -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_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_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_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_current: "Most:"
# time_total: "Max:" # time_total: "Max:"
# time_goto: "Go to:" # time_goto: "Go to:"

View file

@ -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_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_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_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_current: "Now:"
# time_total: "Max:" # time_total: "Max:"
# time_goto: "Go to:" # time_goto: "Go to:"

View file

@ -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_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_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_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_current: "Now:"
# time_total: "Max:" # time_total: "Max:"
# time_goto: "Go to:" # time_goto: "Go to:"

View file

@ -452,6 +452,9 @@ module.exports = nativeDescription: "日本語", englishDescription: "Japanese",
# tip_talk_is_cheap: "Talk is cheap. Show me the code. - Linus Torvalds" # 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_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_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_current: "Now:"
# time_total: "Max:" # time_total: "Max:"
# time_goto: "Go to:" # time_goto: "Go to:"

View file

@ -452,6 +452,9 @@ module.exports = nativeDescription: "한국어", englishDescription: "Korean", t
tip_talk_is_cheap: "떠드는 건 가치가 없어요. 코드를 보여줘봐요. - Linus Torvalds" 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_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_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_current: "Now:"
# time_total: "Max:" # time_total: "Max:"
# time_goto: "Go to:" # time_goto: "Go to:"

View file

@ -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_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_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_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_current: "Now:"
# time_total: "Max:" # time_total: "Max:"
# time_goto: "Go to:" # time_goto: "Go to:"

View file

@ -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_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_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_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_current: "Now:"
# time_total: "Max:" # time_total: "Max:"
# time_goto: "Go to:" # time_goto: "Go to:"

View file

@ -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_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_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_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_current: "Now:"
# time_total: "Max:" # time_total: "Max:"
# time_goto: "Go to:" # time_goto: "Go to:"

View file

@ -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_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_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_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_current: "Nu:"
time_total: "Maximum:" time_total: "Maximum:"
time_goto: "Ga naar:" time_goto: "Ga naar:"

View file

@ -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_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_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_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_current: "Nu:"
time_total: "Maximum:" time_total: "Maximum:"
time_goto: "Ga naar:" time_goto: "Ga naar:"

View file

@ -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_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_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_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_current: "Now:"
# time_total: "Max:" # time_total: "Max:"
# time_goto: "Go to:" # time_goto: "Go to:"

View file

@ -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_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_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_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_current: "Now:"
# time_total: "Max:" # time_total: "Max:"
# time_goto: "Go to:" # time_goto: "Go to:"

View file

@ -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_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_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_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_current: "Teraz:"
# time_total: "Max:" # time_total: "Max:"
time_goto: "Idź do:" time_goto: "Idź do:"

View file

@ -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_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_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_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_current: "Now:"
# time_total: "Max:" # time_total: "Max:"
# time_goto: "Go to:" # time_goto: "Go to:"

View file

@ -383,7 +383,7 @@ module.exports = nativeDescription: "Português (Portugal)", englishDescription:
guide: "Guia" guide: "Guia"
restart: "Reiniciar" restart: "Reiniciar"
goals: "Objetivos" goals: "Objetivos"
# goal: "Goal" goal: "Objetivo"
success: "Successo!" success: "Successo!"
incomplete: "Incompletos" incomplete: "Incompletos"
timed_out: "Ficou sem tempo" 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_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_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_cast: "Feitiço Lançado" # Temporary, if tome_cast_button_ran isn't translated.
# tome_cast_button_run: "Run" tome_cast_button_run: "Correr"
# tome_cast_button_running: "Running" tome_cast_button_running: "A Correr"
# tome_cast_button_ran: "Ran" tome_cast_button_ran: "Corrido"
# tome_submit_button: "Submit" tome_submit_button: "Submeter"
tome_select_spell: "Selecione um Feitiço" tome_select_spell: "Selecione um Feitiço"
tome_select_a_thang: "Selecione Alguém para " tome_select_a_thang: "Selecione Alguém para "
tome_available_spells: "Feitiços Disponíveis" tome_available_spells: "Feitiços Disponíveis"
@ -423,7 +423,7 @@ module.exports = nativeDescription: "Português (Portugal)", englishDescription:
skip_tutorial: "Saltar (esc)" skip_tutorial: "Saltar (esc)"
keyboard_shortcuts: "Atalhos do Teclado" keyboard_shortcuts: "Atalhos do Teclado"
loading_ready: "Pronto!" 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_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_toggle_play: "Alterne entre Jogar e Pausar com Ctrl+P."
tip_scrub_shortcut: "Ctrl+[ rebobina e Ctrl+] avança." tip_scrub_shortcut: "Ctrl+[ rebobina e Ctrl+] avança."
@ -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_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_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_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_current: "Agora:"
time_total: "Máximo:" time_total: "Máximo:"
time_goto: "Ir para:" time_goto: "Ir para:"

View file

@ -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_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_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_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_current: "Now:"
# time_total: "Max:" # time_total: "Max:"
# time_goto: "Go to:" # time_goto: "Go to:"

View file

@ -452,6 +452,9 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi
tip_talk_is_cheap: "Слова ничего не стоят. Покажи мне код. - Linus Torvalds" tip_talk_is_cheap: "Слова ничего не стоят. Покажи мне код. - Linus Torvalds"
tip_first_language: "Наиболее катастрофическая вещь, которую вы можете выучить - ваш первый язык программирования. - Alan Kay" tip_first_language: "Наиболее катастрофическая вещь, которую вы можете выучить - ваш первый язык программирования. - Alan Kay"
tip_hardware_problem: "В: Сколько программистов нужно, чтобы вкрутить лампочку? О: Нисколько, это проблемы с железом." 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_current: "Текущее:"
time_total: "Максимальное:" time_total: "Максимальное:"
time_goto: "Перейти на:" time_goto: "Перейти на:"

View file

@ -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_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_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_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_current: "Now:"
# time_total: "Max:" # time_total: "Max:"
# time_goto: "Go to:" # time_goto: "Go to:"

View file

@ -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_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_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_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_current: "Now:"
# time_total: "Max:" # time_total: "Max:"
# time_goto: "Go to:" # time_goto: "Go to:"

View file

@ -452,6 +452,9 @@ module.exports = nativeDescription: "српски", englishDescription: "Serbian
# tip_talk_is_cheap: "Talk is cheap. Show me the code. - Linus Torvalds" # 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_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_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_current: "Now:"
# time_total: "Max:" # time_total: "Max:"
# time_goto: "Go to:" # time_goto: "Go to:"

View file

@ -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_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_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_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_current: "Now:"
# time_total: "Max:" # time_total: "Max:"
# time_goto: "Go to:" # time_goto: "Go to:"

View file

@ -452,6 +452,9 @@ module.exports = nativeDescription: "ไทย", englishDescription: "Thai", tra
# tip_talk_is_cheap: "Talk is cheap. Show me the code. - Linus Torvalds" # 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_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_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_current: "Now:"
# time_total: "Max:" # time_total: "Max:"
# time_goto: "Go to:" # time_goto: "Go to:"

View file

@ -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_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_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_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_current: "Şimdi:"
time_total: "Max:" time_total: "Max:"
time_goto: "Git:" time_goto: "Git:"

View file

@ -452,6 +452,9 @@ module.exports = nativeDescription: "українська мова", englishDesc
tip_talk_is_cheap: "Розмови нічого не варті. Покажи мені код. - Лінус Торвальдс" tip_talk_is_cheap: "Розмови нічого не варті. Покажи мені код. - Лінус Торвальдс"
tip_first_language: "Найбільш катастрофічною річчю яку ви коли-небудь вчили є Ваша перша мова програмування. - Алан Кей" 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_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_current: "Зараз:"
time_total: "Найбільше:" time_total: "Найбільше:"
time_goto: "Перейти до:" time_goto: "Перейти до:"

View file

@ -452,6 +452,9 @@ module.exports = nativeDescription: "اُردُو", englishDescription: "Urdu",
# tip_talk_is_cheap: "Talk is cheap. Show me the code. - Linus Torvalds" # 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_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_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_current: "Now:"
# time_total: "Max:" # time_total: "Max:"
# time_goto: "Go to:" # time_goto: "Go to:"

View file

@ -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_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_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_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_current: "Now:"
# time_total: "Max:" # time_total: "Max:"
# time_goto: "Go to:" # time_goto: "Go to:"

View file

@ -452,6 +452,9 @@ module.exports = nativeDescription: "简体中文", englishDescription: "Chinese
tip_talk_is_cheap: "多说无用, 亮出你的代码. - Linus Torvalds" tip_talk_is_cheap: "多说无用, 亮出你的代码. - Linus Torvalds"
tip_first_language: "你所经历过最可怕的事情是你的第一门编程语言。 - Alan Kay" 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_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_current: "现在:"
time_total: "最大:" time_total: "最大:"
time_goto: "跳到:" time_goto: "跳到:"

View file

@ -452,6 +452,9 @@ module.exports = nativeDescription: "繁体中文", englishDescription: "Chinese
# tip_talk_is_cheap: "Talk is cheap. Show me the code. - Linus Torvalds" # 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_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_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_current: "Now:"
# time_total: "Max:" # time_total: "Max:"
# time_goto: "Go to:" # time_goto: "Go to:"

View file

@ -452,6 +452,9 @@ module.exports = nativeDescription: "吴语", englishDescription: "Wuu (Simplifi
# tip_talk_is_cheap: "Talk is cheap. Show me the code. - Linus Torvalds" # 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_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_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_current: "Now:"
# time_total: "Max:" # time_total: "Max:"
# time_goto: "Go to:" # time_goto: "Go to:"

View file

@ -452,6 +452,9 @@ module.exports = nativeDescription: "吳語", englishDescription: "Wuu (Traditio
tip_talk_is_cheap: "甮七講八講,代碼摜出望爻。- 林納斯·托華兹" tip_talk_is_cheap: "甮七講八講,代碼摜出望爻。- 林納斯·托華兹"
tip_first_language: "爾經歷着最䁨嗰事幹是爾個頭一門編程語言。 - Alan Kay" 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_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_current: "瑲朞:"
time_total: "頂大:" time_total: "頂大:"
time_goto: "轉到:" time_goto: "轉到:"

View file

@ -90,6 +90,7 @@ _.extend UserSchema.properties,
mailChimp: {type: 'object'} mailChimp: {type: 'object'}
hourOfCode: {type: 'boolean'} hourOfCode: {type: 'boolean'}
hourOfCodeComplete: {type: 'boolean'} hourOfCodeComplete: {type: 'boolean'}
lastIP: {type: 'string'}
emailLower: c.shortString() emailLower: c.shortString()
nameLower: c.shortString() nameLower: c.shortString()

View file

@ -41,6 +41,8 @@ module.exports =
'god:goals-calculated': c.object {required: ['goalStates']}, 'god:goals-calculated': c.object {required: ['goalStates']},
goalStates: goalStatesSchema goalStates: goalStatesSchema
preload: {type: 'boolean'}
overallStatus: {type: ['string', 'null'], enum: ['success', 'failure', 'incomplete', null]}
'god:world-load-progress-changed': c.object {required: ['progress']}, 'god:world-load-progress-changed': c.object {required: ['progress']},
progress: {type: 'number', minimum: 0, maximum: 1} progress: {type: 'number', minimum: 0, maximum: 1}

View file

@ -34,25 +34,37 @@
.btn .btn
padding: 3px 10px padding: 3px 10px
height: 40px height: 40px
font-size: 22px
.submit-button .submit-button
margin-left: 20px margin-left: 20px
min-width: 150px
.cast-button .cast-button
margin-left: 10px margin-left: 10px
min-width: 150px
@include opacity(0.77) @include opacity(0.77)
&:hover, &.castable &:hover, &.castable
@include opacity(1) @include opacity(1)
&:not(.winnable) .cast-button.castable &:not(.winnable)
.cast-button.castable
font-weight: bold font-weight: bold
-webkit-animation-name: castablePulse -webkit-animation-name: castablePulse
-webkit-animation-duration: 3s -webkit-animation-duration: 3s
-webkit-animation-iteration-count: infinite -webkit-animation-iteration-count: infinite
&.winnable .submit-button .submit-button
font-size: 16px
&.winnable
.submit-button
font-weight: bold font-weight: bold
-webkit-animation-name: winnablePulse -webkit-animation-name: winnablePulse
-webkit-animation-duration: 3s -webkit-animation-duration: 3s
-webkit-animation-iteration-count: infinite -webkit-animation-iteration-count: infinite
.cast-button
font-size: 16px

View file

@ -124,7 +124,7 @@
// border-bottom: 1px dotted rgba(0, 51, 255, 0.25) // border-bottom: 1px dotted rgba(0, 51, 255, 0.25)
.ace_text-layer .ace_comment .ace_text-layer .ace_comment
color: darken(rgb(103, 164, 200), 5%) color: rgb(78, 38, 226)
.ace_text-layer .ace_variable .ace_text-layer .ace_variable
// https://github.com/codecombat/codecombat/issues/6 // https://github.com/codecombat/codecombat/issues/6

View file

@ -116,14 +116,10 @@ $gameControlMargin: 30px
display: none display: none
position: absolute position: absolute
z-index: 3 z-index: 3
padding: 10px 10px 30px 10px padding: 10px
border-image: url(/images/level/popover_background.png) 18 fill round border-image: url(/images/level/popover_background.png) 18 fill round
border-width: 15px border-width: 15px
.level-image
float: left
margin-right: 20px
.level-info.complete h3:after .level-info.complete h3:after
content: " - Complete!" content: " - Complete!"
color: green color: green
@ -133,9 +129,6 @@ $gameControlMargin: 30px
color: desaturate(green, 50%) color: desaturate(green, 50%)
.level-info .level-info
width: 330px
float: left
h3 h3
margin-top: 0 margin-top: 0
margin-bottom: 0px margin-bottom: 0px
@ -147,6 +140,11 @@ $gameControlMargin: 30px
.campaign-label .campaign-label
text-shadow: 0 1px 0 white text-shadow: 0 1px 0 white
.start-level
display: block
margin: 10px auto 0 auto
width: 200px
.game-controls .game-controls
position: absolute position: absolute
right: 1% right: 1%

View file

@ -25,7 +25,7 @@
#thang-hud #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 .footer
.content .content

View file

@ -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_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_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_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 strong.tip.rare
span(data-i18n='play_level.tip_harry') Yer a Wizard, span(data-i18n='play_level.tip_harry') Yer a Wizard,
span= me.get('name', true) span= me.get('name', true)

View file

@ -15,10 +15,10 @@ block modal-footer-content
.ladder-submission-view .ladder-submission-view
else if level.get('type') === 'ladder' 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 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 else if hasNextLevel
button.btn.btn-success.next-level-button(data-dismiss="modal", data-i18n="play_level.victory_play_next_level") Play Next Level 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 else
a.btn.btn-primary(href="/", data-dismiss="modal", data-i18n="play_level.victory_go_home") Go Home a.btn.btn-primary(href="/", data-dismiss="modal", data-i18n="play_level.victory_go_home") Go Home
if me.get('anonymous') if me.get('anonymous')

View file

@ -6,14 +6,10 @@
each level in campaign.levels each level in campaign.levels
- var next = !seenNext && levelStatusMap[level.id] != "complete"; - var next = !seenNext && levelStatusMap[level.id] != "complete";
- seenNext = seenNext || next; - 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) 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] || "") div(style="left: #{level.x}%; bottom: #{level.y}%", class="level-shadow" + (next ? " next" : "") + " " + levelStatusMap[level.id] || "")
.level-info-container(data-level-id=level.id) .level-info-container(data-level-id=level.id, data-level-path=level.levelPath || 'level', data-level-name=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] || "")) div(class="level-info " + (levelStatusMap[level.id] || ""))
h3= level.name + (level.disabled ? " (Coming soon!)" : "") h3= level.name + (level.disabled ? " (Coming soon!)" : "")
.level-description= level.description .level-description= level.description
@ -21,13 +17,14 @@
each i in Array(level.difficulty) each i in Array(level.difficulty)
i.icon-star i.icon-star
- var playCount = levelPlayCountMap[level.id] - var playCount = levelPlayCountMap[level.id]
if playCount if playCount && playCount > 20
div div
span.spr #{playCount.sessions} span.spr #{playCount.sessions}
span(data-i18n="play.players") players span(data-i18n="play.players") players
span.spr , #{Math.round(playCount.playtime / 3600)} span.spr , #{Math.round(playCount.playtime / 3600)}
span(data-i18n="play.hours_played") hours played span(data-i18n="play.hours_played") hours played
.campaign-label(style="color: #{campaign.color}")= campaign.name .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 .game-controls.header-font
if me.isAdmin() if me.isAdmin()

View file

@ -50,7 +50,7 @@ module.exports = class WorldSelectModal extends ModalView
grid: true grid: true
navigateToSelection: false navigateToSelection: false
choosing: @dataType choosing: @dataType
coords: false coords: true
thangTypes: @supermodel.getModels(ThangType) thangTypes: @supermodel.getModels(ThangType)
showInvisible: true showInvisible: true
} }

View file

@ -188,6 +188,7 @@ module.exports = class ThangsTabView extends CocoView
@surface = new Surface @world, surfaceCanvas, { @surface = new Surface @world, surfaceCanvas, {
wizards: false wizards: false
paths: false paths: false
coords: true
grid: true grid: true
navigateToSelection: false navigateToSelection: false
thangTypes: @supermodel.getModels(ThangType) thangTypes: @supermodel.getModels(ThangType)

View file

@ -18,11 +18,12 @@ module.exports = class WorldMapView extends RootView
template: template template: template
events: events:
'click .map': 'onClickMap' 'click .map-background': 'onClickMap'
'click .level a': 'onClickLevel' 'click .level a': 'onClickLevel'
'mouseenter .level a': 'onMouseEnterLevel' 'click .level-info-container .start-level': 'onClickStartLevel'
'mouseleave .level a': 'onMouseLeaveLevel' #'mouseenter .level a': 'onMouseEnterLevel'
'mousemove .map': 'onMouseMoveMap' #'mouseleave .level a': 'onMouseLeaveLevel'
#'mousemove .map': 'onMouseMoveMap'
constructor: (options) -> constructor: (options) ->
super options super options
@ -71,6 +72,7 @@ module.exports = class WorldMapView extends RootView
super() super()
@onWindowResize() @onWindowResize()
_.defer => @$el.find('.game-controls button').tooltip() # Have to defer or i18n doesn't take effect. _.defer => @$el.find('.game-controls button').tooltip() # Have to defer or i18n doesn't take effect.
@$el.find('.level').tooltip()
onSessionsLoaded: (e) -> onSessionsLoaded: (e) ->
for session in @sessions.models for session in @sessions.models
@ -78,6 +80,7 @@ module.exports = class WorldMapView extends RootView
@render() @render()
onClickMap: (e) -> onClickMap: (e) ->
@$levelInfo?.hide()
# Easy-ish way of figuring out coordinates for placing level dots. # Easy-ish way of figuring out coordinates for placing level dots.
x = e.offsetX / @$el.find('.map-background').width() x = e.offsetX / @$el.find('.map-background').width()
y = (1 - e.offsetY / @$el.find('.map-background').height()) y = (1 - e.offsetY / @$el.find('.map-background').height())
@ -85,21 +88,30 @@ module.exports = class WorldMapView extends RootView
onClickLevel: (e) -> onClickLevel: (e) ->
e.preventDefault() e.preventDefault()
e.stopPropagation()
@$levelInfo?.hide()
return if $(e.target).attr('disabled') 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') levelID = $(e.target).parents('.level').data('level-id')
@$levelInfo = @$el.find(".level-info-container[data-level-id=#{levelID}]").show() @$levelInfo = @$el.find(".level-info-container[data-level-id=#{levelID}]").show()
@adjustLevelInfoPosition e @adjustLevelInfoPosition e
onMouseLeaveLevel: (e) -> onClickStartLevel: (e) ->
levelID = $(e.target).parents('.level').data('level-id') container = $(e.target).parents('.level-info-container')
@$el.find(".level-info-container[data-level-id='#{levelID}']").hide() 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) -> #onMouseEnterLevel: (e) ->
@adjustLevelInfoPosition 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) -> adjustLevelInfoPosition: (e) ->
return unless @$levelInfo return unless @$levelInfo
@ -476,7 +488,6 @@ hero = [
type: 'hero' type: 'hero'
difficulty: 1 difficulty: 1
id: 'dungeons-of-kithgard' id: 'dungeons-of-kithgard'
image: '/file/db/level/52740644904ac0411700067c/rescue_mission_icon.png'
description: 'Grab the gem, but touch nothing else. Start here.' description: 'Grab the gem, but touch nothing else. Start here.'
x: 17.23 x: 17.23
y: 36.94 y: 36.94
@ -486,7 +497,6 @@ hero = [
type: 'hero' type: 'hero'
difficulty: 1 difficulty: 1
id: 'gems-in-the-deep' id: 'gems-in-the-deep'
image: '/file/db/level/529662dfe0df8f0000000007/grab_the_mushroom_icon.png'
description: 'Quickly collect the gems; you will need them.' description: 'Quickly collect the gems; you will need them.'
x: 22.6 x: 22.6
y: 35.1 y: 35.1
@ -496,7 +506,6 @@ hero = [
type: 'hero' type: 'hero'
difficulty: 1 difficulty: 1
id: 'shadow-guard' id: 'shadow-guard'
image: '/file/db/level/525dc5589a0765e496000006/drink_me_icon.png'
description: 'Evade the Kithgard minion.' description: 'Evade the Kithgard minion.'
x: 27.74 x: 27.74
y: 35.17 y: 35.17
@ -506,7 +515,6 @@ hero = [
type: 'hero' type: 'hero'
difficulty: 1 difficulty: 1
id: 'true-names' id: 'true-names'
image: '/file/db/level/5276c9bdcf83207a2801ff8f/taunt_icon.png'
description: 'Learn an enemy\'s true name to defeat it.' description: 'Learn an enemy\'s true name to defeat it.'
x: 32.7 x: 32.7
y: 36.7 y: 36.7
@ -516,7 +524,6 @@ hero = [
type: 'hero' type: 'hero'
difficulty: 1 difficulty: 1
id: 'the-raised-sword' id: 'the-raised-sword'
image: '/file/db/level/528aea2d7f37fc4e0700016b/its_a_trap_icon.png'
description: 'Learn to equip yourself for combat.' description: 'Learn to equip yourself for combat.'
x: 36.6 x: 36.6
y: 39.5 y: 39.5
@ -526,7 +533,6 @@ hero = [
type: 'hero' type: 'hero'
difficulty: 1 difficulty: 1
id: 'the-first-kithmaze' 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.' description: 'The builders of Kith constructed many mazes to confuse travelers.'
x: 38.4 x: 38.4
y: 43.5 y: 43.5
@ -536,7 +542,6 @@ hero = [
type: 'hero' type: 'hero'
difficulty: 1 difficulty: 1
id: 'the-second-kithmaze' id: 'the-second-kithmaze'
image: '/file/db/level/525f150306e1ab0962000018/taunt_icon.png'
description: 'Many have tried, few have found their way through this maze.' description: 'Many have tried, few have found their way through this maze.'
x: 38.9 x: 38.9
y: 48.1 y: 48.1
@ -546,7 +551,6 @@ hero = [
type: 'hero' type: 'hero'
difficulty: 1 difficulty: 1
id: 'new-sight' id: 'new-sight'
image: '/file/db/level/525abfd9b12777d78e000009/cowardly_taunt_icon.png'
description: 'A true name can only be seen with the correct lenses.' description: 'A true name can only be seen with the correct lenses.'
x: 39.3 x: 39.3
y: 53.1 y: 53.1
@ -556,7 +560,6 @@ hero = [
type: 'hero' type: 'hero'
difficulty: 1 difficulty: 1
id: 'lowly-kithmen' id: 'lowly-kithmen'
image: '/file/db/level/525ef8ef06e1ab0962000003/commanding_followers_icon.png'
description: 'Use your glasses to seek out and attack the Kithmen.' description: 'Use your glasses to seek out and attack the Kithmen.'
x: 39.4 x: 39.4
y: 57.7 y: 57.7
@ -566,7 +569,6 @@ hero = [
type: 'hero' type: 'hero'
difficulty: 1 difficulty: 1
id: 'a-bolt-in-the-dark' 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.' description: 'Kithmen are not the only ones to stand in your way.'
x: 40.0 x: 40.0
y: 63.2 y: 63.2
@ -574,9 +576,8 @@ hero = [
{ {
name: 'The Final Kithmaze' name: 'The Final Kithmaze'
type: 'hero' type: 'hero'
difficulty: 2 difficulty: 1
id: 'the-final-kithmaze' 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.' description: 'To escape you must find your way through an Elder Kithman\'s maze.'
x: 42.67 x: 42.67
y: 67.98 y: 67.98
@ -586,7 +587,6 @@ hero = [
type: 'hero' type: 'hero'
difficulty: 1 difficulty: 1
id: 'kithgard-gates' 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.' description: 'Escape the Kithgard dungeons and don\'t let the guardians get you.'
x: 47.38 x: 47.38
y: 70.55 y: 70.55
@ -596,7 +596,6 @@ hero = [
type: 'hero' type: 'hero'
difficulty: 1 difficulty: 1
id: 'defence-of-plainswood' id: 'defence-of-plainswood'
image: '/file/db/level/525dc5589a0765e496000006/drink_me_icon.png'
description: 'Protect the peasants from the pursuing ogres.' description: 'Protect the peasants from the pursuing ogres.'
x: 52.66 x: 52.66
y: 69.66 y: 69.66
@ -606,7 +605,6 @@ hero = [
# type: 'hero' # type: 'hero'
# difficulty: 1 # difficulty: 1
# id: '' # id: ''
# image: '/file/db/level/529662dfe0df8f0000000007/grab_the_mushroom_icon.png'
# description: '' # description: ''
# x: 58.46 # x: 58.46
# y: 66.38 # y: 66.38
@ -616,7 +614,6 @@ hero = [
# type: 'hero' # type: 'hero'
# difficulty: 1 # difficulty: 1
# id: '' # id: ''
# image: '/file/db/level/526ae95c1e5cd30000000008/zone_of_danger_icon.png'
# description: '' # description: ''
# x: 63.11 # x: 63.11
# y: 62.74 # y: 62.74
@ -626,7 +623,6 @@ hero = [
# type: 'hero' # type: 'hero'
# difficulty: 1 # difficulty: 1
# id: '' # id: ''
# image: '/file/db/level/529662dfe0df8f0000000007/grab_the_mushroom_icon.png'
# description: '' # description: ''
# x: 69.19 # x: 69.19
# y: 60.61 # y: 60.61
@ -636,7 +632,6 @@ hero = [
# type: 'hero' # type: 'hero'
# difficulty: 1 # difficulty: 1
# id: '' # id: ''
# image: '/file/db/level/52740644904ac0411700067c/rescue_mission_icon.png'
# description: '' # description: ''
# x: 77.54 # x: 77.54
# y: 65.94 # y: 65.94
@ -646,7 +641,6 @@ hero = [
# type: 'hero' # type: 'hero'
# difficulty: 1 # difficulty: 1
# id: '' # id: ''
# image: '/file/db/level/526711d9add4f8965f000002/hunter_triplets_icon.png'
# description: '' # description: ''
# x: 84.29 # x: 84.29
# y: 61.23 # y: 61.23

View file

@ -49,11 +49,14 @@ module.exports = class LevelLoadingView extends CocoView
startUnveiling: (e) -> startUnveiling: (e) ->
Backbone.Mediator.publish 'level:loading-view-unveiling', {} 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()
unveil: -> unveil: ->
return if @$el.hasClass 'unveiled'
@$el.addClass 'unveiled' @$el.addClass 'unveiled'
loadingDetails = @$el.find('.loading-details') loadingDetails = @$el.find('.loading-details')
duration = parseFloat loadingDetails.css 'transition-duration' duration = parseFloat loadingDetails.css 'transition-duration'

View file

@ -329,7 +329,7 @@ module.exports = class PlayLevelView extends RootView
onLevelStarted: -> onLevelStarted: ->
return unless @surface? return unless @surface?
@loadingView.showReady() @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, @ return Backbone.Mediator.subscribeOnce 'modal:closed', @onLevelStarted, @
@surface.showLevel() @surface.showLevel()
if @otherSession and @level.get('type', true) isnt 'hero' if @otherSession and @level.get('type', true) isnt 'hero'

View file

@ -17,6 +17,7 @@ module.exports = class CastButtonView extends CocoView
'real-time-multiplayer:joined-game': 'onJoinedRealTimeMultiplayerGame' 'real-time-multiplayer:joined-game': 'onJoinedRealTimeMultiplayerGame'
'real-time-multiplayer:left-game': 'onLeftRealTimeMultiplayerGame' 'real-time-multiplayer:left-game': 'onLeftRealTimeMultiplayerGame'
'goal-manager:new-goal-states': 'onNewGoalStates' 'goal-manager:new-goal-states': 'onNewGoalStates'
'god:goals-calculated': 'onGoalsCalculated'
constructor: (options) -> constructor: (options) ->
super options super options
@ -85,6 +86,10 @@ module.exports = class CastButtonView extends CocoView
if @winnable if @winnable
@$el.find('.submit-button').show() # In case we hid it, like on the first level. @$el.find('.submit-button').show() # In case we hid it, like on the first level.
onGoalsCalculated: (e) ->
return unless e.preload
@onNewGoalStates e
updateCastButton: -> updateCastButton: ->
return if _.some @spells, (spell) => not spell.loaded return if _.some @spells, (spell) => not spell.loaded

View file

@ -41,7 +41,7 @@ module.exports = class Spell
@source = sessionSource @source = sessionSource
@thangs = {} @thangs = {}
if @canRead() # We can avoid creating these views if we'll never use them. 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 @view.render() # Get it ready and code loaded in advance
@tabView = new SpellListTabEntryView spell: @, supermodel: @supermodel, language: @language @tabView = new SpellListTabEntryView spell: @, supermodel: @supermodel, language: @language
@tabView.render() @tabView.render()

View file

@ -61,6 +61,7 @@ module.exports = class SpellListTabEntryView extends SpellListEntryView
@avatar.render() @avatar.render()
buildDocs: -> buildDocs: ->
return if @spell.name is 'plan' # Too confusing for beginners
@docsBuilt = true @docsBuilt = true
lcs = @supermodel.getModels LevelComponent lcs = @supermodel.getModels LevelComponent
found = false found = false

View file

@ -100,11 +100,11 @@ module.exports = class SpellView extends CocoView
@toggleControls null, @writable @toggleControls null, @writable
@aceSession.selection.on 'changeCursor', @onCursorActivity @aceSession.selection.on 'changeCursor', @onCursorActivity
$(@ace.container).find('.ace_gutter').on 'click', '.ace_error, .ace_warning, .ace_info', @onAnnotationClick $(@ace.container).find('.ace_gutter').on 'click', '.ace_error, .ace_warning, .ace_info', @onAnnotationClick
@zatanna = new Zatanna @ace, # TODO: restore Zatanna when it totally stops the this.this.moveRight()(); problem
#@zatanna = new Zatanna @ace,
liveCompletion: aceConfig.liveCompletion ? true # liveCompletion: aceConfig.liveCompletion ? true
completers: # completers:
keywords: false # keywords: false
createACEShortcuts: -> createACEShortcuts: ->
@aceCommands = aceCommands = [] @aceCommands = aceCommands = []
@ -192,6 +192,7 @@ module.exports = class SpellView extends CocoView
@ace.clearSelection() @ace.clearSelection()
addZatannaSnippets: (e) -> addZatannaSnippets: (e) ->
return unless @zatanna
snippetEntries = [] snippetEntries = []
for owner, props of e.propGroups for owner, props of e.propGroups
for prop in props for prop in props
@ -250,6 +251,7 @@ module.exports = class SpellView extends CocoView
@createToolbarView() @createToolbarView()
createDebugView: -> 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 @debugView = new SpellDebugView ace: @ace, thang: @thang, spell:@spell
@$el.append @debugView.render().$el.hide() @$el.append @debugView.render().$el.hide()
@ -258,7 +260,7 @@ module.exports = class SpellView extends CocoView
@$el.append @toolbarView.render().$el @$el.append @toolbarView.render().$el
onMouseOut: (e) -> onMouseOut: (e) ->
@debugView.onMouseOut e @debugView?.onMouseOut e
getSource: -> getSource: ->
@ace.getValue() # could also do @firepad.getText() @ace.getValue() # could also do @firepad.getText()
@ -269,7 +271,7 @@ module.exports = class SpellView extends CocoView
@thang = thang @thang = thang
@spellThang = @spell.thangs[@thang.id] @spellThang = @spell.thangs[@thang.id]
@createDebugView() unless @debugView @createDebugView() unless @debugView
@debugView.thang = @thang @debugView?.thang = @thang
@toolbarView?.toggleFlow false @toolbarView?.toggleFlow false
@updateAether false, false @updateAether false, false
# @addZatannaSnippets() # @addZatannaSnippets()
@ -589,7 +591,7 @@ module.exports = class SpellView extends CocoView
@decoratedGutter[row] = '' @decoratedGutter[row] = ''
if not executed.length or (@spell.name is 'plan' and @spellThang.castAether.metrics.statementsExecuted < 20) if not executed.length or (@spell.name is 'plan' and @spellThang.castAether.metrics.statementsExecuted < 20)
@toolbarView?.toggleFlow false @toolbarView?.toggleFlow false
@debugView.setVariableStates {} @debugView?.setVariableStates {}
return return
lastExecuted = _.last executed lastExecuted = _.last executed
@toolbarView?.toggleFlow true @toolbarView?.toggleFlow true
@ -606,7 +608,7 @@ module.exports = class SpellView extends CocoView
marked[start.row] = true marked[start.row] = true
markerType = 'fullLine' markerType = 'fullLine'
else else
@debugView.setVariableStates state.variables @debugView?.setVariableStates state.variables
gotVariableStates = true gotVariableStates = true
markerType = 'text' markerType = 'text'
markerRange = new Range start.row, start.col, end.row, end.col 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.removeGutterDecoration start.row, @decoratedGutter[start.row] if @decoratedGutter[start.row] isnt ''
@aceSession.addGutterDecoration start.row, clazz @aceSession.addGutterDecoration start.row, clazz
@decoratedGutter[start.row] = clazz @decoratedGutter[start.row] = clazz
@debugView.setVariableStates {} unless gotVariableStates @debugView?.setVariableStates {} unless gotVariableStates
null null
highlightComments: -> highlightComments: ->
@ -676,12 +678,12 @@ module.exports = class SpellView extends CocoView
@ace.setDisplayIndentGuides aceConfig.indentGuides # default false @ace.setDisplayIndentGuides aceConfig.indentGuides # default false
@ace.setShowInvisibles aceConfig.invisibles # default false @ace.setShowInvisibles aceConfig.invisibles # default false
@ace.setKeyboardHandler @keyBindings[aceConfig.keyBindings ? 'default'] @ace.setKeyboardHandler @keyBindings[aceConfig.keyBindings ? 'default']
@zatanna.set 'liveCompletion', (aceConfig.liveCompletion ? false) @zatanna?.set 'liveCompletion', (aceConfig.liveCompletion ? false)
onChangeLanguage: (e) -> onChangeLanguage: (e) ->
return unless @spell.canWrite() return unless @spell.canWrite()
@aceSession.setMode @editModes[e.language] @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 wasDefault = @getSource() is @spell.originalSource
@spell.setLanguage e.language @spell.setLanguage e.language
@reloadCode true if wasDefault @reloadCode true if wasDefault

View file

@ -137,6 +137,7 @@ module.exports = class TomeView extends CocoView
spectateView: @options.spectateView spectateView: @options.spectateView
spectateOpponentCodeLanguage: @options.spectateOpponentCodeLanguage spectateOpponentCodeLanguage: @options.spectateOpponentCodeLanguage
levelID: @options.levelID levelID: @options.levelID
level: @options.level
for thangID, spellKeys of @thangSpells for thangID, spellKeys of @thangSpells
thang = world.getThangByID thangID thang = world.getThangByID thangID

View file

@ -186,6 +186,7 @@ module.exports.makeNewUser = makeNewUser = (req) ->
user = new User({anonymous: true}) user = new User({anonymous: true})
user.set 'testGroupNumber', Math.floor(Math.random() * 256) # also in app/lib/auth user.set 'testGroupNumber', Math.floor(Math.random() * 256) # also in app/lib/auth
user.set 'preferredLanguage', languages.languageCodeFromAcceptedLanguages req.acceptedLanguages user.set 'preferredLanguage', languages.languageCodeFromAcceptedLanguages req.acceptedLanguages
user.set 'lastIP', req.connection.remoteAddress
createMailOptions = (receiver, password) -> createMailOptions = (receiver, password) ->
# TODO: use email templates here # TODO: use email templates here

View file

@ -15,7 +15,7 @@ EarnedAchievement = require '../achievements/EarnedAchievement'
UserRemark = require './remarks/UserRemark' UserRemark = require './remarks/UserRemark'
{isID} = require '../lib/utils' {isID} = require '../lib/utils'
serverProperties = ['passwordHash', 'emailLower', 'nameLower', 'passwordReset'] serverProperties = ['passwordHash', 'emailLower', 'nameLower', 'passwordReset', 'lastIP']
candidateProperties = [ candidateProperties = [
'jobProfile', 'jobProfileApproved', 'jobProfileNotes' 'jobProfile', 'jobProfileApproved', 'jobProfileNotes'
] ]

View file

@ -96,6 +96,8 @@ setupFallbackRouteToIndex = (app) ->
app.all '*', (req, res) -> app.all '*', (req, res) ->
if req.user if req.user
sendMain(req, res) sendMain(req, res)
req.user.set('lastIP', req.connection.remoteAddress)
req.user.save()
else else
user = auth.makeNewUser(req) user = auth.makeNewUser(req)
makeNext = (req, res) -> -> sendMain(req, res) makeNext = (req, res) -> -> sendMain(req, res)