Difference between revisions of "Template:Infobox/Part/consumption"

From Kerbal Space Program Wiki
Jump to: navigation, search
m (Add category)
m (Add ability to use custom caption)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<includeonly>{{Infobox/Part/FuelConsumption|{{{1}}}|{{{2}}}|{{{3}}}||{{{4|}}}|{{{5|}}}|{{{6|}}}}}</includeonly>
+
<noinclude>{{Infobox/Part/preview|
 +
</noinclude>{{Infobox/Part/FuelConsumption/Cell|{{{1<noinclude>|5000</noinclude>}}}|{{FuelConsumption|{{{3<noinclude>|390</noinclude>}}}|{{{2<noinclude>|175</noinclude>}}}|{{{1<noinclude>|5000</noinclude>}}}}}|{{{4|l}}}|{{{5|2}}}|{{{6|}}}}}<noinclude>
 +
}}
  
<noinclude>Same parameters as {{Tl|Infobox/Part/FuelConsumption}} but with the 4th parameter removed (5th becomes 4th etc.). This is to be replaced by the code of {{Tl|Infobox/Part/FuelConsumption}} with the removed parameter.
+
Creates one fuel consumption entry for {{Tl|Infobox/Part}}.
{{Subcategory|modules}}</noinclude>
+
 
 +
{{Parameter table|name=number|parameters=
 +
{{Parameter row|1|Density in kg/m<sup>3</sup>}}
 +
{{Parameter row|2|Thrust in kN}}
 +
{{Parameter row|3|I<sub>sp</sub> in seconds}}
 +
{{Parameter row|4|Visible unit for the consumption in X/s.|<tt>l</tt>}}
 +
{{Parameter row|5|Number of decimal places shown.|<tt>2</tt>}}
 +
{{Parameter row|6|Caption shown by the cell.|Not set}}
 +
}}
 +
 
 +
This template uses {{Tl|FuelConsumption}} to calculate the consumption and then passes it to {{Tl|Infobox/Part/FuelConsumption/Cell}} which creates the entry for a {{Tl|Infobox/Part}}.
 +
 
 +
[[Category:Calculating templates]]
 +
[[Category:Infobox/Part metatemplates]]</noinclude>

Latest revision as of 16:19, 11 September 2024

Fuel consumption 9.15 l/s

Creates one fuel consumption entry for {{Infobox/Part}}.

# Optional Description Default
1 No Density in kg/m3
2 No Thrust in kN
3 No Isp in seconds
4 Yes Visible unit for the consumption in X/s. l
5 Yes Number of decimal places shown. 2
6 Yes Caption shown by the cell. Not set

This template uses {{FuelConsumption}} to calculate the consumption and then passes it to {{Infobox/Part/FuelConsumption/Cell}} which creates the entry for a {{Infobox/Part}}.