mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-23 23:58:02 -05:00
Don't preload when player hasn't finished typing this or self.
This commit is contained in:
parent
d79d40b98c
commit
b7fe9398d5
1 changed files with 2 additions and 1 deletions
|
@ -476,8 +476,9 @@ module.exports = class SpellView extends CocoView
|
|||
currentLine = _.string.rtrim(@aceDoc.$lines[cursorPosition.row].replace(/[ \t]*\/\/[^"']*/g, '')) # trim // unless inside "
|
||||
endOfLine = cursorPosition.column >= currentLine.length # just typed a semicolon or brace, for example
|
||||
beginningOfLine = not currentLine.substr(0, cursorPosition.column).trim().length # uncommenting code, for example
|
||||
incompleteThis = /^(s|se|sel|self|t|th|thi|this)$/.test currentLine.trim()
|
||||
#console.log 'finished?', valid, endOfLine, beginningOfLine, cursorPosition, currentLine.length, aether, new Date() - 0, currentLine
|
||||
if valid and (endOfLine or beginningOfLine)
|
||||
if valid and (endOfLine or beginningOfLine) and not incompleteThis
|
||||
if @autocastDelay > 60000
|
||||
@preload()
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue