Difference between revisions of "Template:Infobox/Resource"

From Kerbal Space Program Wiki
Jump to: navigation, search
m (*bold text is now done by the Infobox;)
(+German; +allow images (but show none by default); *documentation about since and name; *use dict for the since and unknown text;)
Line 3: Line 3:
 
|padding=.5
 
|padding=.5
 
|name={{{name|}}}
 
|name={{{name|}}}
|file=none
+
|file={{{file|none}}}
 
|lines=
 
|lines=
{{Infobox/Line|{{lang|en=Density|pl=Gęstość}}|2={{#ifeq: {{{density}}}|N|{{lang|en=None|pl=Brak}}|{{{density}}} kg/{{Unit|{{{unit|l}}}}}}}}}
+
{{Infobox/Line|{{lang|en=Density|de=Dichte|pl=Gęstość}}|2={{#ifeq: {{{density}}}|N|{{lang|en=None|de=Keine|pl=Brak}}|{{{density}}} kg/{{Unit|{{{unit|l}}}}}}}}}
{{Infobox/Line|{{lang|en=Transferable|pl=Transportowalne}}|{{#ifeq: {{{transfer}}}|N|{{No}}|{{Yes}}}}}}
+
{{Infobox/Line|{{lang|en=Transferable|de=Transferierbar|pl=Transportowalne}}|{{#ifeq: {{{transfer}}}|N|{{No}}|{{Yes}}}}}}
{{Infobox/Line|{{lang|en=[[Resource#Flow modes|Flow mode]]|pl=Tryb przepływu}}|{{#switch: {{{flow}}}
+
{{Infobox/Line|{{lang|en=[[Resource#Flow modes|Flow mode]]|de=Flussmodus|pl=Tryb przepływu}}|{{#switch: {{{flow}}}
|a={{lang|en=Adjacent|pl=Sąsiadujący}}
+
|a={{lang|en=Adjacent|de=Benachbart|pl=Sąsiadujący}}
|e={{lang|en=Everywhere|pl=Wszędzie}}
+
|e={{lang|en=Everywhere|de=Überall|pl=Wszędzie}}
|i={{lang|en=Internal|pl=Wewnętrzny}}
+
|i={{lang|en=Internal|de=Intern|pl=Wewnętrzny}}
|#default=<span class="error">{{lang|en=Invalid flow mode|pl=Nieprawidłowy tryb przepływu}}</span>}}}}
+
|#default=<span class="error">{{lang|en=Invalid flow mode|de=Ungültiger Flussmodus|pl=Nieprawidłowy tryb przepływu}}</span>}}}}
{{Infobox/Line|{{lang|en=Since|pl=Od wersji}}|{{#if: {{{since|}}}|{{version|{{{since}}}|}}|{{lang|en=Unknown|pl=Nieznane}}}}}}
+
{{Infobox/Line|{{Dict|Since}}|{{#if: {{{since|}}}|{{version|{{{since}}}|}}|{{Dict|Unknown}}}}}}
 
}}<noinclude>Infobox for [[resource]]s.
 
}}<noinclude>Infobox for [[resource]]s.
  
 
== Parameters ==
 
== Parameters ==
 
{{Parameter Table|name=text|parameters=
 
{{Parameter Table|name=text|parameters=
 +
{{Parameter Row|name|Name of the resource.|<tt><nowiki>{{BASEPAGENAME}}</nowiki></tt>}}
 +
{{Parameter Row|file|Image of the resource.|Not shown (<tt>none</tt>)}}
 
{{Parameter Row|density|Density of the resource in kg/{{{unit}}}. Allows <tt>N</tt> for ''None'' and without unit.}}
 
{{Parameter Row|density|Density of the resource in kg/{{{unit}}}. Allows <tt>N</tt> for ''None'' and without unit.}}
 
{{Parameter Row|transfer|If this resource is transferable. Allows <tt>N</tt> for {{No}} and shows {{Yes}} for every other value.|{{Yes}}}}
 
{{Parameter Row|transfer|If this resource is transferable. Allows <tt>N</tt> for {{No}} and shows {{Yes}} for every other value.|{{Yes}}}}
 
{{Parameter Row|flow|The [[Resource#Flow%20modes|flow mode]] of the resource.}}
 
{{Parameter Row|flow|The [[Resource#Flow%20modes|flow mode]] of the resource.}}
{{Parameter Row|since|The introduction of this resource.}}
+
{{Parameter Row|since|The introduction of this resource. If not set shows the value unknown.|Not set (Unknown)}}
 
{{Parameter Row|unit|The unit of volume for the density.|<tt>l</tt>}}
 
{{Parameter Row|unit|The unit of volume for the density.|<tt>l</tt>}}
 
}}
 
}}

Revision as of 09:54, 23 August 2013

Infobox
Density {{{density}}} kg/l
Transferable Yes
Flow mode Invalid flow mode
Since version 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.