Template:Cost: Difference between revisions

From Heroes of Might and Magic: Olden Era Official Wiki
No edit summary
No edit summary
Line 7: Line 7:
-->{{#if:{{{mercury|}}}|&nbsp;{{{mercury}}}{{Mercury|{{{lang|en}}}}}|}}<!--
-->{{#if:{{{mercury|}}}|&nbsp;{{{mercury}}}{{Mercury|{{{lang|en}}}}}|}}<!--
-->{{#if:{{{dust|}}}|&nbsp;{{{dust}}}{{Dust|{{{lang|en}}}}}|}}<!--
-->{{#if:{{{dust|}}}|&nbsp;{{{dust}}}{{Dust|{{{lang|en}}}}}|}}<!--
-->{{#if:{{{gold|}}}{{{wood|}}}{{{ore|}}}{{{gems|}}}{{{crystals|}}}{{{mercury|}}}{{{dust|}}}||—}}<!--
-->{{#if:{{{graal|}}}|&nbsp;{{{graal}}}{{Graal|{{{lang|en}}}}}|}}<!--
-->{{#if:{{{gold|}}}{{{wood|}}}{{{ore|}}}{{{gems|}}}{{{crystals|}}}{{{mercury|}}}{{{dust|}}}{{{graal|}}}||—}}<!--
################################################################################
################################################################################
--></includeonly><noinclude>
--></includeonly><noinclude>
Line 24: Line 25:
2. All:
2. All:


{{Color|yellow|Input:}} <code><nowiki>{{Cost|gold=100|wood=10|ore=10|gems=10|crystals=10|mercury=10|dust=10|lang=en}}</nowiki></code>
{{Color|yellow|Input:}} <code><nowiki>{{Cost|gold=100|wood=10|ore=10|gems=10|crystals=10|mercury=10|dust=10|graal=10|lang=en}}</nowiki></code>


{{Color|lime|Output:}} {{Cost|gold=100|wood=10|ore=10|gems=10|crystals=10|mercury=10|dust=10|lang=en}}
{{Color|lime|Output:}} {{Cost|gold=100|wood=10|ore=10|gems=10|crystals=10|mercury=10|dust=10|graal=10|lang=en}}


----
----

Revision as of 16:59, 14 July 2026


Renders the value and currency icon of a cost in resources, supporting various combinations.

Usage

1. One:

Input: {{Cost|gold=100|lang=en}}

Output:  100Gold


2. All:

Input: {{Cost|gold=100|wood=10|ore=10|gems=10|crystals=10|mercury=10|dust=10|graal=10|lang=en}}

Output:  100Gold 10Wood 10Ore 10Gems 10Crystals 10Mercury 10Alchemical Dust 10Grail


3. Japanese:

Input: {{Cost|gold=100|lang=ja}}

Output:  100ゴールド


4. No cost

Input: {{Cost}}

Output: —