mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-27 17:45:40 -05:00
Disable spaces through The Raised Sword
This commit is contained in:
parent
5ee1289621
commit
957ca50c87
2 changed files with 13 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue