Merge branch 'master' of https://github.com/codecombat/codecombat
Conflicts: app/lib/simulator/Simulator.coffee
This commit is contained in:
commit
65aae86dcc
3 changed files with 12 additions and 8 deletions
app
|
@ -55,6 +55,7 @@ module.exports = class Simulator extends CocoClass
|
||||||
console.log info
|
console.log info
|
||||||
@trigger 'statusUpdate', info
|
@trigger 'statusUpdate', info
|
||||||
@simulateAnotherTaskAfterDelay()
|
@simulateAnotherTaskAfterDelay()
|
||||||
|
application.tracker?.trackEvent 'Simulator Result', label: "No Games"
|
||||||
|
|
||||||
simulateAnotherTaskAfterDelay: =>
|
simulateAnotherTaskAfterDelay: =>
|
||||||
console.log "Retrying in #{@retryDelayInSeconds}"
|
console.log "Retrying in #{@retryDelayInSeconds}"
|
||||||
|
@ -170,6 +171,7 @@ module.exports = class Simulator extends CocoClass
|
||||||
unless @options.headlessClient
|
unless @options.headlessClient
|
||||||
simulatedBy = parseInt($('#simulated-by-you').text(), 10) + 1
|
simulatedBy = parseInt($('#simulated-by-you').text(), 10) + 1
|
||||||
$('#simulated-by-you').text(simulatedBy)
|
$('#simulated-by-you').text(simulatedBy)
|
||||||
|
application.tracker?.trackEvent 'Simulator Result', label: "Success"
|
||||||
|
|
||||||
handleTaskResultsTransferError: (error) =>
|
handleTaskResultsTransferError: (error) =>
|
||||||
@trigger 'statusUpdate', 'There was an error sending the results back to the server.'
|
@trigger 'statusUpdate', 'There was an error sending the results back to the server.'
|
||||||
|
@ -271,6 +273,7 @@ module.exports = class Simulator extends CocoClass
|
||||||
if spellTeam not in playerTeams then useProtectAPI = false
|
if spellTeam not in playerTeams then useProtectAPI = false
|
||||||
@spells[spellKey].thangs[thang.id].aether = @createAether @spells[spellKey].name, method, useProtectAPI
|
@spells[spellKey].thangs[thang.id].aether = @createAether @spells[spellKey].name, method, useProtectAPI
|
||||||
|
|
||||||
|
|
||||||
transpileSpell: (thang, spellKey, methodName) ->
|
transpileSpell: (thang, spellKey, methodName) ->
|
||||||
slugifiedThangID = _.string.slugify thang.id
|
slugifiedThangID = _.string.slugify thang.id
|
||||||
generatedSpellKey = [slugifiedThangID,methodName].join '/'
|
generatedSpellKey = [slugifiedThangID,methodName].join '/'
|
||||||
|
|
|
@ -38,6 +38,7 @@ module.exports = class SimulateTabView extends CocoView
|
||||||
# Simulations
|
# Simulations
|
||||||
|
|
||||||
onSimulateButtonClick: (e) ->
|
onSimulateButtonClick: (e) ->
|
||||||
|
application.tracker?.trackEvent 'Simulate Button Click', {}
|
||||||
$("#simulate-button").prop "disabled", true
|
$("#simulate-button").prop "disabled", true
|
||||||
$("#simulate-button").text "Simulating..."
|
$("#simulate-button").text "Simulating..."
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ module.exports = class ProblemAlertView extends View
|
||||||
|
|
||||||
getRenderData: (context={}) ->
|
getRenderData: (context={}) ->
|
||||||
context = super context
|
context = super context
|
||||||
format = (s) -> s?.replace('<', '<').replace('>', '>').replace("\n", "<br>")
|
format = (s) -> s?.replace(/</g, '<').replace(/>/g, '>').replace(/\n/g, '<br>')
|
||||||
message = @problem.aetherProblem.message
|
message = @problem.aetherProblem.message
|
||||||
age = @problem.aetherProblem.userInfo.age
|
age = @problem.aetherProblem.userInfo.age
|
||||||
if age?
|
if age?
|
||||||
|
|
Reference in a new issue