diff --git a/app/lib/LevelOptions.coffee b/app/lib/LevelOptions.coffee index 4470c4ebe..4b82d8764 100644 --- a/app/lib/LevelOptions.coffee +++ b/app/lib/LevelOptions.coffee @@ -1,5 +1,6 @@ module.exports = LevelOptions = 'dungeons-of-kithgard': + disableSpaces: true hidesSubmitUntilRun: true hidesPlayButton: true hidesRunShortcut: true @@ -10,6 +11,7 @@ module.exports = LevelOptions = requiredGear: {feet: 'simple-boots'} restrictedGear: {feet: 'leather-boots'} 'gems-in-the-deep': + disableSpaces: true hidesSubmitUntilRun: true hidesPlayButton: true hidesRunShortcut: true @@ -20,6 +22,7 @@ module.exports = LevelOptions = requiredGear: {feet: 'simple-boots'} restrictedGear: {feet: 'leather-boots'} 'shadow-guard': + disableSpaces: true hidesSubmitUntilRun: true hidesPlayButton: true hidesRunShortcut: true @@ -30,6 +33,7 @@ module.exports = LevelOptions = requiredGear: {feet: 'simple-boots'} restrictedGear: {feet: 'leather-boots', 'right-hand': 'simple-sword'} 'kounter-kithwise': + disableSpaces: true hidesPlayButton: true hidesRunShortcut: true hidesHUD: true @@ -48,6 +52,7 @@ module.exports = LevelOptions = requiredGear: {feet: 'simple-boots'} restrictedGear: {feet: 'leather-boots', 'right-hand': 'simple-sword', 'programming-book': 'programmaticon-i'} 'forgetful-gemsmith': + disableSpaces: true hidesPlayButton: true hidesRunShortcut: true hidesHUD: true @@ -57,6 +62,7 @@ module.exports = LevelOptions = requiredGear: {feet: 'simple-boots'} restrictedGear: {feet: 'leather-boots', 'programming-book': 'programmaticon-i'} 'true-names': + disableSpaces: true hidesPlayButton: true hidesRunShortcut: true hidesHUD: true @@ -66,6 +72,7 @@ module.exports = LevelOptions = requiredGear: {feet: 'simple-boots', 'right-hand': 'simple-sword', waist: 'leather-belt'} restrictedGear: {feet: 'leather-boots'} 'favorable-odds': + disableSpaces: true hidesRunShortcut: true hidesHUD: true hidesSay: true @@ -74,6 +81,7 @@ module.exports = LevelOptions = requiredGear: {feet: 'simple-boots', 'right-hand': 'simple-sword'} restrictedGear: {feet: 'leather-boots'} 'the-raised-sword': + disableSpaces: true hidesRunShortcut: true hidesHUD: true hidesSay: true diff --git a/app/views/play/level/tome/SpellView.coffee b/app/views/play/level/tome/SpellView.coffee index cb4e05143..986eb749b 100644 --- a/app/views/play/level/tome/SpellView.coffee +++ b/app/views/play/level/tome/SpellView.coffee @@ -189,7 +189,7 @@ module.exports = class SpellView extends CocoView bindKey: {win: 'Ctrl-Shift-M', mac: 'Command-Shift-M|Ctrl-Shift-M'} exec: -> Backbone.Mediator.publish 'tome:toggle-maximize', {} addCommand - # TODO: Restrict to beginner campaign levels + # TODO: Restrict to beginner campaign levels, possibly with a CampaignOptions similar to LevelOptions name: 'enter-skip-delimiters' bindKey: 'Enter|Return' exec: => @@ -202,6 +202,10 @@ module.exports = class SpellView extends CocoView newRange.setEnd newRange.end.row, newRange.end.column + delimMatch[1].length @aceSession.selection.setSelectionRange newRange @ace.execCommand 'insertstring', '\n' + addCommand + name: 'disable-spaces' + bindKey: 'Space' + exec: => @ace.execCommand 'insertstring', ' ' unless LevelOptions[@options.level.get('slug')]?.disableSpaces fillACE: -> @ace.setValue @spell.source