From d71ddaf74a4e1149d6a62258afb0e8d837c58f1a Mon Sep 17 00:00:00 2001 From: richhiey1996 Date: Fri, 24 Oct 2014 13:43:49 +0530 Subject: [PATCH 1/5] Update names.coffee --- app/lib/world/names.coffee | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/lib/world/names.coffee b/app/lib/world/names.coffee index 38679fcfd..5c90fc293 100644 --- a/app/lib/world/names.coffee +++ b/app/lib/world/names.coffee @@ -50,6 +50,7 @@ module.exports.thangNames = thangNames = 'Sage' 'Ryan' 'Bond' + 'Richard' ] 'Soldier F': [ 'Sarah' @@ -68,6 +69,7 @@ module.exports.thangNames = thangNames = 'Buffy' 'Allankrita' 'Kay' + 'Shannon' ] 'Peasant M': [ 'Yorik' @@ -86,6 +88,7 @@ module.exports.thangNames = thangNames = 'Durfkor' 'Paps' 'Hodor' + 'James' ] 'Peasant F': [ 'Hilda' @@ -375,4 +378,5 @@ module.exports.thangNames = thangNames = 'Leona' 'Jarin' 'Helena' + 'Philips' ] From ff2e8eaa21719ac88df1f0b1a203f7fea090b156 Mon Sep 17 00:00:00 2001 From: Matt Lott Date: Fri, 24 Oct 2014 10:17:57 -0700 Subject: [PATCH 2/5] Update code snippet schema to code format --- app/schemas/schemas.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/schemas/schemas.coffee b/app/schemas/schemas.coffee index 8a16f830c..82978d592 100644 --- a/app/schemas/schemas.coffee +++ b/app/schemas/schemas.coffee @@ -198,7 +198,7 @@ me.FunctionArgumentSchema = me.object { 'default': null me.codeSnippet = me.object {description: 'A language-specific code snippet'}, - code: {type: 'string', title: 'Snippet', default: '', description: 'Code snippet. Use ${1:defaultValue} syntax to add flexible arguments'} + code: {type: 'string', format: 'code', title: 'Snippet', default: '', description: 'Code snippet. Use ${1:defaultValue} syntax to add flexible arguments'} tab: {type: 'string', title: 'Tab Trigger', description: 'Tab completion text. Will be expanded to the snippet if typed and hit tab.'} me.activity = me.object {description: 'Stats on an activity'}, From 651ff3c8d0798c7fa27efdbfaee7f5e2fdf080ee Mon Sep 17 00:00:00 2001 From: Matt Lott Date: Fri, 24 Oct 2014 11:38:48 -0700 Subject: [PATCH 3/5] Update attack snippet if no findNearestEnemy This is a one-off fix until we have a more general solution to snippet updating based on available skills. --- app/views/play/level/tome/SpellView.coffee | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/app/views/play/level/tome/SpellView.coffee b/app/views/play/level/tome/SpellView.coffee index 26c5d9350..59787a867 100644 --- a/app/views/play/level/tome/SpellView.coffee +++ b/app/views/play/level/tome/SpellView.coffee @@ -234,7 +234,22 @@ module.exports = class SpellView extends CocoView meta: 'press enter' name: doc.name tabTrigger: doc.snippets[e.language].tab - snippetEntries.push entry + if doc.name is 'findNearestEnemy' + # Remember if we have findNearestEnemy so attack snippet can be updated + haveFindNearestEnemy = true + if doc.name is 'attack' + # Postpone this until we know if findNearestEnemy is available + attackEntry = entry + else + snippetEntries.push entry + + # TODO: Generalize this snippet replacement + # TODO: Where should this logic live, and what format should it be in? + if attackEntry? + unless haveFindNearestEnemy + # No findNearestEnemy, so update attack snippet to string-based target + attackEntry.content = attackEntry.content.replace '${1:enemy}', '"${1:Enemy Name}"' + snippetEntries.push attackEntry # window.zatannaInstance = @zatanna # window.snippetEntries = snippetEntries From ac6b213feef71e8b3f3c7ef55acf92422c67e682 Mon Sep 17 00:00:00 2001 From: richhiey1996 Date: Sat, 25 Oct 2014 00:11:28 +0530 Subject: [PATCH 4/5] Update names.coffee --- app/lib/world/names.coffee | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/lib/world/names.coffee b/app/lib/world/names.coffee index 5c90fc293..f52974a6a 100644 --- a/app/lib/world/names.coffee +++ b/app/lib/world/names.coffee @@ -50,7 +50,6 @@ module.exports.thangNames = thangNames = 'Sage' 'Ryan' 'Bond' - 'Richard' ] 'Soldier F': [ 'Sarah' @@ -378,5 +377,5 @@ module.exports.thangNames = thangNames = 'Leona' 'Jarin' 'Helena' - 'Philips' + 'Philips' ] From 42b81fd55e9568643169a38fe3ec2146ec1b1b4c Mon Sep 17 00:00:00 2001 From: Nick Winter Date: Fri, 24 Oct 2014 13:03:10 -0700 Subject: [PATCH 5/5] Fix for point/region choosers destroying AudioPlayer's camera. Fix for DOM highlight arrow covering up level info on iPad. --- app/lib/AudioPlayer.coffee | 2 +- app/lib/surface/Surface.coffee | 2 +- app/views/play/WorldMapView.coffee | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/lib/AudioPlayer.coffee b/app/lib/AudioPlayer.coffee index 3a32d3759..986b6c44e 100644 --- a/app/lib/AudioPlayer.coffee +++ b/app/lib/AudioPlayer.coffee @@ -93,7 +93,7 @@ class AudioPlayer extends CocoClass filename = if _.string.startsWith(name, '/file/') then name else '/file/' + name unless @hasLoadedSound filename @soundsToPlayWhenLoaded[name] = audioOptions.volume - audioOptions = @applyPanning audioOptions, pos if @camera and pos + audioOptions = @applyPanning audioOptions, pos if @camera and not @camera.destroyed and pos instance = createjs.Sound.play name, audioOptions # For some reason, individual sound volume control doesn't work any more. # I tried updating to SoundJS NEXT on 2014-09-10, but couldn't get any sounds to play with that one. diff --git a/app/lib/surface/Surface.coffee b/app/lib/surface/Surface.coffee index a5de2f15e..fb582cc6e 100644 --- a/app/lib/surface/Surface.coffee +++ b/app/lib/surface/Surface.coffee @@ -99,7 +99,7 @@ module.exports = Surface = class Surface extends CocoClass @normalStage = new createjs.Stage(@normalCanvas[0]) @webGLStage = new createjs.SpriteStage(@webGLCanvas[0]) @normalStage.nextStage = @webGLStage - @camera = AudioPlayer.camera = new Camera @webGLCanvas + @camera = AudioPlayer.camera = new Camera @webGLCanvas unless @options.choosing @normalLayers.push @surfaceTextLayer = new Layer name: 'Surface Text', layerPriority: 1, transform: Layer.TRANSFORM_SURFACE_TEXT, camera: @camera @normalLayers.push @gridLayer = new Layer name: 'Grid', layerPriority: 2, transform: Layer.TRANSFORM_SURFACE, camera: @camera diff --git a/app/views/play/WorldMapView.coffee b/app/views/play/WorldMapView.coffee index 83089bb8a..e53069774 100644 --- a/app/views/play/WorldMapView.coffee +++ b/app/views/play/WorldMapView.coffee @@ -128,6 +128,7 @@ module.exports = class WorldMapView extends RootView levelID = $(e.target).parents('.level').data('level-id') @$levelInfo = @$el.find(".level-info-container[data-level-id=#{levelID}]").show() @adjustLevelInfoPosition e + @endHighlight() else levelElement = $(e.target).parents('.level') levelID = levelElement.data('level-id')