Removed includeeFlow, since we're going to do it lazily with the debug worker.

This commit is contained in:
Nick Winter 2014-05-09 09:29:50 -07:00
parent bb7a28e3ad
commit c4819c647c
3 changed files with 3 additions and 20 deletions
app

View file

@ -82,7 +82,7 @@ module.exports = class God
when 'new-debug-world'
console.log "New Debug world!"
when 'console-log'
console.log "|" + @id + "'s " + @id + "|", event.data.args...
console.log "|" + @id + "'s debugger |", event.data.args...
when 'debug-value-return'
Backbone.Mediator.publish 'god:debug-value-return', event.data.serialized

View file

@ -15,7 +15,6 @@ module.exports = class Spell
@pathComponents = options.pathComponents
@session = options.session
@supermodel = options.supermodel
@skipFlow = options.skipFlow
@skipProtectAPI = options.skipProtectAPI
@worker = options.worker
p = options.programmableMethod
@ -117,13 +116,7 @@ module.exports = class Spell
globals: ['Vector', '_']
# 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.
includeFlow: not @skipFlow and @canRead()
#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
includeFlow: false
#console.log "creating aether with options", aetherOptions
aether = new Aether aetherOptions
workerMessage =

View file

@ -120,8 +120,7 @@ module.exports = class TomeView extends View
@thangSpells[thang.id].push spellKey
unless method.cloneOf
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, skipFlow: skipFlow, skipProtectAPI: skipProtectAPI, worker: @worker
spell = @spells[spellKey] = new Spell programmableMethod: method, spellKey: spellKey, pathComponents: pathPrefixComponents.concat(pathComponents), session: @options.session, supermodel: @supermodel, skipProtectAPI: skipProtectAPI, worker: @worker
for thangID, spellKeys of @thangSpells
thang = world.getThangByID thangID
if thang
@ -142,15 +141,6 @@ module.exports = class TomeView extends View
@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
onToggleSpellList: (e) ->