Difference between revisions of "Template:Calculate mass"

From Space Engineers Wiki
Jump to: navigation, search
m (Changed default to accept any page with matching parameters)
 
(11 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
{{#switch: {{{1|}}}
 
{{#switch: {{{1|}}}
| s = {{calculate mass/calc| {{get mass|c|{{#explode: {{#show:{{{2|}}} | ?scomponent1 | limit=1 }} | , | 0 }} }} | {{#show: {{{2|}}} | ?scomponent1amt}} | {{get mass|c|{{#explode: {{#show:{{{2|}}} | ?scomponent2 | limit=1 }} | , | 0 }} }} | {{#show: {{{2|}}} | ?scomponent2amt}} | {{get mass|c|{{#explode: {{#show:{{{2|}}} | ?scomponent3 | limit=1 }} | , | 0 }} }} | {{#show: {{{2|}}} | ?scomponent3amt}} | {{get mass|c|{{#explode: {{#show:{{{2|}}} | ?scomponent4 | limit=1 }} | , | 0 }} }} | {{#show: {{{2|}}} | ?scomponent4amt}} | {{get mass|c|{{#explode: {{#show:{{{2|}}} | ?scomponent5 | limit=1 }} | , | 0 }} }} | {{#show: {{{2|}}} | ?scomponent5amt}} | {{get mass|c|{{#explode: {{#show:{{{2|}}} | ?scomponent6 | limit=1 }} | , | 0 }} }} | {{#show: {{{2|}}} | ?scomponent6amt}} | {{get mass|c|{{#explode: {{#show:{{{2|}}} | ?scomponent7 | limit=1 }} | , | 0 }} }} | {{#show: {{{2|}}} | ?scomponent7amt}} | {{get mass|c|{{#explode: {{#show:{{{2|}}} | ?scomponent8 | limit=1 }} | , | 0 }} }} | {{#show: {{{2|}}} | ?scomponent8amt}} | {{get mass|c|{{#explode: {{#show:{{{2|}}} | ?scomponent9 | limit=1 }} | , | 0 }} }} | {{#show: {{{2|}}} | ?scomponent9amt}} }}
+
| s =  
| l = {{calculate mass/calc| {{get mass|c|{{#explode: {{#show:{{{2|}}} | ?lcomponent1 | limit=1 }} | , | 0 }} }} | {{#show: {{{2|}}} | ?lcomponent1amt}} | {{get mass|c|{{#explode: {{#show:{{{2|}}} | ?lcomponent2 | limit=1 }} | , | 0 }} }} | {{#show: {{{2|}}} | ?lcomponent2amt}} | {{get mass|c|{{#explode: {{#show:{{{2|}}} | ?lcomponent3 | limit=1 }} | , | 0 }} }} | {{#show: {{{2|}}} | ?lcomponent3amt}} | {{get mass|c|{{#explode: {{#show:{{{2|}}} | ?lcomponent4 | limit=1 }} | , | 0 }} }} | {{#show: {{{2|}}} | ?lcomponent4amt}} | {{get mass|c|{{#explode: {{#show:{{{2|}}} | ?lcomponent5 | limit=1 }} | , | 0 }} }} | {{#show: {{{2|}}} | ?lcomponent5amt}} | {{get mass|c|{{#explode: {{#show:{{{2|}}} | ?lcomponent6 | limit=1 }} | , | 0 }} }} | {{#show: {{{2|}}} | ?lcomponent6amt}} | {{get mass|c|{{#explode: {{#show:{{{2|}}} | ?lcomponent7 | limit=1 }} | , | 0 }} }} | {{#show: {{{2|}}} | ?lcomponent7amt}} | {{get mass|c|{{#explode: {{#show:{{{2|}}} | ?lcomponent8 | limit=1 }} | , | 0 }} }} | {{#show: {{{2|}}} | ?lcomponent8amt}} | {{get mass|c|{{#explode: {{#show:{{{2|}}} | ?lcomponent9 | limit=1 }} | , | 0 }} }} | {{#show: {{{2|}}} | ?lcomponent9amt}} }}
+
{{calculate mass/calc
 +
| {{#if: {{#show:{{{2|}}} | ?scomponent1 | limit=1 }} | {{get mass|c|{{#explode: {{#show:{{{2|}}} | ?scomponent1 | limit=1 }} | , | 0 }} }} |}}
 +
| {{#show: {{{2|}}} | ?scomponent1amt}}  
 +
| {{#if: {{#show:{{{2|}}} | ?scomponent2 | limit=1 }} | {{get mass|c|{{#explode: {{#show:{{{2|}}} | ?scomponent2 | limit=1 }} | , | 0 }} }} |}}
 +
| {{#show: {{{2|}}} | ?scomponent2amt}}  
 +
| {{#if: {{#show:{{{2|}}} | ?scomponent3 | limit=1 }} | {{get mass|c|{{#explode: {{#show:{{{2|}}} | ?scomponent3 | limit=1 }} | , | 0 }} }} |}}
 +
| {{#show: {{{2|}}} | ?scomponent3amt}}
 +
| {{#if: {{#show:{{{2|}}} | ?scomponent4 | limit=1 }} | {{get mass|c|{{#explode: {{#show:{{{2|}}} | ?scomponent4 | limit=1 }} | , | 0 }} }} |}}
 +
| {{#show: {{{2|}}} | ?scomponent4amt}}  
 +
| {{#if: {{#show:{{{2|}}} | ?scomponent5 | limit=1 }} | {{get mass|c|{{#explode: {{#show:{{{2|}}} | ?scomponent5 | limit=1 }} | , | 0 }} }} |}}
 +
| {{#show: {{{2|}}} | ?scomponent5amt}}  
 +
| {{#if: {{#show:{{{2|}}} | ?scomponent6 | limit=1 }} | {{get mass|c|{{#explode: {{#show:{{{2|}}} | ?scomponent6 | limit=1 }} | , | 0 }} }} |}}
 +
| {{#show: {{{2|}}} | ?scomponent6amt}}
 +
| {{#if: {{#show:{{{2|}}} | ?scomponent7 | limit=1 }} | {{get mass|c|{{#explode: {{#show:{{{2|}}} | ?scomponent7 | limit=1 }} | , | 0 }} }} |}}
 +
| {{#show: {{{2|}}} | ?scomponent7amt}}  
 +
| {{#if: {{#show:{{{2|}}} | ?scomponent8 | limit=1 }} | {{get mass|c|{{#explode: {{#show:{{{2|}}} | ?scomponent8 | limit=1 }} | , | 0 }} }} |}}
 +
| {{#show: {{{2|}}} | ?scomponent8amt}}  
 +
| {{#if: {{#show:{{{2|}}} | ?scomponent9 | limit=1 }} | {{get mass|c|{{#explode: {{#show:{{{2|}}} | ?scomponent9 | limit=1 }} | , | 0 }} }} |}}
 +
| {{#show: {{{2|}}} | ?scomponent9amt}}  
 +
| {{#if: {{#show:{{{2|}}} | ?scomponent10 | limit=1 }} | {{get mass|c|{{#explode: {{#show:{{{2|}}} | ?scomponent10 | limit=1 }} | , | 0 }} }} |}}
 +
| {{#show: {{{2|}}} | ?scomponent10amt}} }}
 +
| l =
 +
{{calculate mass/calc
 +
| {{#if: {{#show:{{{2|}}} | ?lcomponent1 | limit=1 }} | {{get mass|c|{{#explode: {{#show:{{{2|}}} | ?lcomponent1 | limit=1 }} | , | 0 }} }} |}}
 +
| {{#show: {{{2|}}} | ?lcomponent1amt}}
 +
| {{#if: {{#show:{{{2|}}} | ?lcomponent2 | limit=1 }} | {{get mass|c|{{#explode: {{#show:{{{2|}}} | ?lcomponent2 | limit=1 }} | , | 0 }} }} |}}
 +
| {{#show: {{{2|}}} | ?lcomponent2amt}}
 +
| {{#if: {{#show:{{{2|}}} | ?lcomponent3 | limit=1 }} | {{get mass|c|{{#explode: {{#show:{{{2|}}} | ?lcomponent3 | limit=1 }} | , | 0 }} }} |}}
 +
| {{#show: {{{2|}}} | ?lcomponent3amt}}
 +
| {{#if: {{#show:{{{2|}}} | ?lcomponent4 | limit=1 }} | {{get mass|c|{{#explode: {{#show:{{{2|}}} | ?lcomponent4 | limit=1 }} | , | 0 }} }} |}}
 +
| {{#show: {{{2|}}} | ?lcomponent4amt}}
 +
| {{#if: {{#show:{{{2|}}} | ?lcomponent5 | limit=1 }} | {{get mass|c|{{#explode: {{#show:{{{2|}}} | ?lcomponent5 | limit=1 }} | , | 0 }} }} |}}
 +
| {{#show: {{{2|}}} | ?lcomponent5amt}}
 +
| {{#if: {{#show:{{{2|}}} | ?lcomponent6 | limit=1 }} | {{get mass|c|{{#explode: {{#show:{{{2|}}} | ?lcomponent6 | limit=1 }} | , | 0 }} }} |}}
 +
| {{#show: {{{2|}}} | ?lcomponent6amt}}
 +
| {{#if: {{#show:{{{2|}}} | ?lcomponent7 | limit=1 }} | {{get mass|c|{{#explode: {{#show:{{{2|}}} | ?lcomponent7 | limit=1 }} | , | 0 }} }} |}}
 +
| {{#show: {{{2|}}} | ?lcomponent7amt}}
 +
| {{#if: {{#show:{{{2|}}} | ?lcomponent8 | limit=1 }} | {{get mass|c|{{#explode: {{#show:{{{2|}}} | ?lcomponent8 | limit=1 }} | , | 0 }} }} |}}
 +
| {{#show: {{{2|}}} | ?lcomponent8amt}}
 +
| {{#if: {{#show:{{{2|}}} | ?lcomponent9 | limit=1 }} | {{get mass|c|{{#explode: {{#show:{{{2|}}} | ?lcomponent9 | limit=1 }} | , | 0 }} }} |}}
 +
| {{#show: {{{2|}}} | ?lcomponent9amt}}
 +
| {{#if: {{#show:{{{2|}}} | ?lcomponent10 | limit=1 }} | {{get mass|c|{{#explode: {{#show:{{{2|}}} | ?lcomponent10 | limit=1 }} | , | 0 }} }} |}}
 +
| {{#show: {{{2|}}} | ?lcomponent10amt}} }}
 +
| #default=
 +
{{calculate mass/calc
 +
| {{#if: {{#show:{{FULLPAGENAME}}|?Component1#-}} | {{#show:{{#show:{{FULLPAGENAME}}|?Component1#-}}|?Mass#-n}}}}
 +
| {{#show: {{FULLPAGENAME}}|?Component1Amount#-}}
 +
| {{#if: {{#show:{{FULLPAGENAME}}|?Component2#-}} | {{#show:{{#show:{{FULLPAGENAME}}|?Component2#-}}|?Mass#-n}}}}
 +
| {{#show: {{FULLPAGENAME}}|?Component2Amount#-}}
 +
| {{#if: {{#show:{{FULLPAGENAME}}|?Component3#-}} | {{#show:{{#show:{{FULLPAGENAME}}|?Component3#-}}|?Mass#-n}}}}
 +
| {{#show: {{FULLPAGENAME}}|?Component3Amount#-}}
 +
| {{#if: {{#show:{{FULLPAGENAME}}|?Component4#-}} | {{#show:{{#show:{{FULLPAGENAME}}|?Component4#-}}|?Mass#-n}}}}
 +
| {{#show: {{FULLPAGENAME}}|?Component4Amount#-}}
 +
| {{#if: {{#show:{{FULLPAGENAME}}|?Component5#-}} | {{#show:{{#show:{{FULLPAGENAME}}|?Component5#-}}|?Mass#-n}}}}
 +
| {{#show: {{FULLPAGENAME}}|?Component5Amount#-}}
 +
| {{#if: {{#show:{{FULLPAGENAME}}|?Component6#-}} | {{#show:{{#show:{{FULLPAGENAME}}|?Component6#-}}|?Mass#-n}}}}
 +
| {{#show: {{FULLPAGENAME}}|?Component6Amount#-}}
 +
| {{#if: {{#show:{{FULLPAGENAME}}|?Component7#-}} | {{#show:{{#show:{{FULLPAGENAME}}|?Component7#-}}|?Mass#-n}}}}
 +
| {{#show: {{FULLPAGENAME}}|?Component7Amount#-}}
 +
| {{#if: {{#show:{{FULLPAGENAME}}|?Component8#-}} | {{#show:{{#show:{{FULLPAGENAME}}|?Component8#-}}|?Mass#-n}}}}
 +
| {{#show: {{FULLPAGENAME}}|?Component8Amount#-}}
 +
| {{#if: {{#show:{{FULLPAGENAME}}|?Component9#-}} | {{#show:{{#show:{{FULLPAGENAME}}|?Component9#-}}|?Mass#-n}}}}
 +
| {{#show: {{FULLPAGENAME}}|?Component9Amount#-}}
 +
| {{#if: {{#show:{{FULLPAGENAME}}|?Component10#-}} | {{#show:{{#show:{{FULLPAGENAME}}|?Component10#-}}|?Mass#-n}}}}
 +
| {{#show: {{FULLPAGENAME}}|?Component10Amount#-}}}}
 
}}<noinclude>[[Category:Templates]]</noinclude>
 
}}<noinclude>[[Category:Templates]]</noinclude>

Latest revision as of 18:16, 3 April 2020

0