Template:Recipe: Difference between revisions

From Caves of Qud Wiki
Jump to navigation Jump to search
(added cargo declare and documentation table)
mNo edit summary
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>{{#cargo_declare:_table=Recipes|RecipeID=String|Ingredients=List (,) of String|Effect=Wikitext|HasPlants=Boolean|HasFungus=Boolean|RecipeText=String}}</noinclude><includeonly>{{#cargo_store:_table=Recipes|RecipeID={{{id|}}}|Ingredients={{{ingredients|}}}|Effect={{{effects|}}}|HasPlants={{{hasplants|no}}}|HasFungus={{{hasfungus|no}}}|RecipeText={{{recipetext|}}}}}</includeonly>
<noinclude>{{#cargo_declare:_table=Recipes|RecipeID=String|Ingredients=List (</br>) of Wikitext string|Effect=Wikitext|HasPlants=Boolean|HasFungus=Boolean|RecipeText=String}}</noinclude><includeonly>{{#cargo_store:_table=Recipes|RecipeID={{{id|}}}|Ingredients={{{ingredients|}}}|Effect={{{effects|}}}|HasPlants={{{hasplants|no}}}|HasFungus={{{hasfungus|no}}}|RecipeText={{{recipetext|}}}}}
{{#invoke: infobox|infobox
{{#invoke: infobox|infobox
| image = none
| image = none
| rows =
| rows =
{{infobox row |ID|{{{id}}}}}
{{infobox row |ID|{{{id}}}}}
{{infobox row |Ingredients|{{{ingredients}}} }}
{{infobox row |Ingredients|{{consecutive templates|{{{ingredients}}}|</br>|</br>|||favilink|}}}}
{{infobox row |Effect|{{{effects}}} }}
{{infobox row |Effect|{{{effects}}} }}
{{infobox row |Has Plants|{{{hasplants|no}}} }}
{{infobox row |Has Plants|{{{hasplants|no}}} }}
{{infobox row |Has Fungus|{{{hasfungus|no}}} }}
{{infobox row |Has Fungus|{{{hasfungus|no}}} }}
}}{{#if: {{{recipetext|}}}|{{Qud quote|{{{recipetext}}}}}}}<noinclude>[[Category:Templates]]
}}{{#if: {{{recipetext|}}}|{{Qud quote|{{{recipetext}}}}}}}</includeonly><noinclude>[[Category:Cargo Store Templates]]
 
<pre>{{Recipe
| id =
| ingredients =
| effects =
| hasplants =
| hasfungus =
| recipetext =
}}</pre>
{| class="wikitable"
{| class="wikitable"
! id
! id
Line 17: Line 24:
! ingredients
! ingredients
| list of ingredients required.
| list of ingredients required.
| List (,) of string
| List (<nowiki></br></nowiki>) of wikitext (the ingredient link)
|-
|-
! effects
! effects

Latest revision as of 21:18, 19 July 2020

This template defines the table "Recipes". View table.

{{Recipe
| id =
| ingredients =
| effects = 
| hasplants =
| hasfungus =
| recipetext =
}}
id the cs file that holds the recipe data. String
ingredients list of ingredients required. List (</br>) of wikitext (the ingredient link)
effects the effect. just the decription is fine. string
hasplants defaults to no yes/no
hasfungus defaults to no yes/no
recipetext the RecipeText in factions.xml aka what you ask for the faction member to teach you. String