User:Brammigamer/contract sandbox: Difference between revisions
From Captain of Industry Wiki
Brammigamer (talk | contribs) m fixed the syntax errors and added it to the final numbers |
Brammigamer (talk | contribs) m changed modules to a global var |
||
| Line 5: | Line 5: | ||
-->{{#vardefine: contents|1200}}<!-- | -->{{#vardefine: contents|1200}}<!-- | ||
-->{{#vardefine: total|{{#expr: {{{ProductPayQty}}}+{{{ProductBuyQty}}}}}}}<!-- | -->{{#vardefine: total|{{#expr: {{{ProductPayQty}}}+{{{ProductBuyQty}}}}}}}<!-- | ||
-->{{#vardefine: full|{{#expr: floor({{ | -->{{#vardefine: full|{{#expr: floor({{#var:modules}}/{{#var:total}})}}}}<!-- | ||
-->{{#vardefine: leftover|{{#expr: {{ | -->{{#vardefine: leftover|{{#expr: {{#var:modules}}-{{#var:full}}*{{#var: total}}}}}}<!-- | ||
-->{{#vardefine: pay_amount|{{#expr: {{{ProductPayQty}}}/{{#var:total}}*{{#var:leftover}}}}}}<!-- | -->{{#vardefine: pay_amount|{{#expr: {{{ProductPayQty}}}/{{#var:total}}*{{#var:leftover}}}}}}<!-- | ||
| Line 75: | Line 75: | ||
--> | --> | ||
</includeonly> | </includeonly> | ||
<noinclude>{{User:Brammigamer/contract sandbox|ProductBuyName=Coal|ProductBuyQty=5|ProductPayName=Cement|ProductPayQty=1|UnityMonth=0.2001953|UnityQty=0.1103516|UnityEst=18 | <noinclude>{{#vardefine: modules|8}}{{User:Brammigamer/contract sandbox|ProductBuyName=Coal|ProductBuyQty=5|ProductPayName=Cement|ProductPayQty=1|UnityMonth=0.2001953|UnityQty=0.1103516|UnityEst=18}}</noinclude> | ||