mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-30 19:06:59 -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 =
|
module.exports = LevelOptions =
|
||||||
'dungeons-of-kithgard':
|
'dungeons-of-kithgard':
|
||||||
|
disableSpaces: true
|
||||||
hidesSubmitUntilRun: true
|
hidesSubmitUntilRun: true
|
||||||
hidesPlayButton: true
|
hidesPlayButton: true
|
||||||
hidesRunShortcut: true
|
hidesRunShortcut: true
|
||||||
|
@ -10,6 +11,7 @@ module.exports = LevelOptions =
|
||||||
requiredGear: {feet: 'simple-boots'}
|
requiredGear: {feet: 'simple-boots'}
|
||||||
restrictedGear: {feet: 'leather-boots'}
|
restrictedGear: {feet: 'leather-boots'}
|
||||||
'gems-in-the-deep':
|
'gems-in-the-deep':
|
||||||
|
disableSpaces: true
|
||||||
hidesSubmitUntilRun: true
|
hidesSubmitUntilRun: true
|
||||||
hidesPlayButton: true
|
hidesPlayButton: true
|
||||||
hidesRunShortcut: true
|
hidesRunShortcut: true
|
||||||
|
@ -20,6 +22,7 @@ module.exports = LevelOptions =
|
||||||
requiredGear: {feet: 'simple-boots'}
|
requiredGear: {feet: 'simple-boots'}
|
||||||
restrictedGear: {feet: 'leather-boots'}
|
restrictedGear: {feet: 'leather-boots'}
|
||||||
'shadow-guard':
|
'shadow-guard':
|
||||||
|
disableSpaces: true
|
||||||
hidesSubmitUntilRun: true
|
hidesSubmitUntilRun: true
|
||||||
hidesPlayButton: true
|
hidesPlayButton: true
|
||||||
hidesRunShortcut: true
|
hidesRunShortcut: true
|
||||||
|
@ -30,6 +33,7 @@ module.exports = LevelOptions =
|
||||||
requiredGear: {feet: 'simple-boots'}
|
requiredGear: {feet: 'simple-boots'}
|
||||||
restrictedGear: {feet: 'leather-boots', 'right-hand': 'simple-sword'}
|
restrictedGear: {feet: 'leather-boots', 'right-hand': 'simple-sword'}
|
||||||
'kounter-kithwise':
|
'kounter-kithwise':
|
||||||
|
disableSpaces: true
|
||||||
hidesPlayButton: true
|
hidesPlayButton: true
|
||||||
hidesRunShortcut: true
|
hidesRunShortcut: true
|
||||||
hidesHUD: true
|
hidesHUD: true
|
||||||
|
@ -48,6 +52,7 @@ module.exports = LevelOptions =
|
||||||
requiredGear: {feet: 'simple-boots'}
|
requiredGear: {feet: 'simple-boots'}
|
||||||
restrictedGear: {feet: 'leather-boots', 'right-hand': 'simple-sword', 'programming-book': 'programmaticon-i'}
|
restrictedGear: {feet: 'leather-boots', 'right-hand': 'simple-sword', 'programming-book': 'programmaticon-i'}
|
||||||
'forgetful-gemsmith':
|
'forgetful-gemsmith':
|
||||||
|
disableSpaces: true
|
||||||
hidesPlayButton: true
|
hidesPlayButton: true
|
||||||
hidesRunShortcut: true
|
hidesRunShortcut: true
|
||||||
hidesHUD: true
|
hidesHUD: true
|
||||||
|
@ -57,6 +62,7 @@ module.exports = LevelOptions =
|
||||||
requiredGear: {feet: 'simple-boots'}
|
requiredGear: {feet: 'simple-boots'}
|
||||||
restrictedGear: {feet: 'leather-boots', 'programming-book': 'programmaticon-i'}
|
restrictedGear: {feet: 'leather-boots', 'programming-book': 'programmaticon-i'}
|
||||||
'true-names':
|
'true-names':
|
||||||
|
disableSpaces: true
|
||||||
hidesPlayButton: true
|
hidesPlayButton: true
|
||||||
hidesRunShortcut: true
|
hidesRunShortcut: true
|
||||||
hidesHUD: true
|
hidesHUD: true
|
||||||
|
@ -66,6 +72,7 @@ module.exports = LevelOptions =
|
||||||
requiredGear: {feet: 'simple-boots', 'right-hand': 'simple-sword', waist: 'leather-belt'}
|
requiredGear: {feet: 'simple-boots', 'right-hand': 'simple-sword', waist: 'leather-belt'}
|
||||||
restrictedGear: {feet: 'leather-boots'}
|
restrictedGear: {feet: 'leather-boots'}
|
||||||
'favorable-odds':
|
'favorable-odds':
|
||||||
|
disableSpaces: true
|
||||||
hidesRunShortcut: true
|
hidesRunShortcut: true
|
||||||
hidesHUD: true
|
hidesHUD: true
|
||||||
hidesSay: true
|
hidesSay: true
|
||||||
|
@ -74,6 +81,7 @@ module.exports = LevelOptions =
|
||||||
requiredGear: {feet: 'simple-boots', 'right-hand': 'simple-sword'}
|
requiredGear: {feet: 'simple-boots', 'right-hand': 'simple-sword'}
|
||||||
restrictedGear: {feet: 'leather-boots'}
|
restrictedGear: {feet: 'leather-boots'}
|
||||||
'the-raised-sword':
|
'the-raised-sword':
|
||||||
|
disableSpaces: true
|
||||||
hidesRunShortcut: true
|
hidesRunShortcut: true
|
||||||
hidesHUD: true
|
hidesHUD: true
|
||||||
hidesSay: 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'}
|
bindKey: {win: 'Ctrl-Shift-M', mac: 'Command-Shift-M|Ctrl-Shift-M'}
|
||||||
exec: -> Backbone.Mediator.publish 'tome:toggle-maximize', {}
|
exec: -> Backbone.Mediator.publish 'tome:toggle-maximize', {}
|
||||||
addCommand
|
addCommand
|
||||||
# TODO: Restrict to beginner campaign levels
|
# TODO: Restrict to beginner campaign levels, possibly with a CampaignOptions similar to LevelOptions
|
||||||
name: 'enter-skip-delimiters'
|
name: 'enter-skip-delimiters'
|
||||||
bindKey: 'Enter|Return'
|
bindKey: 'Enter|Return'
|
||||||
exec: =>
|
exec: =>
|
||||||
|
@ -202,6 +202,10 @@ module.exports = class SpellView extends CocoView
|
||||||
newRange.setEnd newRange.end.row, newRange.end.column + delimMatch[1].length
|
newRange.setEnd newRange.end.row, newRange.end.column + delimMatch[1].length
|
||||||
@aceSession.selection.setSelectionRange newRange
|
@aceSession.selection.setSelectionRange newRange
|
||||||
@ace.execCommand 'insertstring', '\n'
|
@ace.execCommand 'insertstring', '\n'
|
||||||
|
addCommand
|
||||||
|
name: 'disable-spaces'
|
||||||
|
bindKey: 'Space'
|
||||||
|
exec: => @ace.execCommand 'insertstring', ' ' unless LevelOptions[@options.level.get('slug')]?.disableSpaces
|
||||||
|
|
||||||
fillACE: ->
|
fillACE: ->
|
||||||
@ace.setValue @spell.source
|
@ace.setValue @spell.source
|
||||||
|
|
Loading…
Reference in a new issue