Difference between revisions of "Template:Infobox/Part"
From Kerbal Space Program Wiki
m (formatting) |
|||
Line 1: | Line 1: | ||
− | {| border="0" style="padding-left: 10px; padding-right: 10px; float:right; width:200px; border: 1px solid | + | {| border="0" style="padding-left: 10px; padding-right: 10px; float:right; width:200px; border: 1px solid #cccccc; background-color:#f0f0f0" |
! colspan="2" | {{{Name|{{PAGENAME}}}}} | ! colspan="2" | {{{Name|{{PAGENAME}}}}} | ||
|- | |- | ||
− | | colspan="2" style="text-align: center;" | ''{{{Role|??}}}'' | + | | colspan="2" style="text-align: center;" | ''{{{Role|??}}}'' <small>([[{{{Class|??}}}]])</small> |
|- | |- | ||
− | | colspan="2" style="text-align: center;" | [[File:{{{File|Image needed.jpg}}} | + | | colspan="2" style="text-align: center;" | [[File:{{{File|Image needed.jpg}}}|180px]] |
|- | |- | ||
| Costs || {{{Costs|??}}} | | Costs || {{{Costs|??}}} | ||
Line 14: | Line 14: | ||
|- | |- | ||
| colspan="2" style="text-align: center;" | <small>[[{{{cfg}}}|view part.cfg]]</small> | | colspan="2" style="text-align: center;" | <small>[[{{{cfg}}}|view part.cfg]]</small> | ||
− | |}<includeonly> | + | |} |
+ | <includeonly> | ||
[[Category:{{{Role}}}]] | [[Category:{{{Role}}}]] | ||
− | </includeonly><noinclude> | + | </includeonly> |
+ | <noinclude> | ||
<br clear="both" /> | <br clear="both" /> | ||
== Template == | == Template == | ||
Line 28: | Line 30: | ||
|since= | |since= | ||
|cfg= | |cfg= | ||
+ | |Class= | ||
}}</nowiki></pre> | }}</nowiki></pre> | ||
Line 40: | Line 43: | ||
|- | |- | ||
| Role || Role the part fulfills || Fuel Tank || '''yes''' | | Role || Role the part fulfills || Fuel Tank || '''yes''' | ||
+ | |- | ||
+ | | Class || The Part Module the part uses || FuelTank || '''yes''' | ||
|- | |- | ||
| File || Name of the file to be displayed || FL-T500 Fuel Tank.jpg || '''yes''' | | File || Name of the file to be displayed || FL-T500 Fuel Tank.jpg || '''yes''' | ||
Line 67: | Line 72: | ||
{{PB-more|Fuel|500}} | {{PB-more|Fuel|500}} | ||
|cfg=Parts/FuelTank/parts.cfg | |cfg=Parts/FuelTank/parts.cfg | ||
+ | |Class=FuelTank | ||
}} | }} | ||
</nowiki></pre> | </nowiki></pre> |
Revision as of 22:42, 19 March 2012
Infobox/Part | |
---|---|
?? (??) | |
180px | |
Costs | ?? |
Mass | ?? kg |
since | ?? |
[[{{{cfg}}}|view part.cfg]] |
Template
{{Partbox |Name= |Role= |File= |Costs= |Mass= |More= |since= |cfg= |Class= }}
Usage
This templates takes the following arguments:
Argument | Explanation | Example | mandatory? |
---|---|---|---|
Name | Name of the part. Defaults to {{PAGENAME}} | FL-T500 Fuel Tank | no |
Role | Role the part fulfills | Fuel Tank | yes |
Class | The Part Module the part uses | 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 |
since | Version the part first appeared in | 0.7.3 | yes |
cfg | Link to cfg-entry in wiki | Parts/FuelTank/parts.cfg | yes |
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 |Role=Fuel Tank |File=FL-T500 Fuel Tank.jpg |Costs=550 |Mass=25 |More= {{PB-more|Dry Mass|0.3 kg}} {{PB-more|Fuel|500}} |cfg=Parts/FuelTank/parts.cfg |Class=FuelTank }}