A few misc fixes.

This commit is contained in:
Nick Winter 2014-06-16 10:49:20 -07:00
parent 3d2bee3256
commit 9a64ca5973
4 changed files with 9 additions and 5 deletions

View file

@ -425,7 +425,7 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi
infinite_loop_reset_level: "Сбросить уровень"
infinite_loop_comment_out: "Закомментировать мой код"
# keyboard_shortcuts:
keyboard_shortcuts:
keyboard_shortcuts: "Горячие клавиши"
space: "Пробел"
enter: "Enter"

View file

@ -7,8 +7,8 @@ module.exports =
type: "object"
properties: # TODO
joined:
type: "boolean"
type: ["boolean", "null"]
players:
type: "object"
required: ["joined", "players"]
additionalProperties: false
additionalProperties: true

View file

@ -33,7 +33,7 @@ module.exports =
type: "object"
properties:
message:
type: "string"
type: "object"
bus:
$ref: "bus"

View file

@ -25,7 +25,11 @@ module.exports = class Spell
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 and not (me.isAdmin() or 'employer' in me.get('permissions'))) or @spectateView)
#console.log @spellKey, "using transpiled code?", @useTranspiledCode
if @useTranspiledCode
console.log "#{@spellKey} is using transpiled code because permissions.readwrite is #{@permissions.readwrite}
#{if @spectateView then ', we are spectating' else ''}
#{if teamSpells and not _.contains(teamSpells[team], @spellKey) then ', teamSpells[' + team + '] does not have ' + @spellKey + ' (just ' + teamSpells[team] + ')' else ''}
#{if @session.get('creator') isnt me.id then ', and the session was created by ' + @session.get('creator') + ' but I am ' + me.id else ''}"
@source = @originalSource = p.source
@parameters = p.parameters
if @permissions.readwrite.length and sessionSource = @session.getSourceFor(@spellKey)