Difference between revisions of "Template:Infobox/Resource"

From Kerbal Space Program Wiki
Jump to: navigation, search
m (!currency;)
(*instead of N use 0 for non-density; +0 for priceless resources; +cost per mass;)
Line 4: Line 4:
 
|lines=
 
|lines=
 
{{if||{{Booland|{{{file desc|}}}|{{{file|}}}}}|{{Infobox/Line|style=text-align:center; font-size:smaller;|{{{file desc|}}}}}
 
{{if||{{Booland|{{{file desc|}}}|{{{file|}}}}}|{{Infobox/Line|style=text-align:center; font-size:smaller;|{{{file desc|}}}}}
}}{{Infobox/Line|{{lang|en=Density|de=Dichte|pl=Gęstość|hu=Sűrűség}}|2={{#ifeq: {{{density}}}|N|{{lang|en=None|de=Keine|pl=Brak|hu=Nincs}}|{{{density}}} kg/{{Unit|{{{unit|l}}}}}}}}}
+
}}{{Infobox/Line|{{lang|en=Density|de=Dichte|pl=Gęstość|hu=Sűrűség}}|2={{#ifexpr: {{{density<noinclude>|5</noinclude>}}}|{{{density<noinclude>|5</noinclude>}}}&nbsp;kg/{{Unit|{{{unit|l}}}}}|{{lang|en=None|de=Keine|pl=Brak|hu=Nincs}}}}}}
 
{{Infobox/Line|{{lang|en=Transferable|de=Transferierbar|pl=Transportowalne|hu=Áthelyezhető}}|{{#ifeq: {{{transfer}}}|N|{{No}}|{{Yes}}}}}}
 
{{Infobox/Line|{{lang|en=Transferable|de=Transferierbar|pl=Transportowalne|hu=Áthelyezhető}}|{{#ifeq: {{{transfer}}}|N|{{No}}|{{Yes}}}}}}
 
{{Infobox/Line|{{lang|en=[[Resource#Flow modes|Flow mode]]|de=Flussmodus|pl=Tryb przepływu|hu=Áramlás módja}}|{{#switch: {{{flow}}}
 
{{Infobox/Line|{{lang|en=[[Resource#Flow modes|Flow mode]]|de=Flussmodus|pl=Tryb przepływu|hu=Áramlás módja}}|{{#switch: {{{flow}}}
Line 11: Line 11:
 
|i={{lang|en=Internal|de=Intern|pl=Wewnętrzny|hu=Belül}}
 
|i={{lang|en=Internal|de=Intern|pl=Wewnętrzny|hu=Belül}}
 
|#default=<span class="error" style="white-space:normal;">{{lang|en=Invalid flow mode|de=Ungültiger Flussmodus|pl=Nieprawidłowy tryb przepływu|hu=Érvénytelen}}</span>}}}}
 
|#default=<span class="error" style="white-space:normal;">{{lang|en=Invalid flow mode|de=Ungültiger Flussmodus|pl=Nieprawidłowy tryb przepływu|hu=Érvénytelen}}</span>}}}}
{{Infobox/Line|{{Dict|Cost}}|{{#if: {{{cost|}}}|{{{cost}}}&nbsp;&curren;/{{Unit|{{{unit|l}}}}}|{{Dict|Unknown}}}}}}
+
{{Infobox/Line|{{Dict|Cost}}|{{#ifexpr: {{{cost<noinclude>|0.8</noinclude>}}}|{{{cost<noinclude>|0.8</noinclude>}}}&nbsp;&curren;/{{Unit|{{{unit|l}}}}}|{{lang|en=None|de=Keine|pl=Brak|hu=Nincs}}}}|{{#ifexpr: {{{cost<noinclude>|0.8</noinclude>}}}*{{{density<noinclude>|5</noinclude>}}}|{{#expr: {{{cost<noinclude>|0.8</noinclude>}}}/{{{density<noinclude>|5</noinclude>}}} round 2}}&nbsp;&curren;/kg}}}}
 
{{Infobox/Line|{{Dict|Since}}|{{#if: {{{since|}}}|{{version|{{{since}}}|}}|{{Dict|Unknown}}}}}}
 
{{Infobox/Line|{{Dict|Since}}|{{#if: {{{since|}}}|{{version|{{{since}}}|}}|{{Dict|Unknown}}}}}}
 
}}<noinclude>Infobox for [[resource]]s.
 
}}<noinclude>Infobox for [[resource]]s.
Line 20: Line 20:
 
{{Parameter Row|file|Image of the resource.|Not shown (<tt>none</tt>)}}
 
{{Parameter Row|file|Image of the resource.|Not shown (<tt>none</tt>)}}
 
{{Parameter Row|file desc|Description of the image.|Not shown (Hidden)|1}}
 
{{Parameter Row|file desc|Description of the image.|Not shown (Hidden)|1}}
{{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>0</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|cost|Cost per unit of the resource. ''Currently'' it defaults to ''Unknown'', but this default will be removed as soon as it's not required.}}
+
{{Parameter Row|cost|Cost per unit of the resource. Allows <tt>0</tt> for ''None'' and without unit. Also calculates costs per mass if density and cost are both not zero.}}
 
{{Parameter Row|since|The introduction of this resource. If not set shows the value unknown.|Not set (Unknown)}}
 
{{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 14:14, 28 July 2014

Infobox
Density 5 kg/l
Transferable Yes
Flow mode Invalid flow mode
Cost 0.8 ¤/l
0.16 ¤/kg
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.