Added support for internationalizing audio scripts in levels.

This commit is contained in:
Scott Erickson 2014-10-29 10:38:01 -07:00
parent 642fda9520
commit 6b0a196076
2 changed files with 2 additions and 2 deletions

View file

@ -39,7 +39,7 @@ module.exports = class SpritesScriptModule extends ScriptModule
response.text = utils.i18n response, 'text'
text = utils.i18n sprite.say, 'text'
blurb = utils.i18n sprite.say, 'blurb'
sound = sprite.say.sound # TODO support sound i18n
sound = utils.i18n sprite.say, 'sound'
note =
channel: 'level:sprite-dialogue'
event:

View file

@ -89,7 +89,7 @@ SpriteCommandSchema = c.object {title: 'Thang Command', description: 'Make a tar
ogg: c.shortString(title: 'OGG', format: 'sound-file')
preload: {title: 'Preload', description: 'Whether to load this sound file before the level can begin (typically for the first dialogue of a level).', type: 'boolean' }
responses: c.array {title: 'Buttons', description: 'An array of buttons to include with the dialogue, with which the user can respond.'}, ResponseSchema
i18n: {type: 'object', format: 'i18n', props: ['blurb', 'text'], description: 'Help translate this message'}
i18n: {type: 'object', format: 'i18n', props: ['blurb', 'text', 'sound'], description: 'Help translate this message'}
move: c.object {title: 'Move', description: 'Tell the Thang to move.', required: ['target'], default: {target: {}, duration: 500}},
target: _.extend _.cloneDeep(PointSchema), {title: 'Target', description: 'Target point to which the Thang will move.', default: {x: 20, y: 20}}
duration: {title: 'Duration', description: 'Number of milliseconds over which to move, or 0 for an instant move.', type: 'integer', minimum: 0, format: 'milliseconds'}