Template:Recipes: Difference between revisions
(wrong place) |
(so yeah, I forgot to hook up to the medical items table. Maybe not such a good idea to have a separate infobox/cargo table, after all.) |
||
Line 8: | Line 8: | ||
! style="width:12%;" | Deconstruction Time | ! style="width:12%;" | Deconstruction Time | ||
! Deconstruction Yield{{#cargo_query: | ! Deconstruction Yield{{#cargo_query: | ||
tables = Items | tables = Items,Medical_Items | ||
| fields = Items.name, Items.icon, Items.fabricatormaterials, Items.fabricatortime, Items.fabricatorskill, Items.fabricatorskill2, Items.fabricatorskilllevel, Items.fabricatorskilllevel2, Items.fabricatormaterialsalt, Items.fabricatortimealt, Items.fabricatorskilllevelalt, Items.deconstructormaterials, Items.deconstructortime, Items.talent, Items.fabricator, Items.deconstructor, Items.medicalfabricator, Items.fabricatedamount | | join on = Items.name = Medical_Items.name | ||
| fields = Items.name, Items.icon, Items.fabricatormaterials, Items.fabricatortime, Items.fabricatorskill, Items.fabricatorskill2, Items.fabricatorskilllevel, Items.fabricatorskilllevel2, Items.fabricatormaterialsalt, Items.fabricatortimealt, Items.fabricatorskilllevelalt, Items.deconstructormaterials, Items.deconstructortime, Items.talent, Items.fabricator, Items.deconstructor, Items.medicalfabricator, Items.fabricatedamount, Medical_Items.name, Medical_Items.icon, Medical_Items.fabricatormaterials, Medical_Items.fabricatortime, Medical_Items.fabricatorskill, Medical_Items.fabricatorskill2, Medical_Items.fabricatorskilllevel, Medical_Items.fabricatorskilllevel2, Medical_Items.fabricatormaterialsalt, Medical_Items.fabricatortimealt, Medical_Items.fabricatorskilllevelalt, Medical_Items.deconstructormaterials, Medical_Items.deconstructortime, Medical_Items.talent, Medical_Items.fabricator, Medical_Items.deconstructor, Medical_Items.medicalfabricator, Medical_Items.fabricatedamount | |||
| where = {{#if:{{{everything|}}}|<!-- | | where = {{#if:{{{everything|}}}|<!-- | ||
Line 23: | Line 24: | ||
if {{{1}}} = medicalfabricator, list medfab recipes for PAGENAME/material | if {{{1}}} = medicalfabricator, list medfab recipes for PAGENAME/material | ||
-->|medicalfabricator= | -->|medicalfabricator=Medical_Items.medicalfabricator {{=}} "1" AND Medical_Items.fabricatormaterials LIKE "%{{{material|{{PAGENAME}}}}}%" {{#if:{{{exclude|}}}|AND Medical_Items.fabricatormaterials NOT LIKE "%{{{exclude}}}%" {{#if:{{{exclude2|}}}|AND Medical_Items.fabricatormaterials NOT LIKE "%{{{exclude2}}}%"|}}|}}<!-- | ||
if {{{1}}} = deconstructor, list non-craftable decons recipes for PAGENAME/material | if {{{1}}} = deconstructor, list non-craftable decons recipes for PAGENAME/material | ||
-->|deconstructor=Items.fabricator {{=}} "0" AND Items.medicalfabricator {{=}} "0" AND Items.deconstructormaterials LIKE "%{{{material|{{PAGENAME}}}}}%" {{#if:{{{exclude|}}}|AND Items.deconstructormaterials NOT LIKE "%{{{exclude}}}%" {{#if:{{{exclude2|}}}|AND Items.deconstructormaterials NOT LIKE "%{{{exclude2}}}%"|}}|}}<!-- | -->|deconstructor=Items.fabricator {{=}} "0" AND Items.medicalfabricator {{=}} "0" AND Medical_Items.medicalfabricator {{=}} "0" AND Items.deconstructormaterials LIKE "%{{{material|{{PAGENAME}}}}}%" {{#if:{{{exclude|}}}|AND Items.deconstructormaterials NOT LIKE "%{{{exclude}}}%" {{#if:{{{exclude2|}}}|AND Items.deconstructormaterials NOT LIKE "%{{{exclude2}}}%"|}}|}}<!-- | ||
-->|#default= }}<!-- ######### TODO: exclude medfab items from decons table... ######### | -->|#default= }}<!-- ######### TODO: exclude medfab items from decons table... ######### | ||
-->}} | -->}} |
Revision as of 12:11, 23 November 2021
This template is used to display a list of items, and their crafting requirements / deconstruction yields.
Syntax
{{ Recipes | fabricator OR medicalfabricator OR deconstructor | width = <customwidth> (default 70) | everything = yes | material = <Custom Material> | exclude = <Term to exclude>}}
everything | If this is set to yes (or any non-null value), then all the items are displayed. This is meant to be used on the main fabricator/deconstructor pages for example. For individual pages, this parameter shouldn't be specified. |
fabricator | displays the list of items that can be fabricated in the standard fabricator with the current item.
|
medicalfabricator | displays the list of items that can be fabricated in the medical fabricator with the current item.
|
deconstructor | displays the list of items that can be deconstructed into the current item, but can't be crafted using the current item.
|
material | sets a custom material to be listed. If omitted, it will default to the page name. Note that all items which have this term in their name will be listed, so the "exclude" parameter may be necessary as well. |
exclude | excludes a string from the query. This is useful in case the current item's name is also contained in another item's name, such as "Diving Suit" is contained in "Combat Diving Suit". |
exclude2 | same as above, useful if one exclusion isn't enough. |
Examples
In the following examples, "material" is always specified because it would otherwise default to the page name. On an item's page, it can be omitted.
{{Recipes|fabricator|material=Diving Suit}}
gives:
Crafting Materials | Crafting Talent, Skill, Time | Item | Deconstruction Time | Deconstruction Yield |
---|---|---|---|---|
[[File:|50px]] [[]] |
Cannot be deconstructed | |||
[[File:|50px]] [[]] |
Cannot be deconstructed | |||
[[File:|50px]] [[]] |
Cannot be deconstructed | |||
[[File:|50px]] [[]] |
Cannot be deconstructed |
{{Recipes|deconstructor|material=Plastic|width=40}}
gives:
Item | Deconstruction Time | Deconstruction Yield | ||
---|---|---|---|---|
Cargo didn't find any items that are crafted with this item in the database.
|
{{Recipes|deconstructor|material=Titanium|width=40}}
gives:
Item | Deconstruction Time | Deconstruction Yield | ||
---|---|---|---|---|
Cargo didn't find any items that are crafted with this item in the database.
|
{{Recipes|deconstructor|material=Titanium|exclude=Alloy|width=40}}
gives:
Item | Deconstruction Time | Deconstruction Yield | ||
---|---|---|---|---|
Cargo didn't find any items that are crafted with this item in the database.
|
{{Recipes|deconstructor|material=Sodium|allowfab=1|width=40}}
gives:
Item | Deconstruction Time | Deconstruction Yield | ||
---|---|---|---|---|
Cargo didn't find any items that are crafted with this item in the database.
|
The above documentation is transcluded from Template:Recipes/doc. (edit | history)