mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-26 05:53:39 -04:00
Fix #3642: AIs using aiSource now don't need API protection (with new Aether)
This commit is contained in:
parent
41f062fce8
commit
d2634e63ed
1 changed files with 2 additions and 1 deletions
|
@ -46,6 +46,7 @@ module.exports = class Spell
|
|||
@source = sessionSource
|
||||
if p.aiSource and not @otherSession and not @canWrite()
|
||||
@source = @originalSource = p.aiSource
|
||||
@isAISource = true
|
||||
@thangs = {}
|
||||
if @canRead() # We can avoid creating these views if we'll never use them.
|
||||
@view = new SpellView {spell: @, level: options.level, session: @session, otherSession: @otherSession, worker: @worker, god: options.god, @supermodel}
|
||||
|
@ -162,7 +163,7 @@ module.exports = class Spell
|
|||
cb(aether.hasChangedSignificantly((newSource ? @originalSource), (currentSource ? @source), true, true))
|
||||
|
||||
createAether: (thang) ->
|
||||
writable = @permissions.readwrite.length > 0
|
||||
writable = @permissions.readwrite.length > 0 and not @isAISource
|
||||
skipProtectAPI = @skipProtectAPI or not writable
|
||||
problemContext = @createProblemContext thang
|
||||
includeFlow = (@levelType in ['hero', 'hero-ladder', 'hero-coop', 'course', 'course-ladder', 'game-dev']) and not skipProtectAPI
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue