Jump to content

Template:Tprice: Difference between revisions

From Stardew Valley Wiki
imported>Margotbean
Removed extra space between gold icon and price
imported>Margotbean
update template to use module
 
(11 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly>{{#if:{{{1|}}}
<includeonly>{{#if:{{{1|}}}
| [[File:Gold.png|24px|alt=Coin Icon|link=]]{{formatnum:
|<span style="display: none;">data-sort-value="{{{1|}}}"</span><!--
  {{#ifeq:{{{1|}}}|furniture
-->{{#invoke:Tcartprice|tprice
    | 250-2500
|price = {{{1|}}}
    | {{#ifeq:{{{math|true}}}|false
|separator = –
      | {{{1|}}}
|gold = g
      | {{#expr:
|spacearoundseparator = false
          {{#ifexpr:100>{{{1|}}}*3
}}
          | 100
|}}</includeonly><noinclude>{{{{FULLPAGENAME}}/doc}}</noinclude>
          | {{{1|}}}*3
          }}
        }}-{{#expr:
          {{#ifexpr:1000>{{{1|}}}*5
          | 1000
          | {{{1|}}}*5
          }}
        }}
      }}
    }}
  }}g
}}</includeonly><noinclude>
{{{{FULLPAGENAME}}/doc}}
[[Category:Templates]]
</noinclude>

Latest revision as of 17:55, 18 June 2023

Tprice is used to calculate the traveling cart price from the base price of an item. This template also adds a gold coin icon and a language-appropriate symbol for gold.

Examples

{{Tprice|2}}

data-sort-value="2"100–1,000g

{{Tprice|225}}

data-sort-value="225"675–1,125g

{{Tprice|1000000}}

data-sort-value="1000000"3,000,000–5,000,000g

{{Tprice|furniture}}

data-sort-value="furniture"250–2,500g