diff --git a/app/schemas/models/level_component.coffee b/app/schemas/models/level_component.coffee index a89972b4d..a3b82e136 100644 --- a/app/schemas/models/level_component.coffee +++ b/app/schemas/models/level_component.coffee @@ -91,6 +91,12 @@ PropertyDocumentationSchema = c.object { {title: 'Description', type: 'string', description: 'Description of the return value.', maxLength: 1000} ] i18n: { type: 'object', format: 'i18n', props: ['description'], description: 'Help translate this return value'} + autoCompletePriority: + type: 'number' + title: 'Autocomplete Priority' + description: 'How important this property is to autocomplete.' + minimum: 0 + default: 1.0 DependencySchema = c.object { title: 'Component Dependency' diff --git a/app/views/play/level/tome/SpellView.coffee b/app/views/play/level/tome/SpellView.coffee index 7756622d7..afc552073 100644 --- a/app/views/play/level/tome/SpellView.coffee +++ b/app/views/play/level/tome/SpellView.coffee @@ -436,6 +436,7 @@ module.exports = class SpellView extends CocoView meta: $.i18n.t('keyboard_shortcuts.press_enter', defaultValue: 'press enter') name: doc.name tabTrigger: doc.snippets[e.language].tab + importance: doc.autoCompletePriority ? 1.0 haveFindNearestEnemy ||= doc.name is 'findNearestEnemy' haveFindNearest ||= doc.name is 'findNearest' if doc.name is 'attack'