mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-27 17:45:40 -05:00
Add hintsB to level schema
This commit is contained in:
parent
6cd1bfac71
commit
ecb5169ca7
2 changed files with 12 additions and 1 deletions
|
@ -279,7 +279,14 @@ _.extend LevelSchema.properties,
|
|||
documentation: c.object {title: 'Documentation', description: 'Documentation articles relating to this level.', 'default': {specificArticles: [], generalArticles: []}},
|
||||
specificArticles: c.array {title: 'Specific Articles', description: 'Specific documentation articles that live only in this level.', uniqueItems: true }, SpecificArticleSchema
|
||||
generalArticles: c.array {title: 'General Articles', description: 'General documentation articles that can be linked from multiple levels.', uniqueItems: true}, GeneralArticleSchema
|
||||
hints: c.array {title: 'Hints', description: 'Hints that will be gradually revealed to the player.', uniqueItems: true }, {
|
||||
hints: c.array {title: 'Hints', description: 'Tips and tricks to help unstick a player for the level.', uniqueItems: true }, {
|
||||
type: 'object'
|
||||
properties: {
|
||||
body: {type: 'string', title: 'Content', description: 'The body content of the article, in Markdown.', format: 'markdown'}
|
||||
i18n: {type: 'object', format: 'i18n', props: ['body'], description: 'Help translate this hint'}
|
||||
}
|
||||
}
|
||||
hintsB: c.array {title: 'HintsB', description: '2nd style of hints for a/b testing significant variations', uniqueItems: true }, {
|
||||
type: 'object'
|
||||
properties: {
|
||||
body: {type: 'string', title: 'Content', description: 'The body content of the article, in Markdown.', format: 'markdown'}
|
||||
|
|
|
@ -34,6 +34,10 @@ module.exports = class I18NEditLevelView extends I18NEditModelView
|
|||
if i18n = hint.i18n
|
||||
name = "Hint #{index+1}"
|
||||
@wrapRow "'#{name}' body", ['body'], hint.body, i18n[lang]?.body, ['documentation', 'hints', index], 'markdown'
|
||||
for hint, index in @model.get('documentation')?.hintsB ? []
|
||||
if i18n = hint.i18n
|
||||
name = "Hint #{index+1}"
|
||||
@wrapRow "'#{name}' body", ['body'], hint.body, i18n[lang]?.body, ['documentation', 'hints', index], 'markdown'
|
||||
|
||||
# sprite dialogues
|
||||
for script, scriptIndex in @model.get('scripts') ? []
|
||||
|
|
Loading…
Reference in a new issue