This commit is contained in:
Scott Erickson 2014-03-14 11:58:42 -07:00
commit 39ed6c3a43
76 changed files with 821 additions and 66 deletions

View file

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View file

@ -4,6 +4,7 @@ module.exports = class CoordinateDisplay extends createjs.Container
'surface:mouse-moved': 'onMouseMove'
'surface:mouse-out': 'onMouseOut'
'surface:mouse-over': 'onMouseOver'
'surface:stage-mouse-down': 'onMouseDown'
'camera:zoom-updated': 'onZoomUpdated'
constructor: (options) ->
@ -30,6 +31,10 @@ module.exports = class CoordinateDisplay extends createjs.Container
onMouseOut: (e) -> @mouseInBounds = false
onMouseMove: (e) ->
if @mouseInBounds and key.shift
$('#surface').addClass('flag-cursor') unless $('#surface').hasClass('flag-cursor')
else if @mouseInBounds
$('#surface').removeClass('flag-cursor') if $('#surface').hasClass('flag-cursor')
wop = @camera.canvasToWorld x: e.x, y: e.y
wop.x = Math.round(wop.x)
wop.y = Math.round(wop.y)
@ -38,6 +43,13 @@ module.exports = class CoordinateDisplay extends createjs.Container
@hide()
@show() # debounced
onMouseDown: (e) ->
return unless key.shift
wop = @camera.canvasToWorld x: e.x, y: e.y
wop.x = Math.round wop.x
wop.y = Math.round wop.y
Backbone.Mediator.publish 'surface:coordinate-selected', wop
onZoomUpdated: (e) ->
@hide()
@show()

View file

@ -1,6 +1,6 @@
CocoClass = require 'lib/CocoClass'
module.exports = class PlaybackoverScreen extends CocoClass
module.exports = class PlaybackOverScreen extends CocoClass
constructor: (options) ->
super()
options ?= {}
@ -10,7 +10,7 @@ module.exports = class PlaybackoverScreen extends CocoClass
console.error @toString(), "needs a layer." unless @layer
@build()
toString: -> "<PlaybackoverScreen>"
toString: -> "<PlaybackOverScreen>"
build: ->
@dimLayer = new createjs.Container()
@ -23,18 +23,16 @@ module.exports = class PlaybackoverScreen extends CocoClass
@layer.addChild @dimLayer
show: ->
console.log 'show playback over screen', @showing
return if @showing
@showing = true
@dimLayer.alpha = 0
createjs.Tween.removeTweens @dimLayer
createjs.Tween.get(@dimLayer).to({alpha:1}, 500)
hide: ->
console.log 'hide playback over screen', @showing
return unless @showing
@showing = false
createjs.Tween.removeTweens @dimLayer
createjs.Tween.get(@dimLayer).to({alpha:0}, 500)

View file

@ -151,8 +151,10 @@ module.exports = class SpriteBoss extends CocoClass
removeSprite: (sprite) ->
sprite.displayObject.parent.removeChild sprite.displayObject
thang = sprite.thang
delete @sprites[sprite.thang.id]
sprite.destroy()
sprite.thang = thang # Keep around so that we know which thang the destroyed thang was for
updateSounds: ->
sprite.playSounds() for thangID, sprite of @sprites # hmm; doesn't work for sprites which we didn't add yet in adjustSpriteExistence
@ -186,7 +188,6 @@ module.exports = class SpriteBoss extends CocoClass
# mainly for handling selecting thangs from session when the thang is not always in existence
if @willSelectThang and @sprites[@willSelectThang[0]]
@selectThang @willSelectThang...
@willSelectThang = null
cache: (update=false) ->
return if @cached and not update
@ -239,14 +240,14 @@ module.exports = class SpriteBoss extends CocoClass
@dragged += 1
onSpriteMouseUp: (e) ->
return if key.shift and @options.choosing
return if key.shift #and @options.choosing
return @dragged = 0 if @dragged > 3
@dragged = 0
sprite = if e.sprite?.thang?.isSelectable then e.sprite else null
@selectSprite e, sprite
onStageMouseDown: (e) ->
return if key.shift and @options.choosing
return if key.shift #and @options.choosing
@selectSprite e if e.onBackground
selectThang: (thangID, spellName=null) ->
@ -273,6 +274,8 @@ module.exports = class SpriteBoss extends CocoClass
originalEvent: e
worldPos: worldPos
@willSelectThang = null if sprite # Now that we've done a real selection, don't reselect some other Thang later.
if alive and not @suppressSelectionSounds
instance = sprite.playSound 'selected'
if instance?.playState is 'playSucceeded'
@ -280,12 +283,15 @@ module.exports = class SpriteBoss extends CocoClass
instance.addEventListener 'complete', ->
Backbone.Mediator.publish 'thang-finished-talking', thang: sprite?.thang
# Marks
updateSelection: ->
if @selectedSprite?.thang and (not @selectedSprite.thang.exists or not @world.getThangByID @selectedSprite.thang.id)
@selectSprite null, null, null
thangID = @selectedSprite.thang.id
@selectedSprite = null # Don't actually trigger deselection, but remove the selected sprite.
@selectionMark?.toggle false
@willSelectThang = [thangID, null]
@updateTarget()
return unless @selectionMark
@selectedSprite = null unless @selectedSprite?.thang

View file

@ -117,7 +117,8 @@ module.exports = Surface = class Surface extends CocoClass
@updateState true if @loaded
# TODO: synchronize both ways of choosing whether to show coords (@world via UI System or @options via World Select modal)
if @world.showCoordinates and @options.coords
@surfaceTextLayer.addChild new CoordinateDisplay camera: @camera
@coordinateDisplay = new CoordinateDisplay camera: @camera
@surfaceTextLayer.addChild @coordinateDisplay
@onFrameChanged()
Backbone.Mediator.publish 'surface:world-set-up'
@ -322,6 +323,10 @@ module.exports = Surface = class Surface extends CocoClass
@wasPlayingWhenCastingBegan = @playing
Backbone.Mediator.publish 'level-set-playing', { playing: false }
if @coordinateDisplay?
@surfaceTextLayer.removeChild @coordinateDisplay
@coordinateDisplay.destroy()
createjs.Tween.removeTweens(@surfaceLayer)
createjs.Tween.get(@surfaceLayer).to({alpha:0.9}, 1000, createjs.Ease.getPowOut(4.0))

View file

@ -23,7 +23,7 @@ module.exports = class Thang
name
@resetThangIDs: -> Thang.remainingThangNames = {}
isThang: true
apiProperties: ['id', 'spriteName', 'health', 'pos', 'team']
constructor: (@world, @spriteName, @id) ->

View file

@ -1,7 +1,5 @@
{clone} = require './world_utils'
{scriptMatchesEventPrereqs} = require './script_event_prereqs'
Thang = require './thang'
Vector = require './vector'
module.exports = class WorldScriptNote
@className: "WorldScriptNote"
@ -18,11 +16,11 @@ module.exports = class WorldScriptNote
serialize: ->
o = {channel: @channel, event: {}}
for key, value of @event
if value instanceof Thang
if value?.isThang
value = {isThang: true, id: value.id}
else if _.isArray value
for subval, i in value
if subval instanceof Thang
if subval?.isThang
value[i] = {isThang: true, id: subval.id}
o.event[key] = value
o

View file

@ -39,9 +39,7 @@ module.exports.clone = clone = (obj, skipThangs=false) ->
if (obj instanceof Vector) or (obj instanceof Rectangle)
return obj.copy()
# We don't have Thang class here, but we can fake it to avoid the circular import
#if skipThangs and obj instanceof Thang
if skipThangs and obj.id? and obj.trackedPropertiesKeys?
if skipThangs and obj.isThang
return obj
if ArrayBufferView and obj instanceof ArrayBufferView

View file

@ -207,6 +207,17 @@ module.exports = nativeDescription: "العربية", englishDescription: "Arabi
# hud_continue: "Continue (shift+space)"
# spell_saved: "Spell Saved"
# skip_tutorial: "Skip (esc)"
# editor_config: "Editor Config"
# editor_config_title: "Editor Configuration"
# editor_config_keybindings_label: "Key Bindings"
# editor_config_keybindings_default: "Default (Ace)"
# editor_config_keybindings_description: "Adds additional shortcuts known from the common editors."
# editor_config_invisibles_label: "Show Invisibles"
# editor_config_invisibles_description: "Displays invisibles such as spaces or tabs."
# editor_config_indentguides_label: "Show Indent Guides"
# editor_config_indentguides_description: "Displays vertical lines to see indentation better."
# editor_config_behaviors_label: "Smart Behaviors"
# editor_config_behaviors_description: "Autocompletes brackets, braces, and quotes."
# admin:
# av_title: "Admin Views"

View file

@ -207,6 +207,17 @@ module.exports = nativeDescription: "български език", englishDescri
# hud_continue: "Continue (shift+space)"
# spell_saved: "Spell Saved"
# skip_tutorial: "Skip (esc)"
# editor_config: "Editor Config"
# editor_config_title: "Editor Configuration"
# editor_config_keybindings_label: "Key Bindings"
# editor_config_keybindings_default: "Default (Ace)"
# editor_config_keybindings_description: "Adds additional shortcuts known from the common editors."
# editor_config_invisibles_label: "Show Invisibles"
# editor_config_invisibles_description: "Displays invisibles such as spaces or tabs."
# editor_config_indentguides_label: "Show Indent Guides"
# editor_config_indentguides_description: "Displays vertical lines to see indentation better."
# editor_config_behaviors_label: "Smart Behaviors"
# editor_config_behaviors_description: "Autocompletes brackets, braces, and quotes."
# admin:
# av_title: "Admin Views"

View file

@ -207,6 +207,17 @@ module.exports = nativeDescription: "čeština", englishDescription: "Czech", tr
hud_continue: "Pokračovat (stiskněte shift-mezera)"
spell_saved: "Kouzlo uloženo"
# skip_tutorial: "Skip (esc)"
# editor_config: "Editor Config"
# editor_config_title: "Editor Configuration"
# editor_config_keybindings_label: "Key Bindings"
# editor_config_keybindings_default: "Default (Ace)"
# editor_config_keybindings_description: "Adds additional shortcuts known from the common editors."
# editor_config_invisibles_label: "Show Invisibles"
# editor_config_invisibles_description: "Displays invisibles such as spaces or tabs."
# editor_config_indentguides_label: "Show Indent Guides"
# editor_config_indentguides_description: "Displays vertical lines to see indentation better."
# editor_config_behaviors_label: "Smart Behaviors"
# editor_config_behaviors_description: "Autocompletes brackets, braces, and quotes."
admin:
av_title: "Administrátorský pohled"

View file

@ -207,6 +207,17 @@ module.exports = nativeDescription: "dansk", englishDescription: "Danish", trans
hud_continue: "Fortsæt (tryk skift-mellemrum)"
spell_saved: "Trylleformularen er gemt"
# skip_tutorial: "Skip (esc)"
# editor_config: "Editor Config"
# editor_config_title: "Editor Configuration"
# editor_config_keybindings_label: "Key Bindings"
# editor_config_keybindings_default: "Default (Ace)"
# editor_config_keybindings_description: "Adds additional shortcuts known from the common editors."
# editor_config_invisibles_label: "Show Invisibles"
# editor_config_invisibles_description: "Displays invisibles such as spaces or tabs."
# editor_config_indentguides_label: "Show Indent Guides"
# editor_config_indentguides_description: "Displays vertical lines to see indentation better."
# editor_config_behaviors_label: "Smart Behaviors"
# editor_config_behaviors_description: "Autocompletes brackets, braces, and quotes."
admin:
# av_title: "Admin Views"

View file

@ -206,7 +206,18 @@ module.exports = nativeDescription: "Deutsch", englishDescription: "German", tra
tome_available_spells: "Verfügbare Zauber"
hud_continue: "Weiter (drücke Shift + Leertaste)"
spell_saved: "Zauber gespeichert"
# skip_tutorial: "Skip (esc)"
skip_tutorial: "Überspringen (Esc)"
editor_config: "Editor Einstellungen"
editor_config_title: "Editor Einstellungen"
editor_config_keybindings_label: "Tastenbelegung"
editor_config_keybindings_default: "Standard (Ace)"
editor_config_keybindings_description: "Fügt zusätzliche Tastenkombinationen, bekannt aus anderen Editoren, hinzu"
editor_config_invisibles_label: "Zeige unsichtbare Zeichen"
editor_config_invisibles_description: "Zeigt unsichtbare Zeichen wie Leertasten an."
editor_config_indentguides_label: "Zeige Einrückungshilfe"
editor_config_indentguides_description: "Zeigt vertikale Linien an um Einrückungen besser zu sehen."
# editor_config_behaviors_label: "Smart Behaviors"
# editor_config_behaviors_description: "Autocompletes brackets, braces, and quotes."
admin:
av_title: "Administrator Übersicht"

View file

@ -207,6 +207,17 @@ module.exports = nativeDescription: "ελληνικά", englishDescription: "Gre
# hud_continue: "Continue (shift+space)"
# spell_saved: "Spell Saved"
# skip_tutorial: "Skip (esc)"
# editor_config: "Editor Config"
# editor_config_title: "Editor Configuration"
# editor_config_keybindings_label: "Key Bindings"
# editor_config_keybindings_default: "Default (Ace)"
# editor_config_keybindings_description: "Adds additional shortcuts known from the common editors."
# editor_config_invisibles_label: "Show Invisibles"
# editor_config_invisibles_description: "Displays invisibles such as spaces or tabs."
# editor_config_indentguides_label: "Show Indent Guides"
# editor_config_indentguides_description: "Displays vertical lines to see indentation better."
# editor_config_behaviors_label: "Smart Behaviors"
# editor_config_behaviors_description: "Autocompletes brackets, braces, and quotes."
# admin:
# av_title: "Admin Views"

View file

@ -207,6 +207,17 @@ module.exports = nativeDescription: "English (AU)", englishDescription: "English
# hud_continue: "Continue (shift+space)"
# spell_saved: "Spell Saved"
# skip_tutorial: "Skip (esc)"
# editor_config: "Editor Config"
# editor_config_title: "Editor Configuration"
# editor_config_keybindings_label: "Key Bindings"
# editor_config_keybindings_default: "Default (Ace)"
# editor_config_keybindings_description: "Adds additional shortcuts known from the common editors."
# editor_config_invisibles_label: "Show Invisibles"
# editor_config_invisibles_description: "Displays invisibles such as spaces or tabs."
# editor_config_indentguides_label: "Show Indent Guides"
# editor_config_indentguides_description: "Displays vertical lines to see indentation better."
# editor_config_behaviors_label: "Smart Behaviors"
# editor_config_behaviors_description: "Autocompletes brackets, braces, and quotes."
# admin:
# av_title: "Admin Views"

View file

@ -207,6 +207,17 @@ module.exports = nativeDescription: "English (UK)", englishDescription: "English
# hud_continue: "Continue (shift+space)"
# spell_saved: "Spell Saved"
# skip_tutorial: "Skip (esc)"
# editor_config: "Editor Config"
# editor_config_title: "Editor Configuration"
# editor_config_keybindings_label: "Key Bindings"
# editor_config_keybindings_default: "Default (Ace)"
# editor_config_keybindings_description: "Adds additional shortcuts known from the common editors."
# editor_config_invisibles_label: "Show Invisibles"
# editor_config_invisibles_description: "Displays invisibles such as spaces or tabs."
# editor_config_indentguides_label: "Show Indent Guides"
# editor_config_indentguides_description: "Displays vertical lines to see indentation better."
# editor_config_behaviors_label: "Smart Behaviors"
# editor_config_behaviors_description: "Autocompletes brackets, braces, and quotes."
# admin:
# av_title: "Admin Views"

View file

@ -207,6 +207,17 @@ module.exports = nativeDescription: "English (US)", englishDescription: "English
# hud_continue: "Continue (shift+space)"
# spell_saved: "Spell Saved"
# skip_tutorial: "Skip (esc)"
# editor_config: "Editor Config"
# editor_config_title: "Editor Configuration"
# editor_config_keybindings_label: "Key Bindings"
# editor_config_keybindings_default: "Default (Ace)"
# editor_config_keybindings_description: "Adds additional shortcuts known from the common editors."
# editor_config_invisibles_label: "Show Invisibles"
# editor_config_invisibles_description: "Displays invisibles such as spaces or tabs."
# editor_config_indentguides_label: "Show Indent Guides"
# editor_config_indentguides_description: "Displays vertical lines to see indentation better."
# editor_config_behaviors_label: "Smart Behaviors"
# editor_config_behaviors_description: "Autocompletes brackets, braces, and quotes."
# admin:
# av_title: "Admin Views"

View file

@ -207,6 +207,17 @@ module.exports = nativeDescription: "English", englishDescription: "English", tr
hud_continue: "Continue (shift+space)"
spell_saved: "Spell Saved"
skip_tutorial: "Skip (esc)"
editor_config: "Editor Config"
editor_config_title: "Editor Configuration"
editor_config_keybindings_label: "Key Bindings"
editor_config_keybindings_default: "Default (Ace)"
editor_config_keybindings_description: "Adds additional shortcuts known from the common editors."
editor_config_invisibles_label: "Show Invisibles"
editor_config_invisibles_description: "Displays invisibles such as spaces or tabs."
editor_config_indentguides_label: "Show Indent Guides"
editor_config_indentguides_description: "Displays vertical lines to see indentation better."
editor_config_behaviors_label: "Smart Behaviors"
editor_config_behaviors_description: "Autocompletes brackets, braces, and quotes."
admin:
av_title: "Admin Views"
@ -318,6 +329,7 @@ module.exports = nativeDescription: "English", englishDescription: "English", tr
nick_description: "Programming wizard, eccentric motivation mage, and upside-down experimenter. Nick can do anything and chooses to build CodeCombat."
jeremy_description: "Customer support mage, usability tester, and community organizer; you've probably already spoken with Jeremy."
michael_description: "Programmer, sys-admin, and undergrad technical wunderkind, Michael is the person keeping our servers online."
glen_description: "Glen, describe thyself!"
legal:
page_title: "Legal"

View file

@ -207,6 +207,17 @@ module.exports = nativeDescription: "español (América Latina)", englishDescrip
hud_continue: "Continuar (presionar shift+space)"
# spell_saved: "Spell Saved"
# skip_tutorial: "Skip (esc)"
# editor_config: "Editor Config"
# editor_config_title: "Editor Configuration"
# editor_config_keybindings_label: "Key Bindings"
# editor_config_keybindings_default: "Default (Ace)"
# editor_config_keybindings_description: "Adds additional shortcuts known from the common editors."
# editor_config_invisibles_label: "Show Invisibles"
# editor_config_invisibles_description: "Displays invisibles such as spaces or tabs."
# editor_config_indentguides_label: "Show Indent Guides"
# editor_config_indentguides_description: "Displays vertical lines to see indentation better."
# editor_config_behaviors_label: "Smart Behaviors"
# editor_config_behaviors_description: "Autocompletes brackets, braces, and quotes."
# admin:
# av_title: "Admin Views"

View file

@ -207,6 +207,17 @@ module.exports = nativeDescription: "español (ES)", englishDescription: "Spanis
hud_continue: "Continuar (pulsa Shift+Space)"
spell_saved: "Hechizo guardado"
# skip_tutorial: "Skip (esc)"
# editor_config: "Editor Config"
# editor_config_title: "Editor Configuration"
# editor_config_keybindings_label: "Key Bindings"
# editor_config_keybindings_default: "Default (Ace)"
# editor_config_keybindings_description: "Adds additional shortcuts known from the common editors."
# editor_config_invisibles_label: "Show Invisibles"
# editor_config_invisibles_description: "Displays invisibles such as spaces or tabs."
# editor_config_indentguides_label: "Show Indent Guides"
# editor_config_indentguides_description: "Displays vertical lines to see indentation better."
# editor_config_behaviors_label: "Smart Behaviors"
# editor_config_behaviors_description: "Autocompletes brackets, braces, and quotes."
admin:
# av_title: "Admin Views"

View file

