Add picoCTFProblem field to levels

This commit is contained in:
Nick Winter 2016-02-10 14:16:54 -08:00
parent 61d2ce3dc5
commit 6800ea2ff7
4 changed files with 4 additions and 1 deletions

View file

@ -123,6 +123,7 @@ _.extend CampaignSchema.properties, {
tasks: c.array {title: 'Tasks', description: 'Tasks to be completed for this level.'}, c.task
concepts: c.array {title: 'Programming Concepts', description: 'Which programming concepts this level covers.'}, c.concept
picoCTFProblem: { type: 'string', description: 'Associated picoCTF problem ID, if this is a picoCTF level' }
#- normal properties
position: c.point2d()

View file

@ -354,6 +354,7 @@ _.extend LevelSchema.properties,
scoreTypes: c.array {title: 'Score Types', description: 'What metric to show leaderboards for.', uniqueItems: true},
c.shortString(title: 'Score Type', 'enum': ['time', 'damage-taken', 'damage-dealt', 'gold-collected', 'difficulty']) # TODO: good version of LoC; total gear value.
concepts: c.array {title: 'Programming Concepts', description: 'Which programming concepts this level covers.', uniqueItems: true}, c.concept
picoCTFProblem: { type: 'string', description: 'Associated picoCTF problem ID, if this is a picoCTF level' }
c.extendBasicProperties LevelSchema, 'level'

View file

@ -15,7 +15,7 @@ module.exports = class SettingsTabView extends CocoView
editableSettings: [
'name', 'description', 'documentation', 'nextLevel', 'background', 'victory', 'i18n', 'icon', 'goals',
'type', 'terrain', 'showsGuide', 'banner', 'employerDescription', 'loadingTip', 'requiresSubscription',
'helpVideos', 'replayable', 'scoreTypes', 'concepts'
'helpVideos', 'replayable', 'scoreTypes', 'concepts', 'picoCTFProblem'
]
subscriptions:

View file

@ -66,6 +66,7 @@ LevelHandler = class LevelHandler extends Handler
'buildTime'
'scoreTypes'
'concepts'
'picoCTFProblem'
]
postEditableProperties: ['name']