mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-12-03 04:17:12 -05:00
Merge branch 'master' into production
This commit is contained in:
commit
4305fa19dc
2 changed files with 6 additions and 3 deletions
|
@ -22,7 +22,10 @@ module.exports = class Spell
|
||||||
|
|
||||||
@name = p.name
|
@name = p.name
|
||||||
@permissions = read: p.permissions?.read ? [], readwrite: p.permissions?.readwrite ? [] # teams
|
@permissions = read: p.permissions?.read ? [], readwrite: p.permissions?.readwrite ? [] # teams
|
||||||
@useTranspiledCode = @permissions.readwrite.length and ((not _.contains(@session.get('teamSpells')[@session.get('team')],@spellKey)) or (@session.get('creator') isnt me.id) or @spectateView)
|
teamSpells = @session.get('teamSpells')
|
||||||
|
team = @session.get('team') ? 'humans'
|
||||||
|
@useTranspiledCode = @permissions.readwrite.length and ((teamSpells and not _.contains(teamSpells[team], @spellKey)) or (@session.get('creator') isnt me.id) or @spectateView)
|
||||||
|
console.log @spellKey, "using transpiled code?", @useTranspiledCode
|
||||||
@source = @originalSource = p.source
|
@source = @originalSource = p.source
|
||||||
@parameters = p.parameters
|
@parameters = p.parameters
|
||||||
if @permissions.readwrite.length and sessionSource = @session.getSourceFor(@spellKey)
|
if @permissions.readwrite.length and sessionSource = @session.getSourceFor(@spellKey)
|
||||||
|
|
|
@ -121,7 +121,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'])
|
||||||
spell = @spells[spellKey] = new Spell
|
spell = @spells[spellKey] = new Spell
|
||||||
programmableMethod: method
|
programmableMethod: method
|
||||||
spellKey: spellKey
|
spellKey: spellKey
|
||||||
pathComponents: pathPrefixComponents.concat(pathComponents)
|
pathComponents: pathPrefixComponents.concat(pathComponents)
|
||||||
|
@ -131,7 +131,7 @@ module.exports = class TomeView extends View
|
||||||
worker: @worker
|
worker: @worker
|
||||||
language: language
|
language: language
|
||||||
spectateView: @options.spectateView
|
spectateView: @options.spectateView
|
||||||
|
|
||||||
for thangID, spellKeys of @thangSpells
|
for thangID, spellKeys of @thangSpells
|
||||||
thang = world.getThangByID thangID
|
thang = world.getThangByID thangID
|
||||||
if thang
|
if thang
|
||||||
|
|
Loading…
Reference in a new issue