Difference between revisions of "Template:Infobox/Resource"
From Kerbal Space Program Wiki
(Move translations to Dict, Add Tweakable and Drainable parameter, Move info to doc template,) |
m (Multiply density by 1000 so we can use the value of the cfg) |
||
Line 6: | Line 6: | ||
|lines= | |lines= | ||
{{#if: {{{file desc|}}}|{{#if: {{{file|}}}|{{Infobox/Line|style=text-align:center; font-size:smaller;|{{{file desc|}}}}}}}}} | {{#if: {{{file desc|}}}|{{#if: {{{file|}}}|{{Infobox/Line|style=text-align:center; font-size:smaller;|{{{file desc|}}}}}}}}} | ||
− | {{Infobox/Line|{{Infobox/Resource/Dict|Density}}|{{#ifexpr: {{{density}}}|{{{density}}} {{Dict|k}}{{Dict|g}}/{{Unit|{{{unit|l}}}}}|{{Dict|None}}}}}} | + | {{Infobox/Line|{{Infobox/Resource/Dict|Density}}|{{#ifexpr: {{{density}}}*1000|{{#expr: {{{density}}}*1000 round 1}} {{Dict|k}}{{Dict|g}}/{{Unit|{{{unit|l}}}}}|{{Dict|None}}}}}} |
{{Infobox/Line|{{Infobox/Resource/Dict|Transferable}}|{{#ifeq: {{lc:{{{transfer|}}}}}|n|{{No}}|{{Yes}}}}}} | {{Infobox/Line|{{Infobox/Resource/Dict|Transferable}}|{{#ifeq: {{lc:{{{transfer|}}}}}|n|{{No}}|{{Yes}}}}}} | ||
{{Infobox/Line|{{Infobox/Resource/Dict|Tweakable}}|{{#ifeq: {{lc:{{{tweakable|}}}}}|n|{{No}}|{{Yes}}}}}} | {{Infobox/Line|{{Infobox/Resource/Dict|Tweakable}}|{{#ifeq: {{lc:{{{tweakable|}}}}}|n|{{No}}|{{Yes}}}}}} |
Revision as of 22:19, 27 July 2021
Infobox | ||
Density | 5 kg/l | |
Transferable | No | |
Tweakable | Yes | |
Drainable | No | |
Flow mode | Adjacent | |
Cost | 0.8 /l | |
0.16 /kg | ||
Since version | 0.20 |
Infobox for resources.
Parameters
Name | Optional | Description | Default |
---|---|---|---|
name | Yes | Name of the resource. | {{BASEPAGENAME}} |
icon | Yes | Icon of the resource. | Not set/Hidden |
icon width | Yes | Width of the image. | Not set/Hidden |
density | No | Density of the resource in kg/{{{unit}}}. Allows 0 for None and without unit. | |
transfer | Yes | Whether the resource is transferable. Allows y for {{Yes}} and shows {{No}} for every other value. | No |
tweakable | Yes | Whether the resource is tweakable in the VAB/SPH. Allows y for {{Yes}} and shows {{No}} for every other value. | No |
drainable | Yes | Whether the resource is drainable. Allows n for {{No}} and shows {{Yes}} for every other value. | Yes |
flow | No | The flow mode of the resource. | |
cost | No | Cost per unit of the resource. Allows 0 for None and without unit. Also calculates costs per mass if density and cost are both not zero. | |
since | Yes | The introduction of this resource. If not set shows the value unknown. | Unknown |
unit | Yes | The unit of volume for the density. | l |
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. |
n | None | The resource won't be pumped automatically but can be manually transferred. |
The above documentation is transcluded from Template:Infobox/Resource/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |