mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-25 00:28:31 -05:00
Merge branch 'master' into production
This commit is contained in:
commit
5c70ae6120
6 changed files with 23 additions and 4 deletions
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -68,6 +68,7 @@ module.exports.thangNames = thangNames =
|
|||
'Buffy'
|
||||
'Allankrita'
|
||||
'Kay'
|
||||
'Shannon'
|
||||
]
|
||||
'Peasant M': [
|
||||
'Yorik'
|
||||
|
@ -86,6 +87,7 @@ module.exports.thangNames = thangNames =
|
|||
'Durfkor'
|
||||
'Paps'
|
||||
'Hodor'
|
||||
'James'
|
||||
]
|
||||
'Peasant F': [
|
||||
'Hilda'
|
||||
|
@ -375,4 +377,5 @@ module.exports.thangNames = thangNames =
|
|||
'Leona'
|
||||
'Jarin'
|
||||
'Helena'
|
||||
'Philips'
|
||||
]
|
||||
|
|
|
@ -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'},
|
||||
|
|
|
@ -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')
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue