Template:RecipeUses: Difference between revisions

Template page
(Created page with "<includeonly>{{#cargo_compound_query: tables=entity;fields=name,ingredient1,amount1,ingredient2,amount2,ingredient3,amount3,ingredient4,amount4,producer1,time1,producer2,time2;where='{{{1}}}' in (ingredient1,ingredient2,ingredient3,ingredient4) |tables=component;fields=name,ingredient1,amount1,ingredient2,amount2,ingredient3,amount3,ingredient4,amount4,producer1,time1,producer2,time2;where='{{{1}}}' in (ingredient1,ingredient2,ingredient3,ingredient4) |tables=item;fields...")
 
mNo edit summary
 
(10 intermediate revisions by one other user not shown)
Line 1: Line 1:
<includeonly>{{#cargo_compound_query:
<includeonly>{|
<tr style="{{#ifeq: {{#expr: {{#var:__COUNTER__}} mod 2}}|0|background-color:#1F2737!important;}}">
{{#cargo_compound_query:
tables=entity;fields=name,ingredient1,amount1,ingredient2,amount2,ingredient3,amount3,ingredient4,amount4,producer1,time1,producer2,time2;where='{{{1}}}' in (ingredient1,ingredient2,ingredient3,ingredient4)
tables=entity;fields=name,ingredient1,amount1,ingredient2,amount2,ingredient3,amount3,ingredient4,amount4,producer1,time1,producer2,time2;where='{{{1}}}' in (ingredient1,ingredient2,ingredient3,ingredient4)
|tables=component;fields=name,ingredient1,amount1,ingredient2,amount2,ingredient3,amount3,ingredient4,amount4,producer1,time1,producer2,time2;where='{{{1}}}' in (ingredient1,ingredient2,ingredient3,ingredient4)
|tables=component;fields=name,ingredient1,amount1,ingredient2,amount2,ingredient3,amount3,ingredient4,amount4,producer1,time1,producer2,time2;where='{{{1}}}' in (ingredient1,ingredient2,ingredient3,ingredient4)
|tables=item;fields=name,ingredient1,amount1,ingredient2,amount2,ingredient3,amount3,ingredient4,amount4,producer1,time1,producer2,time2;where='{{{1}}}' in (ingredient1,ingredient2,ingredient3,ingredient4)
|tables=item;fields=name,ingredient1,amount1,ingredient2,amount2,ingredient3,amount3,ingredient4,amount4,producer1,time1,producer2,time2;where='{{{1}}}' in (ingredient1,ingredient2,ingredient3,ingredient4)
|format=template
|format=template
|template=Recipe_Uses
|template=RecipeUses_Layout
|named args=yes</includeonly><noinclude>{{Documentation}}</noinclude>
|named args=yes
}}
|}</includeonly><noinclude>{{Documentation}}</noinclude>

Latest revision as of 23:49, 7 October 2023

Documentation


Documentation:

Usage

{{RecipeUses|Item Name}}

For a given item, produces a list of all things (component, item, entity) which uses the item in its recipe using the Template:RecipeUses_Layout.

  • Todo: Fix the IF statement for - if something takes 1 second to produce, the time should say 'sec' not 'secs'
  • Try to figue out how to colour the background of every other row. AI says do this:
    • <tr style="{{#ifeq: {{#expr: {{#var:__COUNTER__}} mod 2}}|0|background-color:#f2f2f2!important;}}">?
  • Didnt work, did it AI. Can Anyone else help please??

To see a similar template that lists uses in a table, click Template:RecipeUsages.

Example

{{RecipeUses|Silica Sand}}

Trilobyte
Output 20
Bug Chitin
10
Silica Sand
1
Virus Datacube

Produced By 9 secs
Robot Hive


Trilobyte
Output 20
Bug Chitin
10
Silica Sand
1
Virus Datacube

Produced By 9 secs
Robot Hive


Wasp
Output 20
Bug Chitin
10
Silica Sand
1
Virus Datacube

Produced By 9 secs
Robot Hive


Resimulator Core
Output 10
Blight Crystal Chunk
10
Silica Sand


Produced By 30 secs
Assembler


Aluminum Sheet
Output 1
Aluminum Rod
1
Silica Sand


Produced By 24 secs
Human Command Center
30 secs
Human Factory

Bug Chitin
Output 5
Blight Crystal Chunk
5
Silica Sand


Produced By 24 secs
AI Research Center
30 secs
AI Research Center (Mission)

Concretes Lab
Output 5
Laterite ore
1
Silica Sand


Produced By 9.6 secs
Human Factory
4.8 secs
Human Factory

Crystal Powder
Output 3
Crystal Chunk
1
Silica Sand


Produced By 6 secs
Human Refinery
12 secs
Refinery

Obsidian Brick
Output 2
Obsidian Chunk
1
Silica Sand


Produced By 8 secs
Refinery
4 secs
Reforming Pool

Resimulator Core
Output 10
Silica Sand
10
Blight Crystal Chunk


Produced By 30 secs
Assembler


Silicon
Output 2
Silica Sand



Produced By 16 secs
Fabricator
12 secs
Human Refinery

Wire
Output 1
Metal Plate
1
Silica Sand


Produced By 16 secs
Fabricator
12 secs
Human Refinery

The above Template documentation is transcluded from Template:RecipeUses/doc. (edit | history)