Difference between revisions of "Template:Recipe item/sandbox"

From Captain of Industry Wiki
Jump to: navigation, search
(Created page with "<includeonly><!-- -->{{#if: {{{Name|}}}|<!-- ** Set template style and default value of arguments** --><templatestyles src="Template:Recipe draw/styles.css" /><!-- -->{{#vardefine: image_plus | 24x24px }}<!-- -->{{#vardefine: image_size| 48x48px }}<!-- ** Draw plus icon ** -->{{#ifeq: {{lc:{{{Plus|}}} }} | yes |<!-- --><div class="block">{{#var: image_plus}}</div>|<!-- -->{{#ifeq: {{lc:{{{Plus|no}}} }} | no | |<!-- --><div...")
 
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><!--
<includeonly><!--


-->{{#if: {{{Name|}}}|<!--
  ** Check if {{{Name}}} is pollution (or empty) **


   ** Set template style and default value of arguments**
-->{{#ifeq: <!--
   -->{{#expr: <!--
    -->    {{#ifeq: {{lc:{{{Name|}}} }} | {{#var: pollution_1}} | 1 | 0 }} <!--
    --> or {{#ifeq: {{lc:{{{Name|}}} }} | {{#var: pollution_2}} | 1 | 0 }} <!--
    --> or {{#ifeq: {{lc:{{{Name|}}} }} | {{#var: pollution_3}} | 1 | 0 }} <!--
    --> or {{#ifeq: {{lc:{{{Name|}}} }} | {{#var: pollution_4}} | 1 | 0 }} <!--
  -->}} | 1 | <!--
  -->{{#vardefine: is_pollution| 1 }} | <!--
  -->{{#vardefine: is_pollution| 0 }} <!--
-->}} <!--


   --><templatestyles src="Template:Recipe draw/styles.css" /><!--
   ** Determine if we should display the icon **
  -->{{#vardefine: image_plus | [[File:Plus.png|24x24px]] }}<!--
 
  -->{{#vardefine: image_size| 48x48px }}<!--
-->{{#ifeq: <!--
  -->{{#expr: <!--
    -->   {{#if: {{{Name|}}} | 0 | 1 }} <!--
    --> or ( {{#ifeq: {{lc:{{{Pollution}}} }} | hide | 1 | 0 }} and {{#var: is_pollution}} ) <!--
    --> or ( {{#ifeq: {{lc:{{{Pollution}}} }} | only | 1 | 0 }} and (not {{#var: is_pollution}} )) <!--
  -->}} | 1 | <!-- Do nothing --> | <!--


   ** Draw plus icon **
   ** Draw plus icon **


   -->{{#ifeq: {{lc:{{{Plus|}}} }} | yes |<!--
   -->{{#ifeq: {{lc:{{{Plus|}}} }} | yes | <!--
     --><div class="block">{{#var: image_plus}}</div>|<!--
     --><div class="block">{{#var: img_plus}}</div>| <!--
     -->{{#ifeq: {{lc:{{{Plus|no}}} }} | no | |<!--
     -->{{#ifeq: {{lc:{{{Plus|no}}} }} | no | | <!--
       --><div class="block">{{{Plus}}}</div><!--
       --><div class="block">{{{Plus}}}</div> <!--
     -->}}<!--
     -->}}<!--
   -->}}<!--
   -->}}<!--


   ** Draw item and throughput
   ** Draw item and throughput **
 
  -->{{#vardefine: image_item | [[File:{{{Name}}}.png{{!}}{{{ImageSize|{{#var: imgsz_reg}}}}}{{!}}link={{{Name}}}]] }}<!--
   --><div class="block"><!--
   --><div class="block"><!--
     --><div class="upper">{{#if: {{{Unit|}}} | &nbsp; | {{{Qty|}}}&nbsp;{{{Unit|}}} }}</div><!--
     -->{{#switch: {{{Unit|}}} <!--
    -->[[File:{{{Name}}}.png{{!}}{{{ImageSize|{{#var: image_size}}}}}{{!}}link={{{Name}}}]]<!--
      -->| ? = <!--
    -->{{#if: {{{Unit|}}} | <!--
        --><div class="upper">?</div><!--
      --><div class="lower">{{{Qty|}}}&nbsp;{{{Unit|}}}</div>|<!--
        -->{{#var: image_item}}<!--
      --><div class="lower blue">{{#expr: 60/{{{Time|1}}}*{{{Qty|}}} round 2 }}</div><!--
        --><div class="lower blue">?</div><!--
      -->| | % = <!--    No unit or %
        -->{{#ifeq: {{{Time|0}}} | 0 <!--
          -->| <div class="upper">&nbsp;</div><!--
          -->{{#var: image_item}}<!--
          --><div class="lower">{{{Quantity|}}}</div><!--
          -->| <div class="upper"><!--
            -->{{#ifeq: {{{Quantity|0}}} | 0 || {{{Quantity|}}} }}{{#if:{{{Unit|}}} | &nbsp;{{{Unit|}}} }}<!--
          --></div><!--
          -->{{#var: image_item}}<!--
          --><div class="lower blue"><!--
            -->{{#ifeq: {{{Quantity|0}}} | 0 ||{{#expr: 60/{{{Time|1}}}*{{{Quantity|0}}} round 2 }} }}<!--
            -->{{#if:{{{Unit|}}} | &nbsp;{{{Unit|}}} }}<!--
          --></div><!--
        -->}}<!--
      -->|#default = <!--
        --><div class="upper">&nbsp;</div><!--
        -->{{#var: image_item}}<!--
        --><div class="lower">{{{Quantity|}}}&nbsp;{{{Unit|}}}</div><!--
     -->}}<!--
     -->}}<!--
   --></div><!--
   --></div><!--
-->}}<!--
-->}}<!--
</includeonly><noinclude>
--></includeonly><noinclude><!--
{{Recipe item/sandbox|Name=Steam hi|Qty=2|Time=10}}
 
{{Recipe item/sandbox|Name=Cement|Qty=2|Time=10|Plus=yes}}
--><templatestyles src="Template:Recipe draw/styles.css" /><!--
{{Recipe item/sandbox|Name=Electricity|Qty=20|Unit=KW|Plus=yes}}
-->{{#vardefine: img_plus | [[File:Plus.png|24x24px]] }}<!--
</noinclude>
-->{{#vardefine: imgsz_reg | 48x48px }}<!--
-->{{#vardefine: pollution_1 | air pollution }}<!--
-->{{#vardefine: pollution_2 | water pollution }}<!--
-->{{#vardefine: pollution_3 | }}<!--
-->{{#vardefine: pollution_4 | }}<!--
 
-->Show all:<!--
--><div class="recipe-wrapper><!--
-->{{Recipe item/sandbox|Name=Steam hi|Quantity=2|Time=10}}<!--
-->{{Recipe item/sandbox|Name=Green Manure|Quantity=0|Time=10|Plus=yes}}<!--
-->{{Recipe item/sandbox|Name=Electricity|Quantity=20|Unit=KW|Time=0|Plus=yes}}<!--
-->{{Recipe item/sandbox|Name=Steam Depleted|Quantity=10|Time=0|Plus=yes}}<!--
-->{{Recipe item/sandbox|Name=Iron Scrap|Unit=?|Time=10|Plus=yes}}<!--
-->{{Recipe item/sandbox|Name=Fertility|Quantity=30|Unit=%|Time=240|Plus=yes}}<!--
-->{{Recipe item/sandbox|Name=Air Pollution|Quantity=15|Time=10|Plus=yes}}<!--
-->{{Recipe item/sandbox|Name=|Quantity=10|Time=10|Plus=yes}}<!--
--></div><!--
 
-->Pollution only:<!--
--><div class="recipe-wrapper><!--
-->{{Recipe item/sandbox|Name=Steam hi|Quantity=2|Time=10|Pollution=only}}<!--
-->{{Recipe item/sandbox|Name=Green Manure|Quantity=0|Time=10|Plus=yes|Pollution=only}}<!--
-->{{Recipe item/sandbox|Name=Electricity|Quantity=20|Unit=KW|Time=0|Plus=yes|Pollution=only}}<!--
-->{{Recipe item/sandbox|Name=Steam Depleted|Quantity=10|Time=0|Plus=yes|Pollution=only}}<!--
-->{{Recipe item/sandbox|Name=Iron Scrap|Unit=?|Time=10|Plus=yes|Pollution=only}}<!--
-->{{Recipe item/sandbox|Name=Fertility|Quantity=30|Unit=%|Time=240|Plus=yes|Pollution=only}}<!--
-->{{Recipe item/sandbox|Name=Air Pollution|Quantity=15|Time=10|Plus=yes|Pollution=only}}<!--
-->{{Recipe item/sandbox|Name=|Quantity=10|Time=10|Plus=yes}}<!--
--></div><!--
 
-->Hide pollution:<!--
--><div class="recipe-wrapper><!--
-->{{Recipe item/sandbox|Name=Steam hi|Quantity=2|Time=10|Pollution=hide}}<!--
-->{{Recipe item/sandbox|Name=Green Manure|Quantity=0|Time=10|Plus=yes|Pollution=hide}}<!--
-->{{Recipe item/sandbox|Name=Electricity|Quantity=20|Unit=KW|Time=0|Plus=yes|Pollution=hide}}<!--
-->{{Recipe item/sandbox|Name=Steam Depleted|Quantity=10|Time=0|Plus=yes|Pollution=hide}}<!--
-->{{Recipe item/sandbox|Name=Iron Scrap|Unit=?|Time=10|Plus=yes|Pollution=hide}}<!--
-->{{Recipe item/sandbox|Name=Fertility|Quantity=30|Unit=%|Time=240|Plus=yes|Pollution=hide}}<!--
-->{{Recipe item/sandbox|Name=Air Pollution|Quantity=15|Time=10|Plus=yes|Pollution=hide}}<!--
-->{{Recipe item/sandbox|Name=|Quantity=10|Time=10|Plus=yes}}<!--
--></div><!--
 
--></noinclude>

Latest revision as of 14:33, 16 May 2023

Show all:

Plus.png
Green Manure.png
Plus.png
 
Electricity.png
20 KW
Plus.png
 
Steam Depleted.png
10
Plus.png
?
Iron Scrap.png
?
Plus.png
30 %
Fertility.png
7.5 %
Plus.png
15
Air Pollution.png
90

Pollution only:

Plus.png
15
Air Pollution.png
90

Hide pollution:

Plus.png
Green Manure.png
Plus.png
 
Electricity.png
20 KW
Plus.png
 
Steam Depleted.png
10
Plus.png
?
Iron Scrap.png
?
Plus.png
30 %
Fertility.png
7.5 %