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 corrected the per ship unity amount |
||
| (2 intermediate revisions by the same user not shown) | |||
| 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 33: | Line 33: | ||
-->{{#ifexpr: {{#expr:{{#var: buy_opt1}}+{{#var:pay_opt1}}}}<{{#expr:{{#var: buy_opt2}}+{{#var:pay_opt2}}}} | -->{{#ifexpr: {{#expr:{{#var: buy_opt1}}+{{#var:pay_opt1}}}}<{{#expr:{{#var: buy_opt2}}+{{#var:pay_opt2}}}} | ||
|{{#vardefine: pay_amount|{{#expr: {{{ProductPayQty}}}*{{#var: full}}*{{#var: contents}}+{{#var: pay_opt2}}}}}}<!-- | |{{#vardefine: pay_amount|{{#expr: floor({{{ProductPayQty}}}*{{#var: full}}*{{#var: contents}}+{{#var: pay_opt2}})}}}}<!-- | ||
-->{{#vardefine: buy_amount|{{#expr: {{{ProductBuyQty}}}*{{#var: full}}*{{#var: contents}}+{{#var: buy_opt2}}}}}} | -->{{#vardefine: buy_amount|{{#expr: floor({{{ProductBuyQty}}}*{{#var: full}}*{{#var: contents}}+{{#var: buy_opt2}})}}}} | ||
|{{#vardefine: pay_amount|{{#expr: {{{ProductPayQty}}}*{{#var: full}}*{{#var: contents}}+{{#var: pay_opt1}}}}}}<!-- | |{{#vardefine: pay_amount|{{#expr: floor({{{ProductPayQty}}}*{{#var: full}}*{{#var: contents}}+{{#var: pay_opt1}})}}}}<!-- | ||
-->{{#vardefine: buy_amount|{{#expr: {{{ProductBuyQty}}}*{{#var: full}}*{{#var: contents}}+{{#var: buy_opt1}}}}}} }}<!-- | -->{{#vardefine: buy_amount|{{#expr: floor({{{ProductBuyQty}}}*{{#var: full}}*{{#var: contents}}+{{#var: buy_opt1}})}}}} }}<!-- | ||
| Line 66: | Line 66: | ||
--></div><!-- | --></div><!-- | ||
--><div><!-- | --><div><!-- | ||
-->{{#expr: {{{UnityQty}}} round | -->{{#expr: {{{UnityQty}}}/100*{{#var:buy_amount}} round 1}} {{#var: unity_icon}} /ship<!-- | ||
--></div><!-- | --></div><!-- | ||
--><div class="lower"><!-- | --><div class="lower"><!-- | ||
| 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> | ||