Merge branch 'master' into production

This commit is contained in:
Nick Winter 2014-11-16 20:38:35 -08:00
commit 4676f3e3ef
12 changed files with 30 additions and 30 deletions

View file

@ -62,7 +62,7 @@ module.exports = class God extends CocoClass
onTomeCast: (e) ->
@lastSubmissionCount = e.submissionCount
@lastFlagHistory = e.flagHistory
@lastFlagHistory = (flag for flag in e.flagHistory when flag.source isnt 'code')
@createWorld e.spells, e.preload, e.realTime
createWorld: (spells, preload, realTime) ->

View file

@ -138,8 +138,9 @@ module.exports = class LevelBus extends Bus
return unless @onPoint()
# Record the flag history.
state = @session.get('state')
return if _.isEqual state.flagHistory, e.world.flagHistory
state.flagHistory = e.world.flagHistory
flagHistory = (flag for flag in e.world.flagHistory when flag.source isnt 'code')
return if _.isEqual state.flagHistory, flagHistory
state.flagHistory = flagHistory
@changedSessionProperties.state = true
@session.set('state', state)
@saveSession()

View file

@ -558,7 +558,7 @@ module.exports = Surface = class Surface extends CocoClass
@playing = false # Will start when countdown is done.
if @heroLank
@previousCameraZoom = @camera.zoom
@camera.zoomTo @heroLank.sprite, 4, 3000
@camera.zoomTo @heroLank.sprite, 2, 3000
onRealTimePlaybackEnded: (e) ->
return unless @realTime

View file

@ -745,6 +745,8 @@
amount_achieved: "Amount"
achievement: "Achievement"
category_contributor: "Contributor"
category_ladder: "Ladder"
category_level: "Level"
category_miscellaneous: "Miscellaneous"
category_levels: "Levels"
category_undefined: "Uncategorized"

View file

@ -56,15 +56,15 @@ module.exports = nativeDescription: "Italiano", englishDescription: "Italian", t
owned: "In tuo possesso" # For items you own
locked: "Bloccato"
available: "Disponibile"
# skills_granted: "Skills Granted" # Property documentation details
skills_granted: "Abilità Fornite" # Property documentation details
heroes: "Eroi" # Tooltip on hero shop button from /play
# achievements: "Achievements" # Tooltip on achievement list button from /play
achievements: "Imprese" # Tooltip on achievement list button from /play
account: "Account" # Tooltip on account button from /play
settings: "Impostazioni" # Tooltip on settings button from /play
next: "Procedi" # Go from choose hero to choose inventory before playing a level
change_hero: "Cambia Eroe" # Go back from choose inventory to choose hero
# choose_inventory: "Equip Items"
# buy_gems: "Buy Gems"
buy_gems: "Compra Gemme"
older_campaigns: "Campagne precedenti"
anonymous: "Giocatore Anonimo"
level_difficulty: "Difficoltà: "
@ -110,7 +110,7 @@ module.exports = nativeDescription: "Italiano", englishDescription: "Italian", t
sign_up: "Registrati"
log_in: "Accedi con la password"
social_signup: "Oppure puoi registrarti con Facebook o Google+:"
# required: "You need to log in before you can go that way."
required: "Effettua l'accesso per proseguire."
recover:
recover_account_title: "Recupera account"

View file

@ -126,6 +126,7 @@ _.extend LevelSessionSchema.properties,
pos: c.object {required: ['x', 'y']},
x: {type: 'number'}
y: {type: 'number'}
source: {type: 'string', enum: ['click']} # Do not store 'code' flag events in the session.
code:
type: 'object'

View file

@ -74,6 +74,7 @@ module.exports =
pos: c.object {required: ['x', 'y']},
x: {type: 'number'}
y: {type: 'number'}
source: {type: 'string', enum: ['click', 'code']}
'level:next-game-pressed': c.object {}

View file

@ -688,7 +688,6 @@ forest = [
type: 'hero'
id: 'coinucopia'
description: 'Start playing in real-time with input flags as you collect gold coins!'
disabled: not me.isAdmin()
nextLevels:
continue: 'copper-meadows'
x: 77.54
@ -698,8 +697,7 @@ forest = [
name: 'Copper Meadows'
type: 'hero'
id: 'copper-meadows'
description: 'grab the coins'
disabled: not me.isAdmin()
description: 'This level exercises: if/else, object members, variables, flag placement, and collection.'
nextLevels:
continue: 'drop-the-flag'
x: 77.54
@ -709,43 +707,39 @@ forest = [
name: 'Drop the Flag'
type: 'hero'
id: 'drop-the-flag'
description: 'it is hot'
disabled: not me.isAdmin()
description: 'This level exercises: flag position, object members.'
nextLevels:
continue: 'deadly-pursuit'
x: 77.54
y: 50.94
y: 45.94
}
{
name: 'Deadly Pursuit'
type: 'hero'
id: 'deadly-pursuit'
description: 'what is a dirt nap? it is death.'
disabled: not me.isAdmin()
description: 'This level exercises: if/else, flag placement and timing, item collection.'
nextLevels:
continue: 'rich-forager'
x: 77.54
y: 40.94
y: 35.94
}
{
name: 'Rich Forager'
type: 'hero'
id: 'rich-forager'
description: 'if i were a rich man'
disabled: not me.isAdmin()
description: 'This level exercises: if/else if, collection, combat.'
nextLevels:
continue: 'multiplayer-treasure-grove'
x: 77.54
y: 45.94
y: 25.94
}
{
name: 'Multiplayer Treasure Grove'
type: 'hero'
type: 'hero-ladder'
id: 'multiplayer-treasure-grove'
description: 'show em who is the professional boss'
disabled: not me.isAdmin()
x: 77.54
y: 35.94
description: 'Mix collection, flags, and combat in this multiplayer coin-gathering arena.'
x: 67.54
y: 25.94
}
{
name: 'Dueling Grounds'

View file

@ -59,7 +59,7 @@ module.exports = class LevelFlagsView extends CocoView
pos = x: e.worldPos.x, y: e.worldPos.y
delay = if @realTimeFlags then multiplayerFlagDelay else 0
now = @world.dt * @world.frames.length
flag = player: me.id, team: me.team, color: @flagColor, pos: pos, time: now + delay, active: true
flag = player: me.id, team: me.team, color: @flagColor, pos: pos, time: now + delay, active: true, source: 'click'
@flags[@flagColor] = flag
@flagHistory.push flag
@realTimeFlags?.create flag
@ -74,7 +74,7 @@ module.exports = class LevelFlagsView extends CocoView
delete @flags[e.color]
delay = if @realTimeFlags then multiplayerFlagDelay else 0
now = @world.dt * @world.frames.length
flag = player: me.id, team: me.team, color: e.color, time: now + delay, active: false
flag = player: me.id, team: me.team, color: e.color, time: now + delay, active: false, source: 'click'
@flagHistory.push flag
Backbone.Mediator.publish 'level:flag-updated', flag
#console.log e.color, 'deleted at time', flag.time
@ -104,6 +104,7 @@ module.exports = class LevelFlagsView extends CocoView
pos: e.get('pos')
time: e.get('time')
active: e.get('active')
#source: 'click'? e.get('source')? nothing?
@flagHistory.push flag
Backbone.Mediator.publish 'level:flag-updated', flag

View file

@ -594,7 +594,7 @@ module.exports = class PlayLevelView extends RootView
players = new RealTimeCollection('multiplayer_players/' + @levelID)
players.create
id: me.id
name: session.get('creatorName')
name: me.get('name')
state: 'playing'
created: new Date().toISOString()
heartbeat: new Date().toISOString()

View file

@ -33,7 +33,7 @@ module.exports = class SpellListTabEntryView extends SpellListEntryView
shift = $.i18n.t 'keyboard_shortcuts.shift'
context.beautifyShortcutVerbose = "#{ctrl}+#{shift}+B: #{$.i18n.t 'keyboard_shortcuts.beautify'}"
context.maximizeShortcutVerbose = "#{ctrl}+#{shift}+M: #{$.i18n.t 'keyboard_shortcuts.maximize_editor'}"
context.includeSpellList = @options.includeSpellList
context.includeSpellList = @options.level.get('slug') in ['break-the-prison', 'zone-of-danger', 'k-means-cluster-wars', 'brawlwood', 'dungeon-arena', 'sky-span', 'minimax-tic-tac-toe']
context.codeLanguage = @options.codeLanguage
context.levelType = @options.level.get 'type', true
context

View file

@ -61,7 +61,7 @@ module.exports = class SpellListView extends CocoView
theseThangs = _.keys(spell.thangs)
changedThangs = not lastThangs or not _.isEqual theseThangs, lastThangs
lastThangs = theseThangs
newEntries.push entry = new SpellListEntryView spell: spell, showTopDivider: changedThangs, supermodel: @supermodel, includeSpellList: @spells.length > 1, level: @options.level
newEntries.push entry = new SpellListEntryView spell: spell, showTopDivider: changedThangs, supermodel: @supermodel, level: @options.level
@entries.push entry
for entry in newEntries
@$el.append entry.el