mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-27 17:45:40 -05:00
Various changes before merge
This commit is contained in:
parent
b29ab56fe2
commit
76b949ac1e
3 changed files with 3 additions and 7 deletions
|
@ -26,7 +26,6 @@ module.exports = class LevelBus extends Bus
|
|||
constructor: ->
|
||||
super(arguments...)
|
||||
@changedSessionProperties = {}
|
||||
console.log "Level bus constructed!"
|
||||
@saveSession = _.debounce(@saveSession, 1000, {maxWait: 5000})
|
||||
|
||||
init: ->
|
||||
|
@ -90,7 +89,6 @@ module.exports = class LevelBus extends Bus
|
|||
|
||||
onSpellChanged: (e) ->
|
||||
return unless @onPoint()
|
||||
console.log "Spell Changed:",e.spell.spellKey
|
||||
code = @session.get('code')
|
||||
code ?= {}
|
||||
parts = e.spell.spellKey.split('/')
|
||||
|
@ -108,7 +106,6 @@ module.exports = class LevelBus extends Bus
|
|||
|
||||
unless e.spell.spellKey in @teamSpellMap[spellTeam]
|
||||
@teamSpellMap[spellTeam].push e.spell.spellKey
|
||||
console.log "Assigned spell #{e.spell.spellKey} to team #{spellTeam}"
|
||||
@changedSessionProperties.teamSpells = true
|
||||
@session.set({'teamSpells': @teamSpellMap})
|
||||
@saveSession()
|
||||
|
@ -241,4 +238,4 @@ module.exports = class LevelBus extends Bus
|
|||
console.log @teamSpellMap
|
||||
@changedSessionProperties.teamSpells = true
|
||||
@session.set({'teamSpells': @teamSpellMap})
|
||||
@saveSession()
|
||||
@saveSession()
|
||||
|
|
|
@ -103,8 +103,7 @@ module.exports = class HomeView extends View
|
|||
onSimulateButtonClick: (e) =>
|
||||
$.get "/queue/scoring", (data) =>
|
||||
levelName = data.sessions[0].levelID
|
||||
console.log data
|
||||
|
||||
#TODO: Refactor. So much refactor.
|
||||
world = {}
|
||||
god = new God()
|
||||
levelLoader = new LevelLoader(levelName, @supermodel, data.sessions[0].sessionID)
|
||||
|
|
|
@ -22,7 +22,7 @@ module.exports.initializeQueueClient = (cb) ->
|
|||
|
||||
generateQueueClient = ->
|
||||
#if config.queue.accessKeyId
|
||||
if false #TODO: revert this
|
||||
if false #TODO: Change this in production
|
||||
queueClient = new SQSQueueClient()
|
||||
else
|
||||
queueClient = new MongoQueueClient()
|
||||
|
|
Loading…
Reference in a new issue