Difference between revisions of "Template:Calculate Volume"
From Space Engineers Wiki
Vox Serico (talk | contribs) m (Fixed braces) |
Vox Serico (talk | contribs) m (Extra page parameter) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly>{{#expr: | <includeonly>{{#expr: | ||
− | {{#explode:{{#vardefineecho:Size|{{#show:{{FULLPAGENAME}}|?{{{1|Size}}}#-}}}}|{{{delim|,}}}|0}} * | + | {{#explode:{{#vardefineecho:Size|{{#show:{{{page|{{FULLPAGENAME}}}}}|?{{{1|Size}}}#-}}}}|{{{delim|,}}}|0}} * |
{{#explode:{{#var:Size}}|{{{delim|,}}}|1}} * | {{#explode:{{#var:Size}}|{{{delim|,}}}|1}} * | ||
{{#explode:{{#var:Size}}|{{{delim|,}}}|2}} * | {{#explode:{{#var:Size}}|{{{delim|,}}}|2}} * | ||
− | {{#if:{{{1|}}}|1|{{#switch: {{#show:{{FULLPAGENAME}}|?CubeSize#-}}|Large=15.625|Small=0.125|#default= | + | {{#if:{{{1|}}}|1|{{#switch: {{#show:{{{page|{{FULLPAGENAME}}}}}|?CubeSize#-}}|Large=15.625|Small=0.125|#default=Error_Invalid_CubeSize}}}} |
}}</includeonly><noinclude> | }}</includeonly><noinclude> | ||
Calculates a block's volume based on the current page. | Calculates a block's volume based on the current page. | ||
− | Usage <code><nowiki>{{Calculate | + | Usage <code><nowiki>{{Calculate Volume}}</nowiki></code> where both <code>Size</code> and <code>CubeSize</code> is defined. |
− | Or <code><nowiki>{{Calculate | + | Or <code><nowiki>{{Calculate Volume|VolumeProperty}}</nowiki></code> for non-cubeblock calculations. |
− | Or <code><nowiki>{{Calculate | + | Or <code><nowiki>{{Calculate Volume|VolumeProperty|delim=x}}</nowiki></code> for non-cubeblock calculations when the volume property uses ''x'' instead of a comma. |
[[Category:Templates]]</noinclude> | [[Category:Templates]]</noinclude> |
Latest revision as of 16:50, 5 April 2020
Calculates a block's volume based on the current page.
Usage {{Calculate Volume}}
where both Size
and CubeSize
is defined.
Or {{Calculate Volume|VolumeProperty}}
for non-cubeblock calculations.
Or {{Calculate Volume|VolumeProperty|delim=x}}
for non-cubeblock calculations when the volume property uses x instead of a comma.