Added showsGuide and type properties to level.

This commit is contained in:
Scott Erickson 2014-03-07 13:13:58 -08:00
parent be03485538
commit 17231bce06
2 changed files with 8 additions and 2 deletions
app/views/editor/level
server/levels

View file

@ -8,7 +8,12 @@ module.exports = class SettingsTabView extends View
id: 'editor-level-settings-tab-view'
className: 'tab-pane'
template: template
editableSettings: ['name', 'description', 'documentation', 'nextLevel', 'background', 'victory', 'i18n', 'icon', 'goals'] # not thangs or scripts or the backend stuff
# not thangs or scripts or the backend stuff
editableSettings: [
'name', 'description', 'documentation', 'nextLevel', 'background', 'victory', 'i18n', 'icon', 'goals',
'type', 'showsGuide'
]
subscriptions:
'level-loaded': 'onLevelLoaded'

View file

@ -226,7 +226,8 @@ _.extend LevelSchema.properties,
i18n: {type: "object", format: 'i18n', props: ['name', 'description'], description: "Help translate this level"}
icon: { type: 'string', format: 'image-file', title: 'Icon' }
goals: c.array {title: 'Goals', description: 'An array of goals which are visible to the player and can trigger scripts.'}, GoalSchema
type: c.shortString(title: "Type", description: "What kind of level this is.", "enum": ['campaign', 'ladder'])
showsGuide: c.shortString(title: "Shows Guide", description: "If the guide is shown at the beginning of the level.", "enum": ['first-time', 'always'])
c.extendBasicProperties LevelSchema, 'level'
c.extendSearchableProperties LevelSchema