mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-26 05:53:39 -04:00
Simulator now swaps in empty methods when code doesn't compile.
This commit is contained in:
parent
ebf6adb596
commit
2f653c966e
1 changed files with 6 additions and 1 deletions
|
@ -207,7 +207,12 @@ module.exports = class Simulator
|
|||
transpileSpell: (thang, spellKey, methodName) ->
|
||||
slugifiedThangID = _.string.slugify thang.id
|
||||
source = @currentUserCodeMap[[slugifiedThangID,methodName].join '/'] ? ""
|
||||
@spells[spellKey].thangs[thang.id].aether.transpile source
|
||||
aether = @spells[spellKey].thangs[thang.id].aether
|
||||
try
|
||||
aether.transpile source
|
||||
catch e
|
||||
console.log "Couldn't transpile #{spellKey}:\n#{source}\n", e
|
||||
aether.transpile ''
|
||||
|
||||
createAether: (methodName, method) ->
|
||||
aetherOptions =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue