Difference between revisions of "Template:Infobox/Part"
From Kerbal Space Program Wiki
(Box for parts) |
|||
Line 14: | Line 14: | ||
</includeonly><noinclude> | </includeonly><noinclude> | ||
<br clear="both" /> | <br clear="both" /> | ||
+ | == Template == | ||
+ | <pre><nowiki>{{Partbox | ||
+ | |Name= | ||
+ | |Module= | ||
+ | |File= | ||
+ | |Costs= | ||
+ | |Mass= | ||
+ | |More= | ||
+ | }}</nowiki></pre> | ||
+ | |||
== Usage == | == Usage == | ||
This templates takes the following arguments: | This templates takes the following arguments: | ||
Line 34: | Line 44: | ||
|} | |} | ||
− | == | + | === More fields === |
− | <pre><nowiki>{{Partbox | + | Many fields are module-specific. As it is difficult to use pipes '''|''' in templates, the template {{Template|PB-more}} is used. Refer to this example: |
− | |Name= | + | <pre><nowiki> |
− | |Module= | + | {{Partbox |
− | |File= | + | |Name=FL-T500 Fuel Tank |
− | |Costs= | + | |Module=FuelTank |
− | |Mass= | + | |File=FL-T500 Fuel Tank.jpg |
+ | |Costs=550 | ||
+ | |Mass=25 | ||
|More= | |More= | ||
− | }}</nowiki></pre> | + | {{PB-more|Dry Mass|0.3 kg}} |
+ | {{PB-more|Fuel|500}} | ||
+ | }} | ||
+ | </nowiki></pre> | ||
[[Category:Template]] | [[Category:Template]] | ||
</noinclude> | </noinclude> |
Revision as of 14:56, 27 July 2011
Infobox/Part | |
---|---|
?? | |
[[File:{{{File}}}|180px]] | |
Costs | ?? |
Mass | ?? kg |
Template
{{Partbox |Name= |Module= |File= |Costs= |Mass= |More= }}
Usage
This templates takes the following arguments:
Argument | Explanation | Example | mandatory? |
---|---|---|---|
Name | Name of the part. Defaults to {{PAGENAME}} | FL-T500 Fuel Tank | no |
Module | Module the part implements (see cfg) | FuelTank | yes |
File | Name of the file to be displayed | FL-T500 Fuel Tank.jpg | yes |
Costs | Costs of the part | 550 | yes |
Mass | Mass of the part | 2.5 | yes |
More | More module-specific information | (see below) | no |
More fields
Many fields are module-specific. As it is difficult to use pipes | in templates, the template {{PB-more}} is used. Refer to this example:
{{Partbox |Name=FL-T500 Fuel Tank |Module=FuelTank |File=FL-T500 Fuel Tank.jpg |Costs=550 |Mass=25 |More= {{PB-more|Dry Mass|0.3 kg}} {{PB-more|Fuel|500}} }}