Fixed a few more Backbone Mediator event validation issues.

This commit is contained in:
Nick Winter 2014-08-27 16:31:39 -07:00
parent 1a452baf3c
commit 3f16aaab61
4 changed files with 3 additions and 7 deletions

View file

@ -88,7 +88,7 @@ module.exports = ScriptManager = class ScriptManager extends CocoClass
scriptStates: scriptStates
timeSinceLastScriptEnded: (if @lastScriptEnded then now - @lastScriptEnded else 0) / 1000
Backbone.Mediator.publish 'script:tick', stateEvent # Is this even needed?
Backbone.Mediator.publish 'script:tick', stateEvent # Used to trigger level scripts.
loadFromSession: ->
# load the queue with note groups to skip through

View file

@ -109,10 +109,6 @@ NoteGroupSchema = c.object {title: 'Note Group', description: 'A group of notes
lock: {title: 'Lock', description: 'Whether the interface should be locked so that the player\'s focus is on the script, or specific areas to lock.', type: ['boolean', 'array'], items: {type: 'string', enum: ['surface', 'editor', 'palette', 'hud', 'playback', 'playback-hover', 'level']}}
letterbox: {type: 'boolean', title: 'Letterbox', description: 'Turn letterbox mode on or off. Disables surface and playback controls.'}
goals: c.object {title: 'Goals (Old)', description: 'Deprecated. Goals added here have no effect. Add goals in the level settings instead.'},
add: c.array {title: 'Add', description: 'Deprecated. Goals added here have no effect. Add goals in the level settings instead.'}, {}
remove: c.array {title: 'Remove', description: 'Deprecated. Goals removed here have no effect. Adjust goals in the level settings instead.'}, {}
playback: c.object {title: 'Playback', description: 'Control the playback of the level.'},
playing: {type: 'boolean', title: 'Set Playing', description: 'Set whether playback is playing or paused.'}
scrub: c.object {title: 'Scrub', description: 'Scrub the level playback time to a certain point.', default: {offset: 2, duration: 1000, toRatio: 0.5}},

View file

@ -16,7 +16,7 @@ goalStatesSchema =
{type: 'integer', minimum: 0}
{type: 'string', enum: ['end']}
]
team: {type: ['null', 'string']}
team: {type: ['null', 'string', 'undefined']}
worldUpdatedEventSchema = c.object {required: ['world', 'firstWorld', 'goalStates', 'team', 'firstChangedFrame']},
world: {type: 'object'}

View file

@ -140,7 +140,7 @@ module.exports =
{type: 'integer', minimum: 0}
{type: 'string', enum: ['end']}
]
team: {type: ['null', 'string']}
team: {type: ['null', 'string', 'undefined']}
goals: c.array {},
{type: 'object'}
overallStatus: