Difference between revisions of "Template:BlockVolume"
From Space Engineers Wiki
Vox Serico (talk | contribs) m (Whitespace cleanup) |
Vox Serico (talk | contribs) m (More whitespace cleanup) |
||
Line 1: | Line 1: | ||
− | <includeonly>{{#vardefine:blockwidth | {{#show: {{{1|}}}|? {{#switch: {{{2}}}| large = lwidth | small = swidth}}}}}} | + | <includeonly>{{#vardefine:blockwidth | {{#show: {{{1|}}}|? {{#switch: {{{2}}}| large = lwidth | small = swidth}}}}}} {{#vardefine:blockheight| {{#show: {{{1|}}}|? {{#switch: {{{2}}}| large = lheight | small = sheight}}}}}} {{#vardefine:blockdepth | {{#show: {{{1|}}}|? {{#switch: {{{2}}}| large = ldepth | small = sdepth}}}}}} {{#vardefine:blockvolume | {{#expr: {{#var:blockwidth}} * {{#var:blockheight}} * {{#var:blockdepth}} * {{#switch:{{{2}}} | large = 15.625 | small = 0.125}}}}}} {{#if:{{{volumeonly|}}} | {{#var:blockvolume}} | {{#var:blockwidth}}×{{#var:blockheight}}×{{#var:blockdepth}} ({{#var:blockvolume}} m<sup>3</sup>)}}</includeonly><noinclude> |
− | {{#vardefine:blockheight| {{#show: {{{1|}}}|? {{#switch: {{{2}}}| large = lheight | small = sheight}}}}}} | ||
− | {{#vardefine:blockdepth | {{#show: {{{1|}}}|? {{#switch: {{{2}}}| large = ldepth | small = sdepth}}}}}} | ||
− | {{#vardefine:blockvolume | {{#expr: {{#var:blockwidth}} * {{#var:blockheight}} * {{#var:blockdepth}} * {{#switch:{{{2}}} | large = 15.625 | small = 0.125}}}}}} | ||
− | {{#if:{{{volumeonly|}}} | {{#var:blockvolume}} | {{#var:blockwidth}}×{{#var:blockheight}}×{{#var:blockdepth}} ({{#var:blockvolume}} m<sup>3</sup>)}}</includeonly><noinclude> | ||
Displays block dimensions and calculates its volume. | Displays block dimensions and calculates its volume. |
Revision as of 17:00, 27 March 2020
Displays block dimensions and calculates its volume.
{{BlockVolume|Block name|size}}
Where Block name is the page of the block and size is small or large for respective the block size.
{{BlockVolume|Large Thruster|small}}
Gives ×× (Expression error: Unexpected * operator. m3)
{{BlockVolume|Large Thruster|large}}
Gives ×× (Expression error: Unexpected * operator. m3)
{{BlockVolume|Large Thruster|large|volumeonly=yes}}
Gives Expression error: Unexpected * operator.