|
|
Line 28: |
Line 28: |
| }}</noinclude><includeonly><!-- | | }}</noinclude><includeonly><!-- |
| -->{{#if: {{NAMESPACE}} || {{#cargo_store: _table = recipes}} }}<!-- | | -->{{#if: {{NAMESPACE}} || {{#cargo_store: _table = recipes}} }}<!-- |
| --><templatestyles src="Template:Recipe/styles.css" /><!--
| |
|
| |
| ** Clear variables in case of multiple uses on one page **
| |
|
| |
| -->{{#vardefine: bldg | none}}<!--
| |
| -->{{#vardefine: accepts | no}}<!--
| |
| -->{{#vardefine: provides | no}}<!--
| |
|
| |
| ** Set up variables to specify desired settings and reuse code **
| |
|
| |
| -->{{#vardefine: img_arrow | [[File:Transform.png|32x32px]] }}<!--
| |
| -->{{#vardefine: img_plus | [[File:Plus.png|24x24px]] }}<!--
| |
| -->{{#vardefine: imgsz_bldg | 72x72px }}<!--
| |
| -->{{#vardefine: imgsz_large | 64x64px }}<!--
| |
| -->{{#vardefine: imgsz_reg | 48x48px }}<!--
| |
|
| |
| --><div class="recipe-wrapper"><!--
| |
|
| |
| ** Special output for when `Mining = yes` **
| |
|
| |
| -->{{#if: {{{Mining|}}} |<!--
| |
| --><div class="block">[[File:Mining.png{{!}}{{#var: imgsz_large}}{{!}}link=Mining]]</div><!--
| |
| --><div class="block">{{#var: img_arrow}}</div><!--
| |
| --><div class="block">[[File:{{{Output1Name}}}.png{{!}}{{#var: imgsz_large}}{{!}}link={{{Output1Name}}}]]</div><!--
| |
| -->}}<!--
| |
|
| |
| ** Special output for when `Dumping = yes` **
| |
|
| |
| -->{{#if: {{{Dumping|}}} |<!--
| |
| --><div class="block">[[File:{{{Input1Name}}}.png{{!}}{{#var: imgsz_large}}{{!}}link={{{Input1Name}}}]]</div><!--
| |
| --><div class="block">{{#var: img_arrow}}</div><!--
| |
| --><div class="block">[[File:Dumping.png{{!}}{{#var: imgsz_large}}{{!}}link=Dumping]]</div><!--
| |
| -->}}<!--
| |
|
| |
| ** Stop output if we we drew Mining or Dumping **
| |
|
| |
| -->{{#if: {{{Mining|}}}{{{Dumping|}}} ||<!--
| |
|
| |
| ** Check if Template:Infobox_machine already knows the building. If not, try the `Building` param. **
| |
| ** Then if we still don't know the building, halt execution and display an error message. **
| |
|
| |
| -->{{#if: {{#varexists: info_bldg}}|<!--
| |
| -->{{#vardefine: bldg | {{#var: info_bldg}} }}|<!--
| |
| -->{{#if: {{{Building|}}}|<!--
| |
| -->{{#vardefine: bldg | {{{Building}}} }}|<!--
| |
| --><span style="font-size: 24px; color: red; font-weight: bold">Building not defined</span><!--
| |
| -->}}<!--
| |
| -->}}<!--
| |
|
| |
| ** Main sequence starts here **
| |
|
| |
| -->{{#ifeq: {{#var: bldg}} | none ||<!--
| |
|
| |
| ** Determine if we should display the "PROVIDES" or "ACCEPTS" text in the output **
| |
|
| |
| -->{{#switch: {{#var: bldg}}
| |
| | Flare
| |
| | Smoke Stack
| |
| | Liquid Dump = {{#vardefine: accepts | yes}}
| |
| | Groundwater Pump
| |
| | Air Separator
| |
| | Seawater Pump
| |
| | Seawater Pump (L)
| |
| | Oil Pump = {{#vardefine: provides | yes}}
| |
| }}<!--
| |
|
| |
| ** Draw the building (and colon) unless the user or Template:Infobox_machine set it to hidden. **
| |
|
| |
| -->{{#if: {{{HideBldg|}}}{{#varexists:hidebldg}} ||<!--
| |
| --><div class="block">[[File:{{{Building}}}.png{{!}}{{#var: imgsz_bldg}}{{!}}link={{{Building}}}]]</div><!--
| |
| --><div class="block colon">:</div><!--
| |
| -->}}<!--
| |
|
| |
| ** Draw "ACCEPTS" or "PROVIDES", if appropriate **
| |
|
| |
| -->{{#ifeq: {{#var: accepts}} | yes | <div class="block accepts-provides">ACCEPTS</div> }}<!--
| |
| -->{{#ifeq: {{#var: provides}} | yes | <div class="block accepts-provides">PROVIDES</div> }}<!--
| |
|
| |
| ** Draw 1st input unless {{#var: provides}} is `yes`. **
| |
|
| |
| -->{{#ifeq: {{#var: provides}} | yes ||<!--
| |
| -->{{#if: {{{Input1Name|}}} |<!--
| |
| --><div class="block"><!--
| |
| --><div class="upper">{{#if: {{{Input1Unit|}}} | | {{{Input1Qty|}}} {{{Input1Unit|}}} }}</div><!--
| |
| -->[[File:{{{Input1Name}}}.png{{!}}{{#var: imgsz_reg}}{{!}}link={{{Input1Name}}}]]<!--
| |
| -->{{#if: {{{Input1Unit|}}} | <!--
| |
| --><div class="lower">{{{Input1Qty|}}} {{{Input1Unit|}}}</div>|<!--
| |
| --><div class="lower blue">{{#expr: 60/{{{Time|1}}}*{{{Input1Qty|}}} round 2 }}</div><!--
| |
| -->}}<!--
| |
| --></div><!--
| |
| -->}}<!--
| |
| -->}}<!--
| |
|
| |
| ** Draw the 1st output instead if {{#var: provides}} is `yes`. **
| |
|
| |
| -->{{#ifeq: {{#var: provides}} | yes |<!--
| |
| -->{{#if: {{{Output1Name|}}} |<!--
| |
| --><div class="block"><!--
| |
| --><div class="upper">{{#if: {{{Output1Unit|}}} | | {{{Output1Qty|}}} {{{Output1Unit|}}} }}</div><!--
| |
| -->[[File:{{{Output1Name}}}.png{{!}}{{#var: imgsz_reg}}{{!}}link={{{Output1Name}}}]]<!--
| |
| -->{{#if: {{{Output1Unit|}}} | <!--
| |
| --><div class="lower">{{{Output1Qty|}}} {{{Output1Unit|}}}</div>|<!--
| |
| --><div class="lower blue">{{#expr: 60/{{{Time|1}}}*{{{Output1Qty|}}} round 2 }}</div><!--
| |
| -->}}<!--
| |
| --></div><!--
| |
| -->}}<!--
| |
| -->}}<!--
| |
|
| |
| ** Draw 2nd input **
| |
|
| |
| -->{{#if: {{{Input2Name|}}} |<!--
| |
| --><div class="block">{{#var: img_plus}}</div><!--
| |
| --><div class="block"><!--
| |
| --><div class="upper">{{#if: {{{Input2Unit|}}} | | {{{Input2Qty|}}} {{{Input2Unit|}}} }}</div><!--
| |
| -->[[File:{{{Input2Name}}}.png{{!}}{{#var: imgsz_reg}}{{!}}link={{{Input2Name}}}]]<!--
| |
| -->{{#if: {{{Input2Unit|}}} | <!--
| |
| --><div class="lower">{{{Input2Qty|}}} {{{Input2Unit|}}}</div>|<!--
| |
| --><div class="lower blue">{{#expr: 60/{{{Time|1}}}*{{{Input2Qty|}}} round 2 }}</div><!--
| |
| -->}}<!--
| |
| --></div><!--
| |
| -->}}<!--
| |
|
| |
|
| |
| ** Draw 3rd input **
| |
|
| |
| -->{{#if: {{{Input3Name|}}} |<!--
| |
| --><div class="block">{{#var: img_plus}}</div><!--
| |
| --><div class="block"><!--
| |
| --><div class="upper">{{#if: {{{Input3Unit|}}} | | {{{Input3Qty|}}} {{{Input3Unit|}}} }}</div><!--
| |
| -->[[File:{{{Input3Name}}}.png{{!}}{{#var: imgsz_reg}}{{!}}link={{{Input3Name}}}]]<!--
| |
| -->{{#if: {{{Input3Unit|}}} | <!--
| |
| --><div class="lower">{{{Input3Qty|}}} {{{Input3Unit|}}}</div>|<!--
| |
| --><div class="lower blue">{{#expr: 60/{{{Time|1}}}*{{{Input3Qty|}}} round 2 }}</div><!--
| |
| -->}}<!--
| |
| --></div><!--
| |
| -->}}<!--
| |
|
| |
| ** Draw 4th input **
| |
|
| |
| -->{{#if: {{{Input4Name|}}} |<!--
| |
| --><div class="block">{{#var: img_plus}}</div><!--
| |
| --><div class="block"><!--
| |
| --><div class="upper">{{#if: {{{Input4Unit|}}} | | {{{Input4Qty|}}} {{{Input4Unit|}}} }}</div><!--
| |
| -->[[File:{{{Input4Name}}}.png{{!}}{{#var: imgsz_reg}}{{!}}link={{{Input4Name}}}]]<!--
| |
| -->{{#if: {{{Input4Unit|}}} | <!--
| |
| --><div class="lower">{{{Input4Qty|}}} {{{Input4Unit|}}}</div>|<!--
| |
| --><div class="lower blue">{{#expr: 60/{{{Time|1}}}*{{{Input4Qty|}}} round 2 }}</div><!--
| |
| -->}}<!--
| |
| --></div><!--
| |
| -->}}<!--
| |
|
| |
| ** Draw 5th input **
| |
|
| |
| -->{{#if: {{{Input5Name|}}} |<!--
| |
| --><div class="block">{{#var: img_plus}}</div><!--
| |
| --><div class="block"><!--
| |
| --><div class="upper">{{#if: {{{Input5Unit|}}} | | {{{Input5Qty|}}} {{{Input5Unit|}}} }}</div><!--
| |
| -->[[File:{{{Input5Name}}}.png{{!}}{{#var: imgsz_reg}}{{!}}link={{{Input5Name}}}]]<!--
| |
| -->{{#if: {{{Input5Unit|}}} | <!--
| |
| --><div class="lower">{{{Input5Qty|}}} {{{Input5Unit|}}}</div>|<!--
| |
| --><div class="lower blue">{{#expr: 60/{{{Time|1}}}*{{{Input5Qty|}}} round 2 }}</div><!--
| |
| -->}}<!--
| |
| --></div><!--
| |
| -->}}<!--
| |
|
| |
| ** Draw 6th input **
| |
|
| |
| -->{{#if: {{{Input6Name|}}} |<!--
| |
| --><div class="block">{{#var: img_plus}}</div><!--
| |
| --><div class="block"><!--
| |
| --><div class="upper">{{#if: {{{Input6Unit|}}} | | {{{Input6Qty|}}} {{{Input6Unit|}}} }}</div><!--
| |
| -->[[File:{{{Input6Name}}}.png{{!}}{{#var: imgsz_reg}}{{!}}link={{{Input6Name}}}]]<!--
| |
| -->{{#if: {{{Input6Unit|}}} | <!--
| |
| --><div class="lower">{{{Input6Qty|}}} {{{Input6Unit|}}}</div>|<!--
| |
| --><div class="lower blue">{{#expr: 60/{{{Time|1}}}*{{{Input6Qty|}}} round 2 }}</div><!--
| |
| -->}}<!--
| |
| --></div><!--
| |
| -->}}<!--
| |
|
| |
| ** Draw the recipe times unless it has a unit defined (KW, MW, etc). **
| |
| ** Use the "/ 60 🕓" format if: **
| |
| ** {{#var: provides}} is `yes` OR ( {{#var: accepts}} is `yes` AND {{{Output1Name|}}} doesn't exist ) **
| |
| ** Draw an arrow unless: **
| |
| ** {{#var: provides}} is `yes` OR ( {{#var: accepts}} is `yes` AND {{{Output1Name|}}} doesn't exist ) **
| |
| ** e.g., pumping groundwater, dumping brine (non-polluting) **
| |
|
| |
| -->{{#if: {{{Time|}}} |<!--
| |
| --><div class="block time"><!--
| |
| -->{{#ifeq: {{lc:{{{Time}}}}} | instant | <div>{{#var: img_arrow}}</div> |<!--
| |
| --><div class="upper"><!--
| |
| -->{{#ifeq: {{#var: provides}} | yes |<!--
| |
| -->/ |<!--
| |
| -->{{#ifeq: {{#var: accepts}} | yes |<!--
| |
| -->{{#if: {{{Output1Name|}}} || <!--
| |
| -->/ <!--
| |
| -->}}<!--
| |
| -->}}<!--
| |
| -->}}<!--
| |
| -->{{{Time}}} [[File:Clock.png|link=Time|16x16px]]<!--
| |
| --></div><!--
| |
| --><div><!--
| |
| -->{{#ifeq: {{#var: provides}} | yes |<!--
| |
| --><br/> |<!--
| |
| -->{{#ifeq: {{#var: accepts}} | yes |<!--
| |
| -->{{#if: {{{Output1Name|}}} | <!--
| |
| -->{{#var: img_arrow}} | <!--
| |
| --><br/><!--
| |
| -->}}|<!--
| |
| -->{{#var: img_arrow}}<!--
| |
| -->}}<!--
| |
| -->}}<!--
| |
| --></div><!--
| |
| --><div class="lower blue"><!--
| |
| -->{{#ifeq: {{#var: provides}} | yes |<!--
| |
| -->/ |<!--
| |
| -->{{#ifeq: {{#var: accepts}} | yes |<!--
| |
| -->{{#if: {{{Output1Name|}}} || <!--
| |
| -->/ <!--
| |
| -->}}<!--
| |
| -->}}<!--
| |
| -->}}<!--
| |
| -->60 [[File:Clock 60s.png|link=Time|16x16px]]<!--
| |
| --></div><!--
| |
| -->}}<!--
| |
| --></div><!--
| |
| -->}}<!--
| |
|
| |
| ** Draw 1st output unless {{#var: provides}} is `yes` **
| |
|
| |
| -->{{#ifeq: {{#var: provides}} | yes ||<!--
| |
| -->{{#if: {{{Output1Name|}}} |<!--
| |
| --><div class="block"><!--
| |
| --><div class="upper">{{#if: {{{Output1Unit|}}} | | {{{Output1Qty|}}} {{{Output1Unit|}}} }}</div><!--
| |
| -->[[File:{{{Output1Name}}}.png{{!}}{{#var: imgsz_reg}}{{!}}link={{{Output1Name}}}]]<!--
| |
| -->{{#if: {{{Output1Unit|}}} | <!--
| |
| --><div class="lower">{{{Output1Qty|}}} {{{Output1Unit|}}}</div>|<!--
| |
| --><div class="lower blue">{{#expr: 60/{{{Time|1}}}*{{{Output1Qty|}}} round 2 }}</div><!--
| |
| -->}}<!--
| |
| --></div><!--
| |
| -->}}<!--
| |
| -->}}<!--
| |
|
| |
| ** Draw 2nd output **
| |
|
| |
| -->{{#if: {{{Output2Name|}}} |<!--
| |
| --><div class="block">{{#var: img_plus}}</div><!--
| |
| --><div class="block"><!--
| |
| --><div class="upper">{{#if: {{{Output2Unit|}}} | | {{{Output2Qty|}}} {{{Output2Unit|}}} }}</div><!--
| |
| -->[[File:{{{Output2Name}}}.png{{!}}{{#var: imgsz_reg}}{{!}}link={{{Output2Name}}}]]<!--
| |
| -->{{#if: {{{Output2Unit|}}} | <!--
| |
| --><div class="lower">{{{Output2Qty|}}} {{{Output2Unit|}}}</div>|<!--
| |
| --><div class="lower blue">{{#expr: 60/{{{Time|1}}}*{{{Output2Qty|}}} round 2 }}</div><!--
| |
| -->}}<!--
| |
| --></div><!--
| |
| -->}}<!--
| |
|
| |
|
| |
| ** Draw 3rd output **
| |
|
| |
| -->{{#if: {{{Output3Name|}}} |<!--
| |
| --><div class="block">{{#var: img_plus}}</div><!--
| |
| --><div class="block"><!--
| |
| --><div class="upper">{{#if: {{{Output3Unit|}}} | | {{{Output3Qty|}}} {{{Output3Unit|}}} }}</div><!--
| |
| -->[[File:{{{Output3Name}}}.png{{!}}{{#var: imgsz_reg}}{{!}}link={{{Output3Name}}}]]<!--
| |
| -->{{#if: {{{Output3Unit|}}} | <!--
| |
| --><div class="lower">{{{Output3Qty|}}} {{{Output3Unit|}}}</div>|<!--
| |
| --><div class="lower blue">{{#expr: 60/{{{Time|1}}}*{{{Output3Qty|}}} round 2 }}</div><!--
| |
| -->}}<!--
| |
| --></div><!--
| |
| -->}}<!--
| |
|
| |
| ** Draw 4th output **
| |
|
| |
| -->{{#if: {{{Output4Name|}}} |<!--
| |
| --><div class="block">{{#var: img_plus}}</div><!--
| |
| --><div class="block"><!--
| |
| --><div class="upper">{{#if: {{{Output4Unit|}}} | | {{{Output4Qty|}}} {{{Output4Unit|}}} }}</div><!--
| |
| -->[[File:{{{Output4Name}}}.png{{!}}{{#var: imgsz_reg}}{{!}}link={{{Output4Name}}}]]<!--
| |
| -->{{#if: {{{Output4Unit|}}} | <!--
| |
| --><div class="lower">{{{Output4Qty|}}} {{{Output4Unit|}}}</div>|<!--
| |
| --><div class="lower blue">{{#expr: 60/{{{Time|1}}}*{{{Output4Qty|}}} round 2 }}</div><!--
| |
| -->}}<!--
| |
| --></div><!--
| |
| -->}}<!--
| |
|
| |
| ** Draw 5th output **
| |
|
| |
| -->{{#if: {{{Output5Name|}}} |<!--
| |
| --><div class="block">{{#var: img_plus}}</div><!--
| |
| --><div class="block"><!--
| |
| --><div class="upper">{{#if: {{{Output5Unit|}}} | | {{{Output5Qty|}}} {{{Output5Unit|}}} }}</div><!--
| |
| -->[[File:{{{Output5Name}}}.png{{!}}{{#var: imgsz_reg}}{{!}}link={{{Output5Name}}}]]<!--
| |
| -->{{#if: {{{Output5Unit|}}} | <!--
| |
| --><div class="lower">{{{Output5Qty|}}} {{{Output5Unit|}}}</div>|<!--
| |
| --><div class="lower blue">{{#expr: 60/{{{Time|1}}}*{{{Output5Qty|}}} round 2 }}</div><!--
| |
| -->}}<!--
| |
| --></div><!--
| |
| -->}}<!--
| |
|
| |
| ** Draw 6th output **
| |
|
| |
| -->{{#if: {{{Output6Name|}}} |<!--
| |
| --><div class="block">{{#var: img_plus}}</div><!--
| |
| --><div class="block"><!--
| |
| --><div class="upper">{{#if: {{{Output6Unit|}}} | | {{{Output6Qty|}}} {{{Output6Unit|}}} }}</div><!--
| |
| -->[[File:{{{Output6Name}}}.png{{!}}{{#var: imgsz_reg}}{{!}}link={{{Output6Name}}}]]<!--
| |
| -->{{#if: {{{Output6Unit|}}} | <!--
| |
| --><div class="lower">{{{Output6Qty|}}} {{{Output6Unit|}}}</div>|<!--
| |
| --><div class="lower blue">{{#expr: 60/{{{Time|1}}}*{{{Output6Qty|}}} round 2 }}</div><!--
| |
| -->}}<!--
| |
| --></div><!--
| |
| -->}}<!--
| |
|
| |
| -->}}<!-- End of building check
| |
| -->}}<!-- End of Mining/Dumping check
| |
|
| |
| --></div></includeonly><!--
| |
| --><noinclude>{{documentation}}</noinclude> | | --><noinclude>{{documentation}}</noinclude> |