mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-24 08:08:15 -05:00
Changed subscription frequency to prevent multiple score registrations
This commit is contained in:
parent
ca7376b794
commit
6011ac0df4
1 changed files with 1 additions and 3 deletions
|
@ -147,13 +147,11 @@ module.exports = class HomeView extends View
|
|||
god.spells = @filterProgrammableComponents level.attributes.thangs, @generateSpellToSourceMap data.sessions
|
||||
god.createWorld()
|
||||
@god = god
|
||||
Backbone.Mediator.subscribe 'god:new-world-created', @onWorldCreated, @
|
||||
Backbone.Mediator.subscribeOnce 'god:new-world-created', @onWorldCreated, @
|
||||
|
||||
onWorldCreated: (data) ->
|
||||
return if @alreadyPostedResults
|
||||
taskResults = @translateGoalStatesIntoTaskResults data.goalStates
|
||||
console.log "Task Results"
|
||||
console.log taskResults
|
||||
@god?.destroy()
|
||||
|
||||
$.ajax
|
||||
|
|
Loading…
Reference in a new issue