Template:Recipes: Difference between revisions

From Official Barotrauma Wiki
Jump to: navigation, search
No edit summary
No edit summary
Line 10: Line 10:
! fabtype{{#cargo_query:
! fabtype{{#cargo_query:
tables = Items
tables = 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.fabricatortype  
| 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.fabricatortype
| where = {{#switch: {{{1}}}|medicalfabricator=Items.fabricatortype {{=}} "medicalfabricator"|fabricator=Items.fabricator {{=}} "yes"|deconstructor=Items.deconstructor {{=}} "yes" AND Items.fabricator {{=}} "no"}}
| format = template
| format = template
| template = Recipes/row
| template = Recipes/row

Revision as of 16:55, 17 November 2021

Documentation

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.
  • Shows fabricator recipes for all items if "everything=yes" is defined.
medicalfabricator displays the list of items that can be fabricated in the medical fabricator with the current item.
  • Shows medical fabricator recipes for all items if "everything=yes" is defined.
deconstructor displays the list of items that can be deconstructed into the current item, but can't be crafted using the current item.
  • Shows deconstructor recipes for all items if "everything=yes" is defined.
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 fab decons fabtype
Error: No field named "fabricatortype" found for the database table "Items".


{{Recipes|deconstructor|material=Plastic|width=40}}
gives:

Crafting Materials Crafting Talent, Skill, Time Item Deconstruction Time Deconstruction Yield fab decons fabtype
Error: No field named "fabricatortype" found for the database table "Items".


{{Recipes|deconstructor|material=Titanium|width=40}}
gives:

Crafting Materials Crafting Talent, Skill, Time Item Deconstruction Time Deconstruction Yield fab decons fabtype
Error: No field named "fabricatortype" found for the database table "Items".


{{Recipes|deconstructor|material=Titanium|exclude=Alloy|width=40}}
gives:

Crafting Materials Crafting Talent, Skill, Time Item Deconstruction Time Deconstruction Yield fab decons fabtype
Error: No field named "fabricatortype" found for the database table "Items".


{{Recipes|deconstructor|material=Sodium|allowfab=1|width=40}}
gives:

Crafting Materials Crafting Talent, Skill, Time Item Deconstruction Time Deconstruction Yield fab decons fabtype
Error: No field named "fabricatortype" found for the database table "Items".