(Remove mention of templates, we don't need no stinkin' templates (also I can't make them so we don't have any)) Tag: 2017 source edit |
(Fix header) Tag: 2017 source edit |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
Source data for this module is stored at [[Module:GameData/protosets.json]] | Source data for this module is stored at [[Module:GameData/protosets.json]] | ||
= Exported Functions = | |||
Each function in this module is exported twice: one as-is for use in templates, and once with a Direct suffix for use directly on pages using <nowiki>{{#invoke|GameData|functionDirect|...}}</nowiki>. | |||
== recipesMaking == | |||
Arguments: Item Name | |||
Print recipes making an item, given by name. This produces a full table with headers. | |||
Example invocation: | |||
<pre>{{#invoke:GameData|recipesMakingDirect|Sulfuric Acid}}</pre> | |||
{{#invoke:GameData|recipesMakingDirect|Sulfuric Acid}} | |||
== recipesUsing == | |||
Arguments: Item Name | |||
Print recipes using an item as an ingredient. Output is separated into two full tables: recipes which create components, and recipes which create buildings. This is selected by the CanBuild property of the produced items. | |||
Example invocation: | |||
<pre>{{#invoke:GameData|recipesUsingDirect|Copper Ingot}}</pre> | |||
{{#invoke:GameData|recipesUsingDirect|Copper Ingot}} | |||
== itemRecipes == | |||
Arguments: Item Name | |||
Print recipes making an item. This does not produce a full table, and is intended for use in ItemInfo boxes such as at [[Graphene/ItemInfo]]. | |||
== itemField == | |||
Arguments: Item Name, Field Name | |||
Print a field from an item, with the field to print as an argument. You can look at [[Module:GameData/protosets.json]] and scroll down or search (Ctrl+F) to the ItemProtoSet to browse fields. | |||
Example invocation: | |||
<pre>{{#invoke:GameData|itemFieldDirect|Magnetic Coil|Description}}</pre> | |||
{{#invoke:GameData|itemFieldDirect|Magnetic Coil|Description}} | |||
<pre>{{#invoke:GameData|itemFieldDirect|Hydrogen|StackSize}}</pre> | |||
{{#invoke:GameData|itemFieldDirect|Hydrogen|StackSize}} |
Latest revision as of 03:16, 28 April 2024
Source data for this module is stored at Module:GameData/protosets.json
Exported Functions
Each function in this module is exported twice: one as-is for use in templates, and once with a Direct suffix for use directly on pages using {{#invoke|GameData|functionDirect|...}}.
recipesMaking
Arguments: Item Name
Print recipes making an item, given by name. This produces a full table with headers.
Example invocation:
{{#invoke:GameData|recipesMakingDirect|Sulfuric Acid}}
Recipe | Building | Replicator? | Technology |
---|---|---|---|
✖ | |||
✖ |
recipesUsing
Arguments: Item Name
Print recipes using an item as an ingredient. Output is separated into two full tables: recipes which create components, and recipes which create buildings. This is selected by the CanBuild property of the produced items.
Example invocation:
{{#invoke:GameData|recipesUsingDirect|Copper Ingot}}
Components
Recipe | Building | Replicator? | Technology |
---|---|---|---|
✔ | N/A | ||
✔ | |||
✔ | N/A | ||
✔ | |||
✔ | |||
✖ | |||
✔ | |||
✔ | |||
✔ | |||
✔ |
Buildings
Recipe | Building | Replicator? | Technology |
---|---|---|---|
✔ | |||
✔ | |||
✔ |
itemRecipes
Arguments: Item Name
Print recipes making an item. This does not produce a full table, and is intended for use in ItemInfo boxes such as at Graphene/ItemInfo.
itemField
Arguments: Item Name, Field Name
Print a field from an item, with the field to print as an argument. You can look at Module:GameData/protosets.json and scroll down or search (Ctrl+F) to the ItemProtoSet to browse fields.
Example invocation:
{{#invoke:GameData|itemFieldDirect|Magnetic Coil|Description}}
It is an extremely useful basic electromagnetic component.
{{#invoke:GameData|itemFieldDirect|Hydrogen|StackSize}}
20