Merge branch 'master' into production

This commit is contained in:
Nick Winter 2014-06-21 12:51:20 -07:00
commit 2552cb511a
2 changed files with 4 additions and 2 deletions

View file

@ -8,8 +8,8 @@ CocoClass = require 'lib/CocoClass'
module.exports = class Angel extends CocoClass
@nicks: ['Archer', 'Lana', 'Cyril', 'Pam', 'Cheryl', 'Woodhouse', 'Ray', 'Krieger']
infiniteLoopIntervalDuration: 7500 # check this often
infiniteLoopTimeoutDuration: 10000 # wait this long for a response when checking
infiniteLoopIntervalDuration: 10000 # check this often; must be longer than other two combined
infiniteLoopTimeoutDuration: 7500 # wait this long for a response when checking
abortTimeoutDuration: 500 # give in-process or dying workers this long to give up
constructor: (@shared) ->
@ -58,6 +58,7 @@ module.exports = class Angel extends CocoClass
when 'start-load-frames'
clearTimeout @condemnTimeout
when 'report-in'
@say "Worker reported in."
clearTimeout @condemnTimeout
when 'end-load-frames'
clearTimeout @condemnTimeout

View file

@ -164,6 +164,7 @@ module.exports = class Spell
isEnemySpell: ->
return false unless @permissions.readwrite.length
return false unless @otherSession
teamSpells = @session.get('teamSpells')
team = @session.get('team') ? 'humans'
teamSpells and not _.contains(teamSpells[team], @spellKey)