Plantilla:Recipes/extract

De Wiki Calamity Mod Oficial
Ir a la navegación Ir a la búsqueda
Esta plantilla está preparada para i18n, lo que significa que es fácil de localizar para diferentes idiomas. Consulta I18n & l10n para Plantillas para obtener más información.
Lua.svg
Esta plantilla utiliza Módulo:Recipes, un script escrito en el lenguaje de programación Lua. Por favor, consulta wikipedia:Lua y mw:Extension:Scribunto para obtener más información sobre Lua.
Info-bold.svg Documentación La documentación a continuación se transcluye desde Plantilla:Recipes/extract/doc. (editar | historial)

Use this template to extract info from certain crafting recipe(s).

Usage[editar código]

This template is designed for extracting info from recipe(s) for "single result item"(however can be multiple recipes), so you need to use query constraint paramters (result, ingredient ...) to query "single" result. See {{recipes}} for details of all query constraint paramters.

If query result is more than one row, this template will only return first row for mode=station or mode=result, and all rows for mode=compact or mode=ingredients .

then, use following parameters for output format:

mode = compact/result/ingredients/station/stationraw

Output mode. If not specified, it will be compact by default. See examples below. NOTE: for ingredients-buy/ingredients-sell, you should make sure there is only 1 result recipe and no alternative crafting ingredient in ingredients list. For ingredients-buy, you should make sure all ingredients are actually buyable.

sep or seperator

Separator between multiple ingredients lists. Only valid when mode=compact or mode=ingredients. Default is <br/>'''or'''<br/> for mode=compact or <br/>'''or'''<br/> for mode=ingredients. Note: single ingredients list will be wrapped in <div> when |mode=ingredients and in <span> when |mode=compact.

withresult and nostation and noversion

Only valid when mode=compact. By default, it will output as [version]: [ingredients]@[station], if withresult=y, will output as [ingredients]@[station]=[result], if nostation=y, there wil be no @[station], if noversion=y, there will be no [version]:.

showresultid=y and link=no

Only valid when mode=result. result item will show their internal item ID (if available), and/or have no link, respectively.

Examples[editar código]

Code Result
{{recipes/extract|result=Auric Bar}} 60 Mineral áurico + Alma fragmentada de Yharon  @  Yunque cósmico
{{recipes/extract|result=Auric Bar|withresult=y}} 60 Mineral áurico + Alma fragmentada de Yharon = 5 Lingote áurico  @  Yunque cósmico
{{recipes/extract|result=Auric Bar|nostation=y}} 60 Mineral áurico + Alma fragmentada de Yharon
{{recipes/extract|result=Auric Bar|withresult=y|nostation=y}} 60 Mineral áurico + Alma fragmentada de Yharon = 5 Lingote áurico
{{recipes/extract|result=Auric Bar|mode=result}} Lingote áuricoLingote áurico (5)
{{recipes/extract|result=Auric Bar|mode=ingredients}}
{{recipes/extract|result=Auric Bar|mode=station}} Yunque cósmicoYunque cósmico
{{recipes/extract|result=Auric Bar|mode=stationraw}} Cosmic Anvil
{{recipes/extract|result=Anechoic Coating|sep=<br/>}} Agua embotellada + 10 Orbe de sangre  @  Mesa de alquimia

Multiple recipes[editar código]

Note: single ingredients list will be wrapped in <div> when |mode=ingredients and in <span> when |mode=compact.

Code Result
{{recipes/extract|result=Cooked Fish}} Guppy prismático  @  Perol / Caldero
o
Polox centelleante  @  Perol / Caldero
{{recipes/extract|result=Cooked Fish|withresult=y}} Guppy prismático = Pescado hecho  @  Perol / Caldero
o
Polox centelleante = Pescado hecho  @  Perol / Caldero
{{recipes/extract|result=Cooked Fish|mode=result}} Pescado hechoPescado hecho
{{recipes/extract|result=Cooked Fish|mode=ingredients}}
{{recipes/extract|result=Cooked Fish|mode=station}} PerolPerol
o
CalderoCaldero
{{recipes/extract|result=Cooked Fish|mode=ingredients|sep=--or--}}
{{recipes/extract|result=Cooked Fish|nostation=y|sep=&#32;/&#32;}} Guppy prismático / Polox centelleante
<table class="terraria lined sortable" style="margin:0; width:100%"><tr><td rowspan="4" style="border:0">{{recipes/extract|result=Cooked Fish|mode=result}}</td>
<td>{{recipes/extract|result=Cooked Fish|withresult=y|sep=</td></tr><tr><td>}}</td></tr></table>
Pescado hechoPescado hecho Guppy prismático = Pescado hecho  @  Perol / Caldero
Polox centelleante = Pescado hecho  @  Perol / Caldero