mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-05-04 09:53:55 -04:00
Removed includeeFlow, since we're going to do it lazily with the debug worker.
This commit is contained in:
parent
bb7a28e3ad
commit
c4819c647c
3 changed files with 3 additions and 20 deletions
app
|
@ -82,7 +82,7 @@ module.exports = class God
|
||||||
when 'new-debug-world'
|
when 'new-debug-world'
|
||||||
console.log "New Debug world!"
|
console.log "New Debug world!"
|
||||||
when 'console-log'
|
when 'console-log'
|
||||||
console.log "|" + @id + "'s " + @id + "|", event.data.args...
|
console.log "|" + @id + "'s debugger |", event.data.args...
|
||||||
when 'debug-value-return'
|
when 'debug-value-return'
|
||||||
Backbone.Mediator.publish 'god:debug-value-return', event.data.serialized
|
Backbone.Mediator.publish 'god:debug-value-return', event.data.serialized
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,6 @@ module.exports = class Spell
|
||||||
@pathComponents = options.pathComponents
|
@pathComponents = options.pathComponents
|
||||||
@session = options.session
|
@session = options.session
|
||||||
@supermodel = options.supermodel
|
@supermodel = options.supermodel
|
||||||
@skipFlow = options.skipFlow
|
|
||||||
@skipProtectAPI = options.skipProtectAPI
|
@skipProtectAPI = options.skipProtectAPI
|
||||||
@worker = options.worker
|
@worker = options.worker
|
||||||
p = options.programmableMethod
|
p = options.programmableMethod
|
||||||
|
@ -117,13 +116,7 @@ module.exports = class Spell
|
||||||
globals: ['Vector', '_']
|
globals: ['Vector', '_']
|
||||||
# TODO: Gridmancer doesn't currently work with protectAPI, so hack it off
|
# TODO: Gridmancer doesn't currently work with protectAPI, so hack it off
|
||||||
protectAPI: not (@skipProtectAPI or window.currentView?.level.get('name').match("Gridmancer")) and @permissions.readwrite.length > 0 # If anyone can write to this method, we must protect it.
|
protectAPI: not (@skipProtectAPI or window.currentView?.level.get('name').match("Gridmancer")) and @permissions.readwrite.length > 0 # If anyone can write to this method, we must protect it.
|
||||||
includeFlow: not @skipFlow and @canRead()
|
includeFlow: false
|
||||||
#callIndex: 0
|
|
||||||
#timelessVariables: ['i']
|
|
||||||
#statementIndex: 9001
|
|
||||||
if not (me.team in @permissions.readwrite) or window.currentView?.sessionID is "52bfb88099264e565d001349" # temp fix for debugger explosion bug
|
|
||||||
#console.log "Turning off includeFlow for", @spellKey
|
|
||||||
aetherOptions.includeFlow = false
|
|
||||||
#console.log "creating aether with options", aetherOptions
|
#console.log "creating aether with options", aetherOptions
|
||||||
aether = new Aether aetherOptions
|
aether = new Aether aetherOptions
|
||||||
workerMessage =
|
workerMessage =
|
||||||
|
|
|
@ -120,8 +120,7 @@ module.exports = class TomeView extends View
|
||||||
@thangSpells[thang.id].push spellKey
|
@thangSpells[thang.id].push spellKey
|
||||||
unless method.cloneOf
|
unless method.cloneOf
|
||||||
skipProtectAPI = @getQueryVariable "skip_protect_api", (@options.levelID in ['gridmancer'])
|
skipProtectAPI = @getQueryVariable "skip_protect_api", (@options.levelID in ['gridmancer'])
|
||||||
skipFlow = @getQueryVariable "skip_flow", (@options.levelID in ['brawlwood', 'greed', 'gold-rush'])
|
spell = @spells[spellKey] = new Spell programmableMethod: method, spellKey: spellKey, pathComponents: pathPrefixComponents.concat(pathComponents), session: @options.session, supermodel: @supermodel, skipProtectAPI: skipProtectAPI, worker: @worker
|
||||||
spell = @spells[spellKey] = new Spell programmableMethod: method, spellKey: spellKey, pathComponents: pathPrefixComponents.concat(pathComponents), session: @options.session, supermodel: @supermodel, skipFlow: skipFlow, skipProtectAPI: skipProtectAPI, worker: @worker
|
|
||||||
for thangID, spellKeys of @thangSpells
|
for thangID, spellKeys of @thangSpells
|
||||||
thang = world.getThangByID thangID
|
thang = world.getThangByID thangID
|
||||||
if thang
|
if thang
|
||||||
|
@ -142,15 +141,6 @@ module.exports = class TomeView extends View
|
||||||
@cast()
|
@cast()
|
||||||
|
|
||||||
cast: ->
|
cast: ->
|
||||||
if @options.levelID is 'brawlwood'
|
|
||||||
# For performance reasons, only includeFlow on the currently Thang.
|
|
||||||
for spellKey, spell of @spells
|
|
||||||
for thangID, spellThang of spell.thangs
|
|
||||||
hadFlow = Boolean spellThang.aether.options.includeFlow
|
|
||||||
willHaveFlow = spellThang is @spellView?.spellThang
|
|
||||||
spellThang.aether.options.includeFlow = spellThang.aether.originalOptions.includeFlow = willHaveFlow
|
|
||||||
spellThang.aether.transpile spell.source unless hadFlow is willHaveFlow
|
|
||||||
#console.log "set includeFlow to", spellThang.aether.options.includeFlow, "for", thangID, "of", spellKey
|
|
||||||
Backbone.Mediator.publish 'tome:cast-spells', spells: @spells
|
Backbone.Mediator.publish 'tome:cast-spells', spells: @spells
|
||||||
|
|
||||||
onToggleSpellList: (e) ->
|
onToggleSpellList: (e) ->
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue