2014-02-12 19:42:09 -05:00
|
|
|
h4
|
2014-11-19 18:01:20 -05:00
|
|
|
span.prop-name= doc.shortName
|
2014-02-12 19:42:09 -05:00
|
|
|
| -
|
2016-04-25 16:47:59 -04:00
|
|
|
code.prop-type(data-i18n='skill_docs.'+(doc.type == 'function' && doc.owner == 'this' ? 'method' : doc.type))
|
|
|
|
// In case there's no translation in en.coffee because we missed one
|
|
|
|
= (doc.type == 'function' && doc.owner == 'this') ? 'method' : doc.type
|
2014-02-12 19:42:09 -05:00
|
|
|
if doc.type != 'function'
|
2014-11-23 15:52:34 -05:00
|
|
|
| (
|
2014-07-15 22:25:53 -04:00
|
|
|
if writable
|
2014-11-23 15:52:34 -05:00
|
|
|
span(data-i18n="skill_docs.writable") writable
|
2014-07-15 22:25:53 -04:00
|
|
|
else
|
2014-11-23 15:52:34 -05:00
|
|
|
span(data-i18n="skill_docs.read_only") read-only
|
|
|
|
| )
|
2014-02-12 19:42:09 -05:00
|
|
|
|
2016-04-25 16:20:47 -04:00
|
|
|
if doc.translatedShortName
|
|
|
|
h5
|
|
|
|
span.translated-name= doc.translatedShortName
|
|
|
|
|
2014-07-20 18:51:42 -04:00
|
|
|
.description
|
|
|
|
p!= marked(doc.description || 'Still undocumented, sorry.')
|
|
|
|
if cooldowns && (cooldowns.cooldown || cooldowns.specificCooldown)
|
|
|
|
p
|
|
|
|
span
|
2015-09-03 08:10:06 -04:00
|
|
|
if cooldowns.type == 'spell'
|
|
|
|
span(data-i18n="skill_docs.spell") Spell
|
|
|
|
else
|
|
|
|
span(data-i18n="skill_docs.action") Action
|
2014-11-23 15:52:34 -05:00
|
|
|
span.spl(data-i18n="skill_docs.action_name") name
|
|
|
|
span.spr :
|
2014-07-20 18:51:42 -04:00
|
|
|
code "#{cooldowns.name}"
|
|
|
|
| .
|
|
|
|
span.spl
|
2014-11-23 15:52:34 -05:00
|
|
|
span(data-i18n="skill_docs.action_cooldown") Takes
|
|
|
|
span.spr :
|
2014-07-20 18:51:42 -04:00
|
|
|
code= cooldowns.cooldown
|
|
|
|
| s.
|
|
|
|
if cooldowns.specificCooldown
|
|
|
|
span.spl
|
2014-11-23 15:52:34 -05:00
|
|
|
span(data-i18n="skill_docs.action_specific_cooldown") Cooldown
|
|
|
|
span.spr :
|
2014-07-20 18:51:42 -04:00
|
|
|
code= cooldowns.specificCooldown
|
|
|
|
| s.
|
|
|
|
if cooldowns.damage
|
|
|
|
span.spl
|
2014-11-23 15:52:34 -05:00
|
|
|
span(data-i18n="skill_docs.action_damage") Damage
|
|
|
|
span.spr :
|
2014-07-20 18:51:42 -04:00
|
|
|
code= cooldowns.damage
|
|
|
|
| .
|
|
|
|
if cooldowns.range
|
|
|
|
span.spl
|
2014-11-23 15:52:34 -05:00
|
|
|
span(data-i18n="skill_docs.action_range") Range
|
|
|
|
span.spr :
|
2014-07-20 18:51:42 -04:00
|
|
|
code= cooldowns.range
|
|
|
|
| m.
|
|
|
|
if cooldowns.radius
|
|
|
|
span.spl
|
2014-11-23 15:52:34 -05:00
|
|
|
span(data-i18n="skill_docs.action_radius") Radius
|
|
|
|
span.spr :
|
2014-07-20 18:51:42 -04:00
|
|
|
code= cooldowns.radius
|
|
|
|
| m.
|
|
|
|
if cooldowns.duration
|
|
|
|
span.spl
|
2014-11-23 15:52:34 -05:00
|
|
|
span(data-i18n="skill_docs.action_duration") Duration
|
|
|
|
span.spr :
|
2014-07-20 18:51:42 -04:00
|
|
|
code= cooldowns.duration
|
|
|
|
| s.
|
2014-02-12 19:42:09 -05:00
|
|
|
|
2014-07-15 22:25:53 -04:00
|
|
|
if !selectedMethod
|
|
|
|
if doc.example
|
|
|
|
p.example
|
2014-11-23 15:52:34 -05:00
|
|
|
strong
|
|
|
|
span(data-i18n="skill_docs.example") Example
|
|
|
|
| :
|
2014-11-26 15:33:29 -05:00
|
|
|
.docs-ace-container
|
|
|
|
.docs-ace= doc.example
|
2014-07-15 22:25:53 -04:00
|
|
|
else if doc.type == 'function' && argumentExamples.length
|
|
|
|
p.example
|
2014-11-23 15:52:34 -05:00
|
|
|
strong
|
|
|
|
span(data-i18n="skill_docs.example") Example
|
|
|
|
| :
|
2014-07-15 22:25:53 -04:00
|
|
|
div
|
2014-11-26 15:33:29 -05:00
|
|
|
.docs-ace-container
|
|
|
|
.docs-ace
|
|
|
|
if language == 'javascript'
|
2015-03-20 16:42:41 -04:00
|
|
|
span= doc.owner + '.' + docName + '(' + argumentExamples.join(', ') + ');'
|
2014-11-26 15:33:29 -05:00
|
|
|
else if language == 'coffeescript'
|
2015-03-20 16:42:41 -04:00
|
|
|
span= doc.ownerName + (doc.ownerName == '@' ? '' : '.') + docName + ' ' + argumentExamples.join(', ')
|
2014-11-26 15:33:29 -05:00
|
|
|
else if language == 'python'
|
2015-03-20 16:42:41 -04:00
|
|
|
span= doc.ownerName + '.' + docName + '(' + argumentExamples.join(', ') + ')'
|
2014-11-26 15:33:29 -05:00
|
|
|
else if language == 'clojure'
|
2015-03-20 16:42:41 -04:00
|
|
|
span= '(.' + docName + ' ' + doc.ownerName + ' ' + argumentExamples.join(', ') + ')'
|
2014-11-26 15:33:29 -05:00
|
|
|
else if language == 'lua'
|
2015-03-20 16:42:41 -04:00
|
|
|
span= doc.ownerName + ':' + docName + '(' + argumentExamples.join(', ') + ')'
|
2014-11-26 15:33:29 -05:00
|
|
|
else if language == 'io'
|
2015-03-20 16:42:41 -04:00
|
|
|
span= (doc.ownerName == 'this' ? '' : doc.ownerName + ' ') + docName + '(' + argumentExamples.join(', ') + ')'
|
2014-02-12 21:54:45 -05:00
|
|
|
|
2014-02-14 19:52:50 -05:00
|
|
|
if (doc.type != 'function' && doc.type != 'snippet') || doc.name == 'now'
|
2014-02-12 19:42:09 -05:00
|
|
|
p.value
|
2014-11-23 15:52:34 -05:00
|
|
|
strong
|
|
|
|
span(data-i18n="skill_docs.current_value") Current Value
|
|
|
|
span.spr :
|
2014-02-13 14:18:20 -05:00
|
|
|
pre
|
|
|
|
code.current-value(data-prop=doc.name)= value
|
2014-02-12 19:42:09 -05:00
|
|
|
|
|
|
|
if doc.args && doc.args.length
|
|
|
|
p.args
|
2014-11-23 15:52:34 -05:00
|
|
|
strong
|
|
|
|
span(data-i18n="skill_docs.parameters") Parameters
|
|
|
|
span.spr :
|
2014-02-12 19:42:09 -05:00
|
|
|
for arg in doc.args
|
|
|
|
div
|
|
|
|
code= arg.name
|
2014-11-23 15:52:34 -05:00
|
|
|
span.spr :
|
2014-02-12 19:42:09 -05:00
|
|
|
code= arg.type
|
|
|
|
if arg.example
|
2014-11-23 15:52:34 -05:00
|
|
|
| (
|
|
|
|
span(data-i18n="skill_docs.ex") ex
|
|
|
|
span.spr :
|
2014-02-12 19:42:09 -05:00
|
|
|
code= arg.example
|
|
|
|
| )
|
|
|
|
if arg.description
|
2014-02-12 21:54:45 -05:00
|
|
|
div!= marked(arg.description)
|
2014-02-12 19:42:09 -05:00
|
|
|
if arg.default
|
|
|
|
div
|
2014-11-23 15:52:34 -05:00
|
|
|
em
|
|
|
|
span(data-i18n="skill_docs.default_value") Default value
|
|
|
|
span.spr :
|
2014-02-12 19:42:09 -05:00
|
|
|
code= arg.default
|
2014-11-23 15:52:34 -05:00
|
|
|
|
2014-02-20 14:57:04 -05:00
|
|
|
if doc.returns
|
|
|
|
p.returns
|
2014-11-23 15:52:34 -05:00
|
|
|
strong
|
|
|
|
span(data-i18n="skill_docs.returns") Returns
|
|
|
|
span.spr :
|
2014-02-20 14:57:04 -05:00
|
|
|
div
|
|
|
|
code= doc.returns.type
|
|
|
|
if doc.returns.example
|
2014-11-23 15:52:34 -05:00
|
|
|
| (
|
|
|
|
span(data-i18n="skill_docs.ex") ex
|
|
|
|
span.spr :
|
2014-02-20 14:57:04 -05:00
|
|
|
code= doc.returns.example
|
|
|
|
| )
|
|
|
|
if doc.returns.description
|
|
|
|
div!= marked(doc.returns.description)
|
2014-07-15 22:25:53 -04:00
|
|
|
|
2014-10-17 00:38:11 -04:00
|
|
|
if item
|
|
|
|
p
|
2014-11-23 15:52:34 -05:00
|
|
|
em
|
|
|
|
span.spr(data-i18n="skill_docs.granted_by") Granted by
|
|
|
|
| #{item.get('name')}.
|
2014-10-17 00:38:11 -04:00
|
|
|
|
2014-07-15 22:25:53 -04:00
|
|
|
if selectedMethod
|
|
|
|
p
|
2016-04-25 16:20:47 -04:00
|
|
|
em Write the body of this method below.
|