mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-02-17 08:50:58 -05:00
Added arg names or ... for functions which take arguments in spell palette entries.
This commit is contained in:
parent
a156edc0a2
commit
68497b2cf3
2 changed files with 7 additions and 3 deletions
|
@ -17,7 +17,7 @@ module.exports = class CastButtonView extends View
|
|||
@spells = options.spells
|
||||
@levelID = options.levelID
|
||||
isMac = navigator.platform.toUpperCase().indexOf('MAC') isnt -1
|
||||
@castShortcut = "⇧↩"
|
||||
@castShortcut = "⇧↵"
|
||||
@castShortcutVerbose = "Shift+Enter"
|
||||
|
||||
getRenderData: (context={}) ->
|
||||
|
@ -35,7 +35,7 @@ module.exports = class CastButtonView extends View
|
|||
# TODO: use a User setting instead of localStorage
|
||||
delay = localStorage.getItem 'autocastDelay'
|
||||
delay ?= 5000
|
||||
if @levelID is 'project-dota'
|
||||
if @levelID in ['project-dota', 'brawlwood', 'ladder-tutorial']
|
||||
delay = 90019001
|
||||
@setAutocastDelay delay
|
||||
|
||||
|
|
|
@ -83,7 +83,11 @@ module.exports = class SpellPaletteEntryView extends View
|
|||
@doc.shortName = @doc.shorterName = @doc.title = @doc.name
|
||||
else
|
||||
@doc.owner ?= 'this'
|
||||
suffix = if @doc.type is 'function' then '()' else ''
|
||||
suffix = ''
|
||||
if @doc.type is 'function'
|
||||
argNames = (arg.name for arg in @doc.args ? []).join(', ')
|
||||
argNames = '...' if argNames.length > 6
|
||||
suffix = "(#{argNames})"
|
||||
@doc.shortName = "#{@doc.owner}.#{@doc.name}#{suffix};"
|
||||
if @doc.owner is 'this' or options.tabbify
|
||||
@doc.shorterName = "#{@doc.name}#{suffix}"
|
||||
|
|
Loading…
Reference in a new issue