mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-12-14 17:51:55 -05:00
148 lines
No EOL
4.3 KiB
Text
148 lines
No EOL
4.3 KiB
Text
h4
|
|
span.prop-name= doc.shortName
|
|
| -
|
|
code.prop-type= doc.type == 'function' && doc.owner == 'this' ? 'method' : doc.type
|
|
if doc.type != 'function'
|
|
| (
|
|
if writable
|
|
span(data-i18n="skill_docs.writable") writable
|
|
else
|
|
span(data-i18n="skill_docs.read_only") read-only
|
|
| )
|
|
|
|
.description
|
|
p!= marked(doc.description || 'Still undocumented, sorry.')
|
|
if cooldowns && (cooldowns.cooldown || cooldowns.specificCooldown)
|
|
p
|
|
span
|
|
if cooldowns.type == 'spell'
|
|
span(data-i18n="skill_docs.spell") Spell
|
|
else
|
|
span(data-i18n="skill_docs.action") Action
|
|
span.spl(data-i18n="skill_docs.action_name") name
|
|
span.spr :
|
|
code "#{cooldowns.name}"
|
|
| .
|
|
span.spl
|
|
span(data-i18n="skill_docs.action_cooldown") Takes
|
|
span.spr :
|
|
code= cooldowns.cooldown
|
|
| s.
|
|
if cooldowns.specificCooldown
|
|
span.spl
|
|
span(data-i18n="skill_docs.action_specific_cooldown") Cooldown
|
|
span.spr :
|
|
code= cooldowns.specificCooldown
|
|
| s.
|
|
if cooldowns.damage
|
|
span.spl
|
|
span(data-i18n="skill_docs.action_damage") Damage
|
|
span.spr :
|
|
code= cooldowns.damage
|
|
| .
|
|
if cooldowns.range
|
|
span.spl
|
|
span(data-i18n="skill_docs.action_range") Range
|
|
span.spr :
|
|
code= cooldowns.range
|
|
| m.
|
|
if cooldowns.radius
|
|
span.spl
|
|
span(data-i18n="skill_docs.action_radius") Radius
|
|
span.spr :
|
|
code= cooldowns.radius
|
|
| m.
|
|
if cooldowns.duration
|
|
span.spl
|
|
span(data-i18n="skill_docs.action_duration") Duration
|
|
span.spr :
|
|
code= cooldowns.duration
|
|
| s.
|
|
|
|
if !selectedMethod
|
|
if doc.example
|
|
p.example
|
|
strong
|
|
span(data-i18n="skill_docs.example") Example
|
|
| :
|
|
.docs-ace-container
|
|
.docs-ace= doc.example
|
|
else if doc.type == 'function' && argumentExamples.length
|
|
p.example
|
|
strong
|
|
span(data-i18n="skill_docs.example") Example
|
|
| :
|
|
div
|
|
.docs-ace-container
|
|
.docs-ace
|
|
if language == 'javascript'
|
|
span= doc.owner + '.' + docName + '(' + argumentExamples.join(', ') + ');'
|
|
else if language == 'coffeescript'
|
|
span= doc.ownerName + (doc.ownerName == '@' ? '' : '.') + docName + ' ' + argumentExamples.join(', ')
|
|
else if language == 'python'
|
|
span= doc.ownerName + '.' + docName + '(' + argumentExamples.join(', ') + ')'
|
|
else if language == 'clojure'
|
|
span= '(.' + docName + ' ' + doc.ownerName + ' ' + argumentExamples.join(', ') + ')'
|
|
else if language == 'lua'
|
|
span= doc.ownerName + ':' + docName + '(' + argumentExamples.join(', ') + ')'
|
|
else if language == 'io'
|
|
span= (doc.ownerName == 'this' ? '' : doc.ownerName + ' ') + docName + '(' + argumentExamples.join(', ') + ')'
|
|
|
|
if (doc.type != 'function' && doc.type != 'snippet') || doc.name == 'now'
|
|
p.value
|
|
strong
|
|
span(data-i18n="skill_docs.current_value") Current Value
|
|
span.spr :
|
|
pre
|
|
code.current-value(data-prop=doc.name)= value
|
|
|
|
if doc.args && doc.args.length
|
|
p.args
|
|
strong
|
|
span(data-i18n="skill_docs.parameters") Parameters
|
|
span.spr :
|
|
for arg in doc.args
|
|
div
|
|
code= arg.name
|
|
span.spr :
|
|
code= arg.type
|
|
if arg.example
|
|
| (
|
|
span(data-i18n="skill_docs.ex") ex
|
|
span.spr :
|
|
code= arg.example
|
|
| )
|
|
if arg.description
|
|
div!= marked(arg.description)
|
|
if arg.default
|
|
div
|
|
em
|
|
span(data-i18n="skill_docs.default_value") Default value
|
|
span.spr :
|
|
code= arg.default
|
|
|
|
if doc.returns
|
|
p.returns
|
|
strong
|
|
span(data-i18n="skill_docs.returns") Returns
|
|
span.spr :
|
|
div
|
|
code= doc.returns.type
|
|
if doc.returns.example
|
|
| (
|
|
span(data-i18n="skill_docs.ex") ex
|
|
span.spr :
|
|
code= doc.returns.example
|
|
| )
|
|
if doc.returns.description
|
|
div!= marked(doc.returns.description)
|
|
|
|
if item
|
|
p
|
|
em
|
|
span.spr(data-i18n="skill_docs.granted_by") Granted by
|
|
| #{item.get('name')}.
|
|
|
|
if selectedMethod
|
|
p
|
|
em Write the body of this method below. |