@ -207,6 +207,17 @@ module.exports = nativeDescription: "español", englishDescription: "Spanish", t
hud_continue: "Continuar (presionar shift+space)"
# spell_saved: "Spell Saved"
# skip_tutorial: "Skip (esc)"
# editor_config: "Editor Config"
# editor_config_title: "Editor Configuration"
# editor_config_keybindings_label: "Key Bindings"
# editor_config_keybindings_default: "Default (Ace)"
# editor_config_keybindings_description: "Adds additional shortcuts known from the common editors."
# editor_config_invisibles_label: "Show Invisibles"
# editor_config_invisibles_description: "Displays invisibles such as spaces or tabs."
# editor_config_indentguides_label: "Show Indent Guides"
# editor_config_indentguides_description: "Displays vertical lines to see indentation better."
# editor_config_behaviors_label: "Smart Behaviors"
# editor_config_behaviors_description: "Autocompletes brackets, braces, and quotes."
# admin:
# av_title: "Admin Views"

View file

@ -207,6 +207,17 @@ module.exports = nativeDescription: "فارسی", englishDescription: "Persian",
# hud_continue: "Continue (shift+space)"
# spell_saved: "Spell Saved"
# skip_tutorial: "Skip (esc)"
# editor_config: "Editor Config"
# editor_config_title: "Editor Configuration"
# editor_config_keybindings_label: "Key Bindings"
# editor_config_keybindings_default: "Default (Ace)"
# editor_config_keybindings_description: "Adds additional shortcuts known from the common editors."
# editor_config_invisibles_label: "Show Invisibles"
# editor_config_invisibles_description: "Displays invisibles such as spaces or tabs."
# editor_config_indentguides_label: "Show Indent Guides"
# editor_config_indentguides_description: "Displays vertical lines to see indentation better."
# editor_config_behaviors_label: "Smart Behaviors"
# editor_config_behaviors_description: "Autocompletes brackets, braces, and quotes."
# admin:
# av_title: "Admin Views"

View file

@ -207,6 +207,17 @@ module.exports = nativeDescription: "suomi", englishDescription: "Finnish", tran
# hud_continue: "Continue (shift+space)"
# spell_saved: "Spell Saved"
# skip_tutorial: "Skip (esc)"
# editor_config: "Editor Config"
# editor_config_title: "Editor Configuration"
# editor_config_keybindings_label: "Key Bindings"
# editor_config_keybindings_default: "Default (Ace)"
# editor_config_keybindings_description: "Adds additional shortcuts known from the common editors."
# editor_config_invisibles_label: "Show Invisibles"
# editor_config_invisibles_description: "Displays invisibles such as spaces or tabs."
# editor_config_indentguides_label: "Show Indent Guides"
# editor_config_indentguides_description: "Displays vertical lines to see indentation better."
# editor_config_behaviors_label: "Smart Behaviors"
# editor_config_behaviors_description: "Autocompletes brackets, braces, and quotes."
# admin:
# av_title: "Admin Views"

View file

@ -207,6 +207,17 @@ module.exports = nativeDescription: "français", englishDescription: "French", t
hud_continue: "Continuer (appuie sur shift ou espace)"
# spell_saved: "Spell Saved"
# skip_tutorial: "Skip (esc)"
# editor_config: "Editor Config"
# editor_config_title: "Editor Configuration"
# editor_config_keybindings_label: "Key Bindings"
# editor_config_keybindings_default: "Default (Ace)"
# editor_config_keybindings_description: "Adds additional shortcuts known from the common editors."
# editor_config_invisibles_label: "Show Invisibles"
# editor_config_invisibles_description: "Displays invisibles such as spaces or tabs."
# editor_config_indentguides_label: "Show Indent Guides"
# editor_config_indentguides_description: "Displays vertical lines to see indentation better."
# editor_config_behaviors_label: "Smart Behaviors"
# editor_config_behaviors_description: "Autocompletes brackets, braces, and quotes."
admin:
av_title: "Vues d'administrateurs"

View file

@ -207,6 +207,17 @@ module.exports = nativeDescription: "עברית", englishDescription: "Hebrew",
# hud_continue: "Continue (shift+space)"
# spell_saved: "Spell Saved"
# skip_tutorial: "Skip (esc)"
# editor_config: "Editor Config"
# editor_config_title: "Editor Configuration"
# editor_config_keybindings_label: "Key Bindings"
# editor_config_keybindings_default: "Default (Ace)"
# editor_config_keybindings_description: "Adds additional shortcuts known from the common editors."
# editor_config_invisibles_label: "Show Invisibles"
# editor_config_invisibles_description: "Displays invisibles such as spaces or tabs."
# editor_config_indentguides_label: "Show Indent Guides"
# editor_config_indentguides_description: "Displays vertical lines to see indentation better."
# editor_config_behaviors_label: "Smart Behaviors"
# editor_config_behaviors_description: "Autocompletes brackets, braces, and quotes."
# admin:
# av_title: "Admin Views"

View file

@ -207,6 +207,17 @@ module.exports = nativeDescription: "मानक हिन्दी", englishDe
# hud_continue: "Continue (shift+space)"
# spell_saved: "Spell Saved"
# skip_tutorial: "Skip (esc)"
# editor_config: "Editor Config"
# editor_config_title: "Editor Configuration"
# editor_config_keybindings_label: "Key Bindings"
# editor_config_keybindings_default: "Default (Ace)"
# editor_config_keybindings_description: "Adds additional shortcuts known from the common editors."
# editor_config_invisibles_label: "Show Invisibles"
# editor_config_invisibles_description: "Displays invisibles such as spaces or tabs."
# editor_config_indentguides_label: "Show Indent Guides"
# editor_config_indentguides_description: "Displays vertical lines to see indentation better."
# editor_config_behaviors_label: "Smart Behaviors"
# editor_config_behaviors_description: "Autocompletes brackets, braces, and quotes."
# admin:
# av_title: "Admin Views"

View file

@ -207,6 +207,17 @@ module.exports = nativeDescription: "magyar", englishDescription: "Hungarian", t
hud_continue: "Folytatás (shift+space)"
# spell_saved: "Spell Saved"
# skip_tutorial: "Skip (esc)"
# editor_config: "Editor Config"
# editor_config_title: "Editor Configuration"
# editor_config_keybindings_label: "Key Bindings"
# editor_config_keybindings_default: "Default (Ace)"
# editor_config_keybindings_description: "Adds additional shortcuts known from the common editors."
# editor_config_invisibles_label: "Show Invisibles"
# editor_config_invisibles_description: "Displays invisibles such as spaces or tabs."
# editor_config_indentguides_label: "Show Indent Guides"
# editor_config_indentguides_description: "Displays vertical lines to see indentation better."
# editor_config_behaviors_label: "Smart Behaviors"
# editor_config_behaviors_description: "Autocompletes brackets, braces, and quotes."
# admin:
# av_title: "Admin Views"

View file

@ -207,6 +207,17 @@ module.exports = nativeDescription: "Bahasa Indonesia", englishDescription: "Ind
# hud_continue: "Continue (shift+space)"
# spell_saved: "Spell Saved"
# skip_tutorial: "Skip (esc)"
# editor_config: "Editor Config"
# editor_config_title: "Editor Configuration"
# editor_config_keybindings_label: "Key Bindings"
# editor_config_keybindings_default: "Default (Ace)"
# editor_config_keybindings_description: "Adds additional shortcuts known from the common editors."
# editor_config_invisibles_label: "Show Invisibles"
# editor_config_invisibles_description: "Displays invisibles such as spaces or tabs."
# editor_config_indentguides_label: "Show Indent Guides"
# editor_config_indentguides_description: "Displays vertical lines to see indentation better."
# editor_config_behaviors_label: "Smart Behaviors"
# editor_config_behaviors_description: "Autocompletes brackets, braces, and quotes."
# admin:
# av_title: "Admin Views"

View file

@ -207,6 +207,17 @@ module.exports = nativeDescription: "italiano", englishDescription: "Italian", t
hud_continue: "Continua (premi Maiusc-Spazio)"
# spell_saved: "Spell Saved"
# skip_tutorial: "Skip (esc)"
# editor_config: "Editor Config"
# editor_config_title: "Editor Configuration"
# editor_config_keybindings_label: "Key Bindings"
# editor_config_keybindings_default: "Default (Ace)"
# editor_config_keybindings_description: "Adds additional shortcuts known from the common editors."
# editor_config_invisibles_label: "Show Invisibles"
# editor_config_invisibles_description: "Displays invisibles such as spaces or tabs."
# editor_config_indentguides_label: "Show Indent Guides"
# editor_config_indentguides_description: "Displays vertical lines to see indentation better."
# editor_config_behaviors_label: "Smart Behaviors"
# editor_config_behaviors_description: "Autocompletes brackets, braces, and quotes."
admin:
av_title: "Vista amministratore"

View file

@ -207,6 +207,17 @@ module.exports = nativeDescription: "日本語", englishDescription: "Japanese",
hud_continue: "続く Shift+Spaceキー"
# spell_saved: "Spell Saved"
# skip_tutorial: "Skip (esc)"
# editor_config: "Editor Config"
# editor_config_title: "Editor Configuration"
# editor_config_keybindings_label: "Key Bindings"
# editor_config_keybindings_default: "Default (Ace)"
# editor_config_keybindings_description: "Adds additional shortcuts known from the common editors."
# editor_config_invisibles_label: "Show Invisibles"
# editor_config_invisibles_description: "Displays invisibles such as spaces or tabs."
# editor_config_indentguides_label: "Show Indent Guides"
# editor_config_indentguides_description: "Displays vertical lines to see indentation better."
# editor_config_behaviors_label: "Smart Behaviors"
# editor_config_behaviors_description: "Autocompletes brackets, braces, and quotes."
admin:
av_title: "管理画面"

View file

