Difference between revisions of "Template:GetPartOrRecipeName"

From ChatWars Wiki
Jump to: navigation, search
m
m
Line 1: Line 1:
 
<includeonly>{{#ifeq: {{{boolGetPart|}}} | true | {{#vardefine: type | Piece of Equipment}} | {{#vardefine: type | Recipe (Item)}} }}<!--
 
<includeonly>{{#ifeq: {{{boolGetPart|}}} | true | {{#vardefine: type | Piece of Equipment}} | {{#vardefine: type | Recipe (Item)}} }}<!--
-->{{#ask:
+
--><!--{{#ask:
 
   [[-Has subobject::{{ReplaceNumericCharEncoding | string = {{{page|}}} }}]] [[Crafting ingredient.ItemType::{{#var: type}}]]
 
   [[-Has subobject::{{ReplaceNumericCharEncoding | string = {{{page|}}} }}]] [[Crafting ingredient.ItemType::{{#var: type}}]]
 
     | mainlabel=-
 
     | mainlabel=-
Line 6: Line 6:
 
     | format=list
 
     | format=list
 
     |? Crafting ingredient
 
     |? Crafting ingredient
}}</includeonly><noinclude>
+
}}--></includeonly><noinclude>
 
Gets the name of either the part or recipe of a given item.
 
Gets the name of either the part or recipe of a given item.
 
Parameters:
 
Parameters:

Revision as of 22:57, 27 June 2021

Gets the name of either the part or recipe of a given item. Parameters:

  • page = GetPartOrRecipeName - The page to search for parts or recipes in (Param 1)
  • boolGetPart = true - Searches and returns the Piece of Equipment of the given page (Param 2)
  • boolGetPart = false - Searches and returns the Recipe (Item) of the given page