Difference between revisions of "Template:Calculate Volume"

From Space Engineers Wiki
Jump to: navigation, search
m (Corrected instructions)
m (Added replaced 0 result with error message)
Line 3: Line 3:
 
  {{#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=0}}}}
+
  {{#if:{{{1|}}}|1|{{#switch: {{#show:{{FULLPAGENAME}}|?CubeSize#-}}|Large=15.625|Small=0.125|#default=Error_Invalid_CubeSize}}}}
 
}}</includeonly><noinclude>
 
}}</includeonly><noinclude>
  

Revision as of 22:16, 4 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.