@ -207,6 +207,17 @@ module.exports = nativeDescription: "한국어", englishDescription: "Korean", t
# hud_continue: "Continue (shift+space)"
# spell_saved: "Spell Saved"
# skip_tutorial: "Skip (esc)"
# editor_config: "Editor Config"
# editor_config_title: "Editor Configuration"
# editor_config_keybindings_label: "Key Bindings"
# editor_config_keybindings_default: "Default (Ace)"
# editor_config_keybindings_description: "Adds additional shortcuts known from the common editors."
# editor_config_invisibles_label: "Show Invisibles"
# editor_config_invisibles_description: "Displays invisibles such as spaces or tabs."
# editor_config_indentguides_label: "Show Indent Guides"
# editor_config_indentguides_description: "Displays vertical lines to see indentation better."
# editor_config_behaviors_label: "Smart Behaviors"
# editor_config_behaviors_description: "Autocompletes brackets, braces, and quotes."
# admin:
# av_title: "Admin Views"

View file

@ -207,6 +207,17 @@ module.exports = nativeDescription: "lietuvių kalba", englishDescription: "Lith
# hud_continue: "Continue (shift+space)"
# spell_saved: "Spell Saved"
# skip_tutorial: "Skip (esc)"
# editor_config: "Editor Config"
# editor_config_title: "Editor Configuration"
# editor_config_keybindings_label: "Key Bindings"
# editor_config_keybindings_default: "Default (Ace)"
# editor_config_keybindings_description: "Adds additional shortcuts known from the common editors."
# editor_config_invisibles_label: "Show Invisibles"
# editor_config_invisibles_description: "Displays invisibles such as spaces or tabs."
# editor_config_indentguides_label: "Show Indent Guides"
# editor_config_indentguides_description: "Displays vertical lines to see indentation better."
# editor_config_behaviors_label: "Smart Behaviors"
# editor_config_behaviors_description: "Autocompletes brackets, braces, and quotes."
# admin:
# av_title: "Admin Views"

View file

@ -207,6 +207,17 @@ module.exports = nativeDescription: "Bahasa Melayu", englishDescription: "Bahasa
# hud_continue: "Continue (shift+space)"
# spell_saved: "Spell Saved"
# skip_tutorial: "Skip (esc)"
# editor_config: "Editor Config"
# editor_config_title: "Editor Configuration"
# editor_config_keybindings_label: "Key Bindings"
# editor_config_keybindings_default: "Default (Ace)"
# editor_config_keybindings_description: "Adds additional shortcuts known from the common editors."
# editor_config_invisibles_label: "Show Invisibles"
# editor_config_invisibles_description: "Displays invisibles such as spaces or tabs."
# editor_config_indentguides_label: "Show Indent Guides"
# editor_config_indentguides_description: "Displays vertical lines to see indentation better."
# editor_config_behaviors_label: "Smart Behaviors"
# editor_config_behaviors_description: "Autocompletes brackets, braces, and quotes."
# admin:
# av_title: "Admin Views"

View file

@ -207,6 +207,17 @@ module.exports = nativeDescription: "Norsk Bokmål", englishDescription: "Norweg
hud_continue: "Fortsett (trykk shift-mellomrom)"
# spell_saved: "Spell Saved"
# skip_tutorial: "Skip (esc)"
# editor_config: "Editor Config"
# editor_config_title: "Editor Configuration"
# editor_config_keybindings_label: "Key Bindings"
# editor_config_keybindings_default: "Default (Ace)"
# editor_config_keybindings_description: "Adds additional shortcuts known from the common editors."
# editor_config_invisibles_label: "Show Invisibles"
# editor_config_invisibles_description: "Displays invisibles such as spaces or tabs."
# editor_config_indentguides_label: "Show Indent Guides"
# editor_config_indentguides_description: "Displays vertical lines to see indentation better."
# editor_config_behaviors_label: "Smart Behaviors"
# editor_config_behaviors_description: "Autocompletes brackets, braces, and quotes."
# admin:
# av_title: "Admin Views"

View file

@ -207,6 +207,17 @@ module.exports = nativeDescription: "Nederlands", englishDescription: "Dutch", t
hud_continue: "Ga verder (druk shift-space)"
spell_saved: "Spreuk Opgeslagen"
# skip_tutorial: "Skip (esc)"
# editor_config: "Editor Config"
# editor_config_title: "Editor Configuration"
# editor_config_keybindings_label: "Key Bindings"
# editor_config_keybindings_default: "Default (Ace)"
# editor_config_keybindings_description: "Adds additional shortcuts known from the common editors."
# editor_config_invisibles_label: "Show Invisibles"
# editor_config_invisibles_description: "Displays invisibles such as spaces or tabs."
# editor_config_indentguides_label: "Show Indent Guides"
# editor_config_indentguides_description: "Displays vertical lines to see indentation better."
# editor_config_behaviors_label: "Smart Behaviors"
# editor_config_behaviors_description: "Autocompletes brackets, braces, and quotes."
admin:
av_title: "Administrator panels"

View file

@ -207,6 +207,17 @@ module.exports = nativeDescription: "Norwegian Nynorsk", englishDescription: "No
# hud_continue: "Continue (shift+space)"
# spell_saved: "Spell Saved"
# skip_tutorial: "Skip (esc)"
# editor_config: "Editor Config"
# editor_config_title: "Editor Configuration"
# editor_config_keybindings_label: "Key Bindings"
# editor_config_keybindings_default: "Default (Ace)"
# editor_config_keybindings_description: "Adds additional shortcuts known from the common editors."
# editor_config_invisibles_label: "Show Invisibles"
# editor_config_invisibles_description: "Displays invisibles such as spaces or tabs."
# editor_config_indentguides_label: "Show Indent Guides"
# editor_config_indentguides_description: "Displays vertical lines to see indentation better."
# editor_config_behaviors_label: "Smart Behaviors"
# editor_config_behaviors_description: "Autocompletes brackets, braces, and quotes."
# admin:
# av_title: "Admin Views"

View file

@ -207,6 +207,17 @@ module.exports = nativeDescription: "Norsk", englishDescription: "Norwegian", tr
hud_continue: "Fortsett (trykk shift-mellomrom)"
# spell_saved: "Spell Saved"
# skip_tutorial: "Skip (esc)"
# editor_config: "Editor Config"
# editor_config_title: "Editor Configuration"
# editor_config_keybindings_label: "Key Bindings"
# editor_config_keybindings_default: "Default (Ace)"
# editor_config_keybindings_description: "Adds additional shortcuts known from the common editors."
# editor_config_invisibles_label: "Show Invisibles"
# editor_config_invisibles_description: "Displays invisibles such as spaces or tabs."
# editor_config_indentguides_label: "Show Indent Guides"
# editor_config_indentguides_description: "Displays vertical lines to see indentation better."
# editor_config_behaviors_label: "Smart Behaviors"
# editor_config_behaviors_description: "Autocompletes brackets, braces, and quotes."
# admin:
# av_title: "Admin Views"

View file

@ -207,6 +207,17 @@ module.exports = nativeDescription: "język polski", englishDescription: "Polish
hud_continue: "Kontynuuj (Shift + spacja)"
spell_saved: "Czar zapisany"
skip_tutorial: "Pomiń (esc)"
# editor_config: "Editor Config"
# editor_config_title: "Editor Configuration"
# editor_config_keybindings_label: "Key Bindings"
# editor_config_keybindings_default: "Default (Ace)"
# editor_config_keybindings_description: "Adds additional shortcuts known from the common editors."
# editor_config_invisibles_label: "Show Invisibles"
# editor_config_invisibles_description: "Displays invisibles such as spaces or tabs."
# editor_config_indentguides_label: "Show Indent Guides"
# editor_config_indentguides_description: "Displays vertical lines to see indentation better."
# editor_config_behaviors_label: "Smart Behaviors"
# editor_config_behaviors_description: "Autocompletes brackets, braces, and quotes."
admin:
av_title: "Panel administracyjny"

View file

@ -207,6 +207,17 @@ module.exports = nativeDescription: "português do Brasil", englishDescription:
hud_continue: "Continue (tecle Shift+Space)"
spell_saved: "Feitiço Salvo"
# skip_tutorial: "Skip (esc)"
# editor_config: "Editor Config"
# editor_config_title: "Editor Configuration"
# editor_config_keybindings_label: "Key Bindings"
# editor_config_keybindings_default: "Default (Ace)"
# editor_config_keybindings_description: "Adds additional shortcuts known from the common editors."
# editor_config_invisibles_label: "Show Invisibles"
# editor_config_invisibles_description: "Displays invisibles such as spaces or tabs."
# editor_config_indentguides_label: "Show Indent Guides"
# editor_config_indentguides_description: "Displays vertical lines to see indentation better."
# editor_config_behaviors_label: "Smart Behaviors"
# editor_config_behaviors_description: "Autocompletes brackets, braces, and quotes."
admin:
av_title: "Visualização de Administrador"

View file

@ -207,6 +207,17 @@ module.exports = nativeDescription: "Português europeu", englishDescription: "P
hud_continue: "Continuar (pressiona shift-space)"
spell_saved: "Feitiço Guardado"
# skip_tutorial: "Skip (esc)"
# editor_config: "Editor Config"
# editor_config_title: "Editor Configuration"
# editor_config_keybindings_label: "Key Bindings"
# editor_config_keybindings_default: "Default (Ace)"
# editor_config_keybindings_description: "Adds additional shortcuts known from the common editors."
# editor_config_invisibles_label: "Show Invisibles"
# editor_config_invisibles_description: "Displays invisibles such as spaces or tabs."
# editor_config_indentguides_label: "Show Indent Guides"
# editor_config_indentguides_description: "Displays vertical lines to see indentation better."
# editor_config_behaviors_label: "Smart Behaviors"
# editor_config_behaviors_description: "Autocompletes brackets, braces, and quotes."
admin:
av_title: "Visualizações de Admin"

View file

@ -207,6 +207,17 @@ module.exports = nativeDescription: "português", englishDescription: "Portugues
hud_continue: "Continue (tecle Shift+Space)"
# spell_saved: "Spell Saved"
# skip_tutorial: "Skip (esc)"
# editor_config: "Editor Config"
# editor_config_title: "Editor Configuration"
# editor_config_keybindings_label: "Key Bindings"
# editor_config_keybindings_default: "Default (Ace)"
# editor_config_keybindings_description: "Adds additional shortcuts known from the common editors."
# editor_config_invisibles_label: "Show Invisibles"
# editor_config_invisibles_description: "Displays invisibles such as spaces or tabs."
# editor_config_indentguides_label: "Show Indent Guides"
# editor_config_indentguides_description: "Displays vertical lines to see indentation better."
# editor_config_behaviors_label: "Smart Behaviors"
# editor_config_behaviors_description: "Autocompletes brackets, braces, and quotes."
# admin:
# av_title: "Admin Views"

View file

@ -207,6 +207,17 @@ module.exports = nativeDescription: "limba română", englishDescription: "Roman
hud_continue: "Continuă (apasă shift-space)"
spell_saved: "Vrajă salvată"
# skip_tutorial: "Skip (esc)"
# editor_config: "Editor Config"
# editor_config_title: "Editor Configuration"
# editor_config_keybindings_label: "Key Bindings"
# editor_config_keybindings_default: "Default (Ace)"
# editor_config_keybindings_description: "Adds additional shortcuts known from the common editors."
# editor_config_invisibles_label: "Show Invisibles"
# editor_config_invisibles_description: "Displays invisibles such as spaces or tabs."
# editor_config_indentguides_label: "Show Indent Guides"
# editor_config_indentguides_description: "Displays vertical lines to see indentation better."
# editor_config_behaviors_label: "Smart Behaviors"
# editor_config_behaviors_description: "Autocompletes brackets, braces, and quotes."
admin:
av_title: "Admin vede"

View file

@ -207,6 +207,17 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi
hud_continue: "Продолжить (Shift+Пробел)"
spell_saved: "Заклинание сохранено"
skip_tutorial: "Пропуск (Esc)"
# editor_config: "Editor Config"
# editor_config_title: "Editor Configuration"
# editor_config_keybindings_label: "Key Bindings"
# editor_config_keybindings_default: "Default (Ace)"
# editor_config_keybindings_description: "Adds additional shortcuts known from the common editors."
# editor_config_invisibles_label: "Show Invisibles"
# editor_config_invisibles_description: "Displays invisibles such as spaces or tabs."
# editor_config_indentguides_label: "Show Indent Guides"
# editor_config_indentguides_description: "Displays vertical lines to see indentation better."
# editor_config_behaviors_label: "Smart Behaviors"
# editor_config_behaviors_description: "Autocompletes brackets, braces, and quotes."
admin:
av_title: "Админ панель"

View file

@ -207,6 +207,17 @@ module.exports = nativeDescription: "slovenčina", englishDescription: "Slovak",
# hud_continue: "Continue (shift+space)"
# spell_saved: "Spell Saved"
# skip_tutorial: "Skip (esc)"
# editor_config: "Editor Config"
# editor_config_title: "Editor Configuration"
# editor_config_keybindings_label: "Key Bindings"
# editor_config_keybindings_default: "Default (Ace)"
# editor_config_keybindings_description: "Adds additional shortcuts known from the common editors."
# editor_config_invisibles_label: "Show Invisibles"
# editor_config_invisibles_description: "Displays invisibles such as spaces or tabs."
# editor_config_indentguides_label: "Show Indent Guides"
# editor_config_indentguides_description: "Displays vertical lines to see indentation better."
# editor_config_behaviors_label: "Smart Behaviors"
# editor_config_behaviors_description: "Autocompletes brackets, braces, and quotes."
# admin:
# av_title: "Admin Views"

View file

@ -207,6 +207,17 @@ module.exports = nativeDescription: "slovenščina", englishDescription: "Sloven
# hud_continue: "Continue (shift+space)"
# spell_saved: "Spell Saved"
# skip_tutorial: "Skip (esc)"
# editor_config: "Editor Config"
# editor_config_title: "Editor Configuration"
# editor_config_keybindings_label: "Key Bindings"
# editor_config_keybindings_default: "Default (Ace)"
# editor_config_keybindings_description: "Adds additional shortcuts known from the common editors."
# editor_config_invisibles_label: "Show Invisibles"
# editor_config_invisibles_description: "Displays invisibles such as spaces or tabs."
# editor_config_indentguides_label: "Show Indent Guides"
# editor_config_indentguides_description: "Displays vertical lines to see indentation better."
# editor_config_behaviors_label: "Smart Behaviors"
# editor_config_behaviors_description: "Autocompletes brackets, braces, and quotes."
# admin:
# av_title: "Admin Views"

View file

@ -207,6 +207,17 @@ module.exports = nativeDescription: "српски", englishDescription: "Serbian
hud_continue: "Настави (притисни ентер)"
# spell_saved: "Spell Saved"
# skip_tutorial: "Skip (esc)"
# editor_config: "Editor Config"
# editor_config_title: "Editor Configuration"
# editor_config_keybindings_label: "Key Bindings"
# editor_config_keybindings_default: "Default (Ace)"
# editor_config_keybindings_description: "Adds additional shortcuts known from the common editors."
# editor_config_invisibles_label: "Show Invisibles"
# editor_config_invisibles_description: "Displays invisibles such as spaces or tabs."
# editor_config_indentguides_label: "Show Indent Guides"
# editor_config_indentguides_description: "Displays vertical lines to see indentation better."
# editor_config_behaviors_label: "Smart Behaviors"
# editor_config_behaviors_description: "Autocompletes brackets, braces, and quotes."
# admin:
# av_title: "Admin Views"

View file

@ -207,6 +207,17 @@ module.exports = nativeDescription: "Svenska", englishDescription: "Swedish", tr
# hud_continue: "Continue (shift+space)"
# spell_saved: "Spell Saved"
# skip_tutorial: "Skip (esc)"
# editor_config: "Editor Config"
# editor_config_title: "Editor Configuration"
# editor_config_keybindings_label: "Key Bindings"
# editor_config_keybindings_default: "Default (Ace)"
# editor_config_keybindings_description: "Adds additional shortcuts known from the common editors."
# editor_config_invisibles_label: "Show Invisibles"
# editor_config_invisibles_description: "Displays invisibles such as spaces or tabs."
# editor_config_indentguides_label: "Show Indent Guides"
# editor_config_indentguides_description: "Displays vertical lines to see indentation better."
# editor_config_behaviors_label: "Smart Behaviors"
# editor_config_behaviors_description: "Autocompletes brackets, braces, and quotes."
# admin:
# av_title: "Admin Views"

View file

@ -207,6 +207,17 @@ module.exports = nativeDescription: "ไทย", englishDescription: "Thai", tra
# hud_continue: "Continue (shift+space)"
# spell_saved: "Spell Saved"
# skip_tutorial: "Skip (esc)"
# editor_config: "Editor Config"
# editor_config_title: "Editor Configuration"
# editor_config_keybindings_label: "Key Bindings"
# editor_config_keybindings_default: "Default (Ace)"
# editor_config_keybindings_description: "Adds additional shortcuts known from the common editors."
# editor_config_invisibles_label: "Show Invisibles"
# editor_config_invisibles_description: "Displays invisibles such as spaces or tabs."
# editor_config_indentguides_label: "Show Indent Guides"
# editor_config_indentguides_description: "Displays vertical lines to see indentation better."
# editor_config_behaviors_label: "Smart Behaviors"
# editor_config_behaviors_description: "Autocompletes brackets, braces, and quotes."
# admin:
# av_title: "Admin Views"

View file

@ -207,6 +207,17 @@ module.exports = nativeDescription: "Türkçe", englishDescription: "Turkish", t
hud_continue: "Devam (ÜstKarakter+Boşluk)"
spell_saved: "Büyü Kaydedildi"
# skip_tutorial: "Skip (esc)"
# editor_config: "Editor Config"
# editor_config_title: "Editor Configuration"
# editor_config_keybindings_label: "Key Bindings"
# editor_config_keybindings_default: "Default (Ace)"
# editor_config_keybindings_description: "Adds additional shortcuts known from the common editors."
# editor_config_invisibles_label: "Show Invisibles"
# editor_config_invisibles_description: "Displays invisibles such as spaces or tabs."
# editor_config_indentguides_label: "Show Indent Guides"
# editor_config_indentguides_description: "Displays vertical lines to see indentation better."
# editor_config_behaviors_label: "Smart Behaviors"
# editor_config_behaviors_description: "Autocompletes brackets, braces, and quotes."
admin:
av_title: "Yönetici Görünümleri"

View file

@ -207,6 +207,17 @@ module.exports = nativeDescription: "українська мова", englishDesc
hud_continue: "Продовжити (натисніть shift-space)"
spell_saved: "Заклинання збережено"
skip_tutorial: "Пропустити (esc)"
# editor_config: "Editor Config"
# editor_config_title: "Editor Configuration"
# editor_config_keybindings_label: "Key Bindings"
# editor_config_keybindings_default: "Default (Ace)"
# editor_config_keybindings_description: "Adds additional shortcuts known from the common editors."
# editor_config_invisibles_label: "Show Invisibles"
# editor_config_invisibles_description: "Displays invisibles such as spaces or tabs."
# editor_config_indentguides_label: "Show Indent Guides"
# editor_config_indentguides_description: "Displays vertical lines to see indentation better."
# editor_config_behaviors_label: "Smart Behaviors"
# editor_config_behaviors_description: "Autocompletes brackets, braces, and quotes."
admin:
# av_title: "Admin Views"

View file

@ -207,6 +207,17 @@ module.exports = nativeDescription: "اُردُو", englishDescription: "Urdu",
# hud_continue: "Continue (shift+space)"
# spell_saved: "Spell Saved"
# skip_tutorial: "Skip (esc)"
# editor_config: "Editor Config"
# editor_config_title: "Editor Configuration"
# editor_config_keybindings_label: "Key Bindings"
# editor_config_keybindings_default: "Default (Ace)"
# editor_config_keybindings_description: "Adds additional shortcuts known from the common editors."
# editor_config_invisibles_label: "Show Invisibles"
# editor_config_invisibles_description: "Displays invisibles such as spaces or tabs."
# editor_config_indentguides_label: "Show Indent Guides"
# editor_config_indentguides_description: "Displays vertical lines to see indentation better."
# editor_config_behaviors_label: "Smart Behaviors"
# editor_config_behaviors_description: "Autocompletes brackets, braces, and quotes."
# admin:
# av_title: "Admin Views"

View file

@ -207,6 +207,17 @@ module.exports = nativeDescription: "Tiếng Việt", englishDescription: "Vietn
# hud_continue: "Continue (shift+space)"
# spell_saved: "Spell Saved"
# skip_tutorial: "Skip (esc)"
# editor_config: "Editor Config"
# editor_config_title: "Editor Configuration"
# editor_config_keybindings_label: "Key Bindings"
# editor_config_keybindings_default: "Default (Ace)"
# editor_config_keybindings_description: "Adds additional shortcuts known from the common editors."
# editor_config_invisibles_label: "Show Invisibles"
# editor_config_invisibles_description: "Displays invisibles such as spaces or tabs."
# editor_config_indentguides_label: "Show Indent Guides"
# editor_config_indentguides_description: "Displays vertical lines to see indentation better."
# editor_config_behaviors_label: "Smart Behaviors"
# editor_config_behaviors_description: "Autocompletes brackets, braces, and quotes."
# admin:
# av_title: "Admin Views"

View file

@ -207,6 +207,17 @@ module.exports = nativeDescription: "简体中文", englishDescription: "Chinese
hud_continue: "继续(按 Shift-空格)"
spell_saved: "咒语已保存"
skip_tutorial: "跳过esc"
# editor_config: "Editor Config"
# editor_config_title: "Editor Configuration"
# editor_config_keybindings_label: "Key Bindings"
# editor_config_keybindings_default: "Default (Ace)"
# editor_config_keybindings_description: "Adds additional shortcuts known from the common editors."
# editor_config_invisibles_label: "Show Invisibles"
# editor_config_invisibles_description: "Displays invisibles such as spaces or tabs."
# editor_config_indentguides_label: "Show Indent Guides"
# editor_config_indentguides_description: "Displays vertical lines to see indentation better."
# editor_config_behaviors_label: "Smart Behaviors"
# editor_config_behaviors_description: "Autocompletes brackets, braces, and quotes."
admin:
av_title: "管理员视图"

View file

@ -207,6 +207,17 @@ module.exports = nativeDescription: "繁体中文", englishDescription: "Chinese
hud_continue: "繼續 (按 shift-空格)"
spell_saved: "咒語已儲存"
# skip_tutorial: "Skip (esc)"
# editor_config: "Editor Config"
# editor_config_title: "Editor Configuration"
# editor_config_keybindings_label: "Key Bindings"
# editor_config_keybindings_default: "Default (Ace)"
# editor_config_keybindings_description: "Adds additional shortcuts known from the common editors."
# editor_config_invisibles_label: "Show Invisibles"
# editor_config_invisibles_description: "Displays invisibles such as spaces or tabs."
# editor_config_indentguides_label: "Show Indent Guides"
# editor_config_indentguides_description: "Displays vertical lines to see indentation better."
# editor_config_behaviors_label: "Smart Behaviors"
# editor_config_behaviors_description: "Autocompletes brackets, braces, and quotes."
# admin:
# av_title: "Admin Views"

View file

@ -207,6 +207,17 @@ module.exports = nativeDescription: "中文", englishDescription: "Chinese", tra
# hud_continue: "Continue (shift+space)"
# spell_saved: "Spell Saved"
# skip_tutorial: "Skip (esc)"
# editor_config: "Editor Config"
# editor_config_title: "Editor Configuration"
# editor_config_keybindings_label: "Key Bindings"
# editor_config_keybindings_default: "Default (Ace)"
# editor_config_keybindings_description: "Adds additional shortcuts known from the common editors."
# editor_config_invisibles_label: "Show Invisibles"
# editor_config_invisibles_description: "Displays invisibles such as spaces or tabs."
# editor_config_indentguides_label: "Show Indent Guides"
# editor_config_indentguides_description: "Displays vertical lines to see indentation better."
# editor_config_behaviors_label: "Smart Behaviors"
# editor_config_behaviors_description: "Autocompletes brackets, braces, and quotes."
# admin:
# av_title: "Admin Views"

View file

@ -180,3 +180,6 @@ table.table
border: 1px solid black
.ui-slider-handle
border: 1px solid black !important
.flag-cursor
cursor: crosshair

View file

@ -95,6 +95,9 @@
height: 100px
@include user-select(text)
&.nonexistent
visibility: hidden
.text-prop
width: 50%

View file

@ -0,0 +1,12 @@
#level-editor-config-modal
.select-group
display: block
min-height: 20px
margin-top: 10px
margin-bottom: 10px
padding-left: 20px
vertical-align: middle
label
font-weight: normal
margin-right: 20px

View file

@ -58,7 +58,7 @@
@include opacity(80)
.ace_cursor
@include opacity(20)
.ace_gutter
background-color: rgba(255, 255, 255, 0.25)
width: 40px
@ -73,7 +73,7 @@
.executing, .executed, .problem-marker-info, .problem-marker-warning, .problem-marker-error
position: absolute
.executing
background-color: rgba(0, 255, 0, 0.20)
background-color: rgba(50, 255, 80, 0.35)
@include gradient-striped()
.executed
background-color: rgba(110, 110, 110, 0.12)
@ -86,14 +86,15 @@
.executing:not(.ace_gutter-cell)
background-size: 40px 40px
text-shadow: 1px 1px 1px #000
@include animation(progress-bar-stripes 2s linear infinite)
.ace_gutter-cell.executing:not(.ace_error)
.ace_gutter-cell.executing:not(.ace_error):not(.ace_warning):not(.ace_info)
margin-left: 1px
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2hpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDowMjgwMTE3NDA3MjA2ODExOEE2REU4Q0M1MTM1MkIxRiIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpBQjVEQUNDMzQ4RUIxMUUxOEVGRUUyNzFENDM3RDVFMCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpBQjVEQUNDMjQ4RUIxMUUxOEVGRUUyNzFENDM3RDVFMCIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1LjEgTWFjaW50b3NoIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTU1MjE3RDIzMTIwNjgxMThEQkI4NTlBMjQ1QTEwOTUiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6MDI4MDExNzQwNzIwNjgxMThBNkRFOENDNTEzNTJCMUYiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz7SazaGAAAAiElEQVR42mL8//8/AzUBEwOVweA3kAWboI2jCyhgDwBx4ZH9ey5Qy4UOQHweaHg/EAtQ08sFUIMDqBmGCkC8HmgoCCtQM1ICoK5toGYsg8KzHmjo+UGbDj8AcSMwORkSnQ7xgA3QtPmApISNBTyAGrSBGl6eAMSGxBhGyIVkZT3G0fKQYgAQYACL+C2ZM6PC7AAAAABJRU5ErkJggg==)
background-position: 0px center
.ace_gutter-cell.executed:not(.ace_error)
.ace_gutter-cell.executed:not(.ace_error):not(.ace_warning):not(.ace_info)
margin-left: 1px
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAANhJREFUeNpi/P//PwM1ARMDlcHgMrA428MAiANQBEFhSA4uynIXAOJ+dHFKXDgfiDdSxctAbzYAqQ+9U3ccQJdjIcMwByCVD8SGFEcK0DAFILUeiCcCXfeAIgOBhglADfsAxBNwqSPFy/1AbADEiUDXfSApHQJdcx+I9yPxE4AUCB8AGrYAn62M6HkZ6rX3UG4jEG8A4vNQviO2mMXrQqh3GqHcemi4gcACQobhixRQoMNiUQEaEY1k52WoKwuRhHAmE6KTDdCADdDwu4AvmRCMlOFfwAIEGAD4On+N4aXlhgAAAABJRU5ErkJggg==)
background-position: 0px center
@ -112,5 +113,3 @@
.ace_text-layer .ace_comment
color: darken(rgb(103, 164, 200), 5%)

View file

@ -151,4 +151,15 @@ block content
| and community organizer; you've probably
| already spoken with Jeremy.
li.row
img(src="/images/pages/about/glen_small.png").img-thumbnail
.col-sm-8
h3 Glen De Cauwsemaecker
p(data-i18n="about.glen_description")
| Glen, describe thyself!

View file

@ -32,7 +32,7 @@ div#columns.row
if team.chartData
tr
th(colspan=4, style="color: #{team.primaryColor}")
img(src="https://chart.googleapis.com/chart?chs=450x125&cht=lxy&chco=#{team.chartColor}&chtt=Score%3A+#{team.currentScore}&chts=#{team.chartColor},16,r&chf=a,s,000000FF&chls=2&chm=o,#{team.chartColor},0,4&chd=t:#{team.chartData}")
img(src="https://chart.googleapis.com/chart?chs=450x125&cht=lxy&chco=#{team.chartColor}&chtt=Score%3A+#{team.currentScore}&chts=#{team.chartColor},16,r&chf=a,s,000000FF&chls=2&chm=o,#{team.chartColor},0,4&chd=t:#{team.chartData}&chxt=y&chxr=0,#{team.minScore},#{team.maxScore}")
tr
th(data-i18n="general.result") Result

View file

@ -0,0 +1,33 @@
.modal-dialog
.modal-header
button(type='button', data-dismiss="modal", aria-hidden="true").close &times;
h3(data-i18n="play_level.editor_config_title") Editor Configuration
.modal-body
.form
.form-group.select-group
label.control-label(for="tome-key-bindings" data-i18n="play_level.editor_config_keybindings_label") Key Bindings
select#tome-key-bindings(name="keyBindings", type="checkbox", checked=multiplayer)
option(value="default" selected=(keyBindings === "default") data-i18n="play_level.editor_config_keybindings_default") Default (Ace)
option(value="vim" selected=(keyBindings === "vim")) Vim
option(value="emacs" selected=(keyBindings === "emacs")) Emacs
span.help-block(data-i18n="play_level.editor_config_keybindings_description") Adds additional shortcuts known from the common editors.
.form-group.checkbox
label(for="tome-invisibles")
input#tome-invisibles(name="invisibles", type="checkbox", checked=invisibles)
span(data-i18n="play_level.editor_config_invisibles_label") Show Invisibles
span.help-block(data-i18n="play_level.editor_config_invisibles_description") Displays invisibles such as spaces or tabs.
.form-group.checkbox
label(for="tome-indent-guides")
input#tome-indent-guides(name="indentGuides", type="checkbox", checked=indentGuides)
span(data-i18n="play_level.editor_config_indentguides_label") Show Indent Guides
span.help-block(data-i18n="play_level.editor_config_indentguides_description") Displays vertical lines to see indentation better.
.form-group.checkbox
label(for="tome-behaviors")
input#tome-behaviors(name="behaviors", type="checkbox", checked=behaviors)
span(data-i18n="play_level.editor_config_behaviors_label") Smart Behaviors
span.help-block(data-i18n="play_level.editor_config_behaviors_description") Autocompletes brackets, braces, and quotes.
.modal-footer
a(href='#', data-dismiss="modal", aria-hidden="true", data-i18n="modal.close").btn.btn-primary Close

