Difference between revisions of "Template:Infobox/Resource"

From Kerbal Space Program Wiki
Jump to: navigation, search
m (*all densities are < 1 Mg/l;)
(+unit;)
Line 5: Line 5:
 
|file=
 
|file=
 
|lines=
 
|lines=
{{Infobox/Line|Density|{{#ifeq: {{{density}}}|N|None|{{{density}}}&nbsp;kg/l}}}}
+
{{Infobox/Line|Density|2={{#ifeq: {{{density}}}|N|None|{{{density}}}&nbsp;kg/{{#ifeq: {{{unit|l}}}|unit|unit|<abbr title="Assuming that 1 unit = 1 liter">{{{unit|l}}}</abbr>}}}}}}
 
{{Infobox/Line|Transferable|{{#ifeq: {{{transfer}}}|N|{{No}}|{{Yes}}}}}}
 
{{Infobox/Line|Transferable|{{#ifeq: {{{transfer}}}|N|{{No}}|{{Yes}}}}}}
{{Infobox/Line|[[Resource#Flow modes|Flow mode]]|{{{flow}}}}}
+
{{Infobox/Line|[[Resource#Flow modes|Flow mode]]|{{#switch: {{{flow}}}
 +
|a=Adjacent
 +
|e=Everywhere
 +
|i=Internal
 +
|#default=<span class="error">Invalid flow mode</span>}}}}
 
{{Infobox/Line|Since|{{#if: {{{since|}}}|{{version|{{{since}}}|}}|Unknown}}}}
 
{{Infobox/Line|Since|{{#if: {{{since|}}}|{{version|{{{since}}}|}}|Unknown}}}}
 
}}<noinclude>Infobox for [[resource]]s.
 
}}<noinclude>Infobox for [[resource]]s.
  
 +
== Parameters ==
 
{{Parameter Table|name=text|parameters=
 
{{Parameter Table|name=text|parameters=
{{ParameterRow|density|Density of the resource in kg/l. Allows <tt>N</tt> for ''None'' and without unit.}}
+
{{ParameterRow|density|Density of the resource in kg/{{{unit}}}. Allows <tt>N</tt> for ''None'' and without unit.}}
 
{{ParameterRow|transfer|If this resource is transferable. Allows <tt>N</tt> for {{No}} and shows {{Yes}} for every other value.|{{Yes}}}}
 
{{ParameterRow|transfer|If this resource is transferable. Allows <tt>N</tt> for {{No}} and shows {{Yes}} for every other value.|{{Yes}}}}
 
{{ParameterRow|flow|The [[Resource#Flow%20modes|flow mode]] of the resource.}}
 
{{ParameterRow|flow|The [[Resource#Flow%20modes|flow mode]] of the resource.}}
 
{{ParameterRow|since|The introduction of this resource.}}
 
{{ParameterRow|since|The introduction of this resource.}}
}}</noinclude>
+
{{ParameterRow|unit|The unit of volume for the density.|<tt>l</tt>}}
 +
}}
 +
 
 +
=== Flow modes ===
 +
{|
 +
! Code
 +
! Type
 +
! Description
 +
|-
 +
| a
 +
| Adjacent
 +
| Resources will only flow between adjacent sources and sinks, meaning that tanks can be drained unevenly.
 +
|-
 +
| e
 +
| Everywhere
 +
| The resource is always available to all parts structurally connected to the vessel, and the same amount of resources is drained from every container.
 +
|-
 +
| i
 +
| Internal
 +
| The resource can only be used by the part containing it.
 +
|}
 +
</noinclude>

Revision as of 23:28, 23 June 2013

Infobox
Infobox
Density {{{density}}} kg/l
Transferable Yes
Flow mode Invalid flow mode
Since Unknown
Infobox for resources.

Parameters

Template:Parameter Table

Flow modes

Code Type Description
a Adjacent Resources will only flow between adjacent sources and sinks, meaning that tanks can be drained unevenly.
e Everywhere The resource is always available to all parts structurally connected to the vessel, and the same amount of resources is drained from every container.
i Internal The resource can only be used by the part containing it.