Difference between revisions of "Template:Infobox/Part"

From Kerbal Space Program Wiki
Jump to: navigation, search
(Changed "Module" to "Role")
Line 2: Line 2:
 
! colspan="2" | {{{Name|{{PAGENAME}}}}}
 
! colspan="2" | {{{Name|{{PAGENAME}}}}}
 
|-
 
|-
| colspan="2" style="text-align: center;" | ''{{{Module|??}}}''
+
| colspan="2" style="text-align: center;" | ''{{{Role|??}}}''
 
|-
 
|-
 
| colspan="2" style="text-align: center;" | [[File:{{{File}}}|180px]]
 
| colspan="2" style="text-align: center;" | [[File:{{{File}}}|180px]]
Line 13: Line 13:
 
| colspan="2" style="text-align: center;" | <small>[[{{{cfg}}}|view parts.cfg]]</small>
 
| colspan="2" style="text-align: center;" | <small>[[{{{cfg}}}|view parts.cfg]]</small>
 
|}<includeonly>
 
|}<includeonly>
[[Category:{{{Module}}}]]
+
[[Category:{{{Role}}}]]
 
</includeonly><noinclude>
 
</includeonly><noinclude>
 
<br clear="both" />
 
<br clear="both" />
Line 19: Line 19:
 
<pre><nowiki>{{Partbox
 
<pre><nowiki>{{Partbox
 
|Name=
 
|Name=
|Module=
+
|Role=
 
|File=
 
|File=
 
|Costs=
 
|Costs=
Line 36: Line 36:
 
| Name || Name of the part. Defaults to ''<nowiki>{{PAGENAME}}</nowiki>'' || FL-T500 Fuel Tank || no
 
| Name || Name of the part. Defaults to ''<nowiki>{{PAGENAME}}</nowiki>'' || FL-T500 Fuel Tank || no
 
|-
 
|-
| Module || Module the part implements (see cfg) || FuelTank || '''yes'''
+
| Role || Role the part fulfills || Fuel Tank || '''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 54: Line 54:
 
{{Partbox
 
{{Partbox
 
|Name=FL-T500 Fuel Tank
 
|Name=FL-T500 Fuel Tank
|Module=FuelTank
+
|Role=Fuel Tank
 
|File=FL-T500 Fuel Tank.jpg
 
|File=FL-T500 Fuel Tank.jpg
 
|Costs=550
 
|Costs=550

Revision as of 16:31, 27 July 2011

Infobox/Part
??
[[File:{{{File}}}|180px]]
Costs  ??
Mass  ?? kg
[[{{{cfg}}}|view parts.cfg]]


Template

{{Partbox
|Name=
|Role=
|File=
|Costs=
|Mass=
|More=
|cfg=
}}

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
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
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
}}