View file

@ -37,3 +37,6 @@ button.btn.btn-xs.btn-inverse#music-button(title="Toggle Music")
li.selectable#edit-wizard-settings
i.icon-user
span(data-i18n="play_level.customize_wizard") Customize Wizard
li.selectable#edit-editor-config
i.icon-edit
span(data-i18n="play_level.editor_config") Editor Config

View file

@ -7,7 +7,6 @@ module.exports = class ArchmageView extends ContributeClassView
contributors: [
{name: "Tom Steinbrecher", avatar: "tom"}
{name: "Glen De Cauwsemaecker", avatar: "glen"}
{name: "Sébastien Moratinos", avatar: "sebastien"}
{name: "deepak1556", avatar: "deepak"}
{name: "Ronnie Cheng", avatar: "ronald"}

View file

@ -78,17 +78,22 @@ module.exports = class MyMatchesTabView extends CocoView
team.wins = _.filter(team.matches, {state: 'win'}).length
team.ties = _.filter(team.matches, {state: 'tie'}).length
team.losses = _.filter(team.matches, {state: 'loss'}).length
team.scoreHistory = team.session?.get('scoreHistory')
if team.scoreHistory?.length > 1
team.currentScore = Math.round team.scoreHistory[team.scoreHistory.length - 1][1] * 100
scoreHistory = team.session?.get('scoreHistory')
if scoreHistory?.length > 1
scoreHistory = _.last scoreHistory, 100 # Chart URL needs to be under 2048 characters for GET
team.currentScore = Math.round scoreHistory[scoreHistory.length - 1][1] * 100
team.chartColor = team.primaryColor.replace '#', ''
times = (s[0] for s in team.scoreHistory)
times = ((100 * (t - times[0]) / (times[times.length - 1] - times[0])).toFixed(1) for t in times)
scores = (s[1] for s in team.scoreHistory)
lowest = _.min scores
highest = _.max scores
#times = (s[0] for s in scoreHistory)
#times = ((100 * (t - times[0]) / (times[times.length - 1] - times[0])).toFixed(1) for t in times)
# Let's try being independent of time.
times = (i for s, i in scoreHistory)
scores = (s[1] for s in scoreHistory)
lowest = _.min scores.concat([0])
highest = _.max scores.concat(50)
scores = (Math.round(100 * (s - lowest) / (highest - lowest)) for s in scores)
team.chartData = times.join(',') + '|' + scores.join(',')
team.minScore = Math.round(100 * lowest)
team.maxScore = Math.round(100 * highest)
ctx

View file

@ -238,8 +238,9 @@ module.exports = class HUDView extends View
update: ->
return unless @thang and not @speaker
# Update properties
@updatePropElement(prop, @thang[prop]) for prop in @thang.hudProperties ? []
@$el.find('.thang-props-column').toggleClass 'nonexistent', not @thang.exists
if @thang.exists
@updatePropElement(prop, @thang[prop]) for prop in @thang.hudProperties ? []
# Update action timeline
@updateActions()
@ -305,7 +306,7 @@ module.exports = class HUDView extends View
for actionName, action of @thang.actions
@updateActionElement(actionName, @timespans[actionName], @thang.action is actionName)
tableContainer = @$el.find('.table-container')
timelineWidth = tableContainer.find('.action-timeline').width()
timelineWidth = tableContainer.find('tr:not(.secret) .action-timeline').width()
right = (1 - (@timeProgress ? 0)) * timelineWidth
arrow = tableContainer.find('.progress-arrow')
arrow.css 'right', right - arrow.width() / 2

View file

@ -0,0 +1,60 @@
View = require 'views/kinds/ModalView'
template = require 'templates/play/level/modal/editor_config'
{me} = require('lib/auth')
module.exports = class EditorConfigModal extends View
id: 'level-editor-config-modal'
template: template
aceConfig: {}
defaultConfig:
keyBindings: 'default'
invisibles: false
indentGuides: false
behaviors: false
events:
'change #tome-invisibles': 'updateInvisiblesSelection'
'change #tome-key-bindings': 'updateKeyBindingsSelection'
'change #tome-indent-guides': 'updateIndentGuides'
'change #tome-behaviors': 'updateBehaviors'
constructor: (options) ->
super(options)
getRenderData: ->
@aceConfig = _.cloneDeep me.get('aceConfig') ? {}
@aceConfig = _.defaults @aceConfig, @defaultConfig
c = super()
c.keyBindings = @aceConfig.keyBindings
c.invisibles = @aceConfig.invisibles
c.indentGuides = @aceConfig.indentGuides
c.behaviors = @aceConfig.behaviors
c
updateInvisiblesSelection: ->
@aceConfig.invisibles = @$el.find('#tome-invisibles').prop('checked')
updateKeyBindingsSelection: ->
@aceConfig.keyBindings = @$el.find('#tome-key-bindings').val()
updateIndentGuides: ->
@aceConfig.indentGuides = @$el.find('#tome-indent-guides').prop('checked')
updateBehaviors: ->
@aceConfig.behaviors = @$el.find('#tome-behaviors').prop('checked')
afterRender: ->
super()
onHidden: ->
@aceConfig.invisibles = @$el.find('#tome-invisibles').prop('checked')
@aceConfig.keyBindings = @$el.find('#tome-key-bindings').val()
@aceConfig.indentGuides = @$el.find('#tome-indent-guides').prop('checked')
@aceConfig.behaviors = @$el.find('#tome-behaviors').prop('checked')
me.set 'aceConfig', @aceConfig
Backbone.Mediator.publish 'change:editor-config'
me.save()
destroy: ->
super()

View file

@ -2,6 +2,8 @@ View = require 'views/kinds/CocoView'
template = require 'templates/play/level/playback'
{me} = require 'lib/auth'
EditorConfigModal = require './modal/editor_config_modal'
module.exports = class PlaybackView extends View
id: "playback-view"
template: template
@ -25,6 +27,7 @@ module.exports = class PlaybackView extends View
'click #debug-toggle': 'onToggleDebug'
'click #grid-toggle': 'onToggleGrid'
'click #edit-wizard-settings': 'onEditWizardSettings'
'click #edit-editor-config': 'onEditEditorConfig'
'click #music-button': 'onToggleMusic'
'click #zoom-in-button': -> Backbone.Mediator.publish('camera-zoom-in') unless @disabled
'click #zoom-out-button': -> Backbone.Mediator.publish('camera-zoom-out') unless @disabled
@ -77,6 +80,9 @@ module.exports = class PlaybackView extends View
onEditWizardSettings: ->
Backbone.Mediator.publish 'edit-wizard-settings'
onEditEditorConfig: ->
@openModalView(new EditorConfigModal())
onDisableControls: (e) ->
if not e.controls or 'playback' in e.controls
@disabled = true

View file

@ -15,10 +15,16 @@ module.exports = class SpellView extends View
eventsSuppressed: true
writable: true
keyBindings:
'default': null
'vim': 'ace/keyboard/vim'
'emacs': 'ace/keyboard/emacs'
subscriptions:
'level-disable-controls': 'onDisableControls'
'level-enable-controls': 'onEnableControls'
'surface:frame-changed': 'onFrameChanged'
'surface:coordinate-selected': 'onCoordinateSelected'
'god:new-world-created': 'onNewWorld'
'god:user-code-problem': 'onUserCodeProblem'
'tome:manual-cast': 'onManualCast'
@ -29,6 +35,7 @@ module.exports = class SpellView extends View
'focus-editor': 'focus'
'tome:spell-statement-index-updated': 'onStatementIndexUpdated'
'spell-beautify': 'onSpellBeautify'
'change:editor-config': 'onChangeEditorConfig'
events:
'mouseout': 'onMouseOut'
@ -55,6 +62,7 @@ module.exports = class SpellView extends View
createACE: ->
# Test themes and settings here: http://ace.ajax.org/build/kitchen-sink.html
aceConfig = me.get('aceConfig') ? {}
@ace = ace.edit @$el.find('.ace')[0]
@aceSession = @ace.getSession()
@aceDoc = @aceSession.getDocument()
@ -65,11 +73,12 @@ module.exports = class SpellView extends View
@aceSession.setNewLineMode "unix"
@aceSession.setUseSoftTabs true
@ace.setTheme 'ace/theme/textmate'
@ace.setDisplayIndentGuides false
@ace.setDisplayIndentGuides aceConfig.indentGuides
@ace.setShowPrintMargin false
@ace.setShowInvisibles false
@ace.setBehavioursEnabled false
@ace.setShowInvisibles aceConfig.invisibles
@ace.setBehavioursEnabled aceConfig.behaviors
@ace.setAnimatedScroll true
@ace.setKeyboardHandler @keyBindings[aceConfig.keyBindings ? 'default']
@toggleControls null, @writable
@aceSession.selection.on 'changeCursor', @onCursorActivity
$(@ace.container).find('.ace_gutter').on 'click', '.ace_error, .ace_warning, .ace_info', @onAnnotationClick
@ -419,10 +428,15 @@ module.exports = class SpellView extends View
@ace.clearSelection()
onFrameChanged: (e) ->
return unless e.selectedThang?.id is @thang?.id
return unless @spellThang and e.selectedThang?.id is @spellThang?.thang.id
@thang = e.selectedThang # update our thang to the current version
@highlightCurrentLine()
onCoordinateSelected: (e) ->
return unless e.x? and e.y?
@ace.insert "{x: #{e.x}, y: #{e.y}}"
@highlightCurrentLine()
onStatementIndexUpdated: (e) ->
return unless e.ace is @ace
@highlightCurrentLine()
@ -545,6 +559,12 @@ module.exports = class SpellView extends View
pretty = @spellThang.aether.beautify ugly
@ace.setValue pretty
onChangeEditorConfig: (e) ->
aceConfig = me.get 'aceConfig'
@ace.setDisplayIndentGuides (aceConfig.indentGuides || false)
@ace.setShowInvisibles (aceConfig.invisibles || false)
@ace.setKeyboardHandler (@keyBindings[aceConfig.keyBindings] || null)
dismiss: ->
@recompile() if @spell.hasChangedSignificantly @getSource()

View file

@ -423,14 +423,30 @@ module.exports = class SpectateLevelView extends View
onNextGamePressed: (e) ->
console.log "You want to see the next game!"
@sessionOne = "53193c8f7a89df21c4d968e9"
@sessionTwo = "531aa613026834331eac5e7e"
url = "/play/spectate/dungeon-arena?session-one=#{@sessionOne}&session-two=#{@sessionTwo}"
Backbone.Mediator.publish 'router:navigate', {
route: url,
viewClass: SpectateLevelView,
viewArgs: [{spectateSessions:{sessionOne: @sessionOne, sessionTwo: @sessionTwo}}, "dungeon-arena"]}
@fetchRandomSessionPair (err, data) =>
if err? then return console.log "There was an error fetching the random session pair: #{data}"
@sessionOne = data[0]._id
@sessionTwo = data[1]._id
console.log "Playing session #{@sessionOne} against #{@sessionTwo}"
url = "/play/spectate/dungeon-arena?session-one=#{@sessionOne}&session-two=#{@sessionTwo}"
Backbone.Mediator.publish 'router:navigate', {
route: url,
viewClass: SpectateLevelView,
viewArgs: [{spectateSessions:{sessionOne: @sessionOne, sessionTwo: @sessionTwo}}, "dungeon-arena"]}
fetchRandomSessionPair: (cb) ->
console.log "Fetching random session pair!"
randomSessionPairURL = "/db/level/#{@level.get('original')}.#{@level.get('version').major}/random_session_pair"
$.ajax
url: randomSessionPairURL
type: "GET"
complete: (jqxhr, textStatus) ->
if textStatus isnt "success"
cb("error", jqxhr.statusText)
else
cb(null, $.parseJSON(jqxhr.responseText))

View file

@ -32,7 +32,7 @@
"firepad": "~0.1.2",
"marked": "~0.3.0",
"moment": "~2.5.0",
"aether": "~0.1.9",
"aether": "~0.1.10",
"underscore.string": "~2.3.3",
"firebase": "~1.0.2",
"catiline": "~2.9.3"

View file

@ -31,6 +31,8 @@ LevelHandler = class LevelHandler extends Handler
return @getLeaderboard(req, res, args[0]) if args[1] is 'leaderboard'
return @getMySessions(req, res, args[0]) if args[1] is 'my_sessions'
return @getFeedback(req, res, args[0]) if args[1] is 'feedback'
return @getRandomSessionPair(req,res,args[0]) if args[1] is 'random_session_pair'
return @sendNotFoundError(res)
fetchLevelByIDAndHandleErrors: (id, req, res, callback) ->
@ -147,6 +149,41 @@ LevelHandler = class LevelHandler extends Handler
return @sendDatabaseError(res, err) if err
resultSessions ?= []
@sendSuccess res, resultSessions
getRandomSessionPair: (req, res, id) ->
findParameters = {}
[original,version] = id.split '.'
version = parseInt(version) ? 0
sessionsQueryParameters =
level:
original: original
majorVersion: version
submitted:true
query = Session
.find(sessionsQueryParameters)
.select('team')
.lean()
query.exec (err, resultSessions) =>
return @sendDatabaseError res, err if err? or not resultSessions
teamSessions = _.groupBy resultSessions, 'team'
sessions = []
numberOfTeams = 0
for team of teamSessions
numberOfTeams += 1
sessions.push _.sample(teamSessions[team])
if numberOfTeams != 2 then return @sendDatabaseError res, "There aren't sessions of 2 teams, so cannot choose random opponents!"
@sendSuccess res, sessions
validateLeaderboardRequestParameters: (req) ->
req.query.order = parseInt(req.query.order) ? -1

View file

@ -16,7 +16,7 @@ sendwithus = require '../sendwithus'
module.exports.setup = (app) ->
app.all config.mail.mailchimpWebhook, handleMailchimpWebHook
app.get '/mail/cron/ladder-update', handleLadderUpdate
getAllLadderScores = (next) ->
query = Level.find({type: 'ladder'})
.select('levelID')
@ -28,21 +28,24 @@ getAllLadderScores = (next) ->
for level in levels
for team in ['humans', 'ogres']
'I ... am not doing this.'
# Query to get sessions to make histogram
# db.level.sessions.find({"submitted":true,"levelID":"brawlwood",team:"ogres"},{"_id":0,"totalScore":1})
isRequestFromDesignatedCronHandler = (req, res) ->
if req.ip isnt config.mail.cronHandlerPublicIP and req.ip isnt config.mail.cronHandlerPrivateIP
console.log "RECEIVED REQUEST FROM IP #{req.ip}(headers indicate #{req.headers['x-forwarded-for']}"
console.log "UNAUTHORIZED ATTEMPT TO SEND TRANSACTIONAL LADDER EMAIL THROUGH CRON MAIL HANDLER"
res.send("You aren't authorized to perform that action. Only the specified Cron handler may perform that action.")
res.end()
return true
return false
return false
return true
handleLadderUpdate = (req, res) ->
log.info("Going to see about sending ladder update emails.")
requestIsFromDesignatedCronHandler = isRequestFromDesignatedCronHandler req, res
unless requestIsFromDesignatedCronHandler then return
#unless requestIsFromDesignatedCronHandler then return
res.send('Great work, Captain Cron! I can take it from here.')
res.end()
# TODO: somehow fetch the histograms
@ -97,8 +100,8 @@ sendLadderUpdateEmail = (session, daysAgo) ->
context =
email_id: sendwithus.templates.ladder_update_email
recipient:
address: user.email
#address: 'nick@codecombat.com' # Debugging
#address: user.email
address: 'nick@codecombat.com' # Debugging
name: name
email_data:
name: name
@ -149,15 +152,18 @@ getScoreHistoryGraphURL = (session, daysAgo) ->
since = new Date() - 86400 * 1000 * daysAgo
scoreHistory = (s for s in session.scoreHistory ? [] when s[0] >= since)
return '' unless scoreHistory.length > 1
scoreHistory = _.last scoreHistory, 100 # Chart URL needs to be under 2048 characters for GET
times = (s[0] for s in scoreHistory)
times = ((100 * (t - times[0]) / (times[times.length - 1] - times[0])).toFixed(1) for t in times)
scores = (s[1] for s in scoreHistory)
lowest = _.min scores
highest = _.max scores
lowest = _.min scores.concat([0])
highest = _.max scores.concat(50)
scores = (Math.round(100 * (s - lowest) / (highest - lowest)) for s in scores)
currentScore = Math.round scoreHistory[scoreHistory.length - 1][1] * 100
minScore = Math.round(100 * lowest)
maxScore = Math.round(100 * highest)
chartData = times.join(',') + '|' + scores.join(',')
"https://chart.googleapis.com/chart?chs=600x75&cht=lxy&chtt=Score%3A+#{currentScore}&chts=222222,12,r&chf=a,s,000000FF&chls=2&chd=t:#{chartData}"
"https://chart.googleapis.com/chart?chs=600x75&cht=lxy&chtt=Score%3A+#{currentScore}&chts=222222,12,r&chf=a,s,000000FF&chls=2&chd=t:#{chartData}&chxt=y&chxr=0,#{minScore},#{maxScore}"
handleMailchimpWebHook = (req, res) ->
post = req.body

View file

@ -9,7 +9,7 @@ errors = require '../commons/errors'
async = require 'async'
serverProperties = ['passwordHash', 'emailLower', 'nameLower', 'passwordReset']
privateProperties = ['permissions', 'email', 'firstName', 'lastName', 'gender', 'facebookID', 'music', 'volume']
privateProperties = ['permissions', 'email', 'firstName', 'lastName', 'gender', 'facebookID', 'music', 'volume', 'aceConfig']
UserHandler = class UserHandler extends Handler
modelClass: User
@ -18,7 +18,7 @@ UserHandler = class UserHandler extends Handler
'name', 'photoURL', 'password', 'anonymous', 'wizardColor1', 'volume',
'firstName', 'lastName', 'gender', 'facebookID', 'emailSubscriptions',
'testGroupNumber', 'music', 'hourOfCode', 'hourOfCodeComplete', 'preferredLanguage',
'wizard'
'wizard', 'aceConfig'
]
jsonSchema: schema

View file

@ -45,6 +45,12 @@ UserSchema = c.object {},
wizard: c.object {},
colorConfig: c.object {additionalProperties: c.colorConfig()}
aceConfig: c.object {},
keyBindings: {type: 'string', 'default': 'default', 'enum': ['default', 'vim', 'emacs']}
invisibles: {type: 'boolean', 'default': false}
indentGuides: {type: 'boolean', 'default': false}
behaviors: {type: 'boolean', 'default': false}
c.extendBasicProperties UserSchema, 'user'
module.exports = UserSchema

View file

@ -40,7 +40,7 @@ describe 'utils library', ->
expect(util.i18n(this.fixture1, 'text', 'en')).toEqual(this.fixture1.text)
expect(util.i18n(this.fixture1, 'blurb', 'en')).toEqual(this.fixture1.blurb)
delete this.fixture1.blurb
expect(util.i18n(this.fixture1, 'blurb', 'en')).toEqual(this.fixture1.text)
expect(util.i18n(this.fixture1, 'blurb', 'en')).toEqual(null)
it 'i18n can fall forward if a general language is not found', ->
expect(util.i18n(this.fixture1, 'text', 'pt')).toEqual(this.fixture1.i18n['pt-BR'].text)