Difference between revisions of "Template:Bundle savings"

From Team Fortress Wiki
Jump to: navigation, search
(Created page with '{{#switch:{{uc:{{{currency|}}}}} |EUR |€ |USD |$ = {{#switch:{{lc:{{{bundle|}}}}} |polycount pack = {{#expr: ((1 - ({{Item price/core|currency=USD| item=Polycount …')
 
m (That pack is no longer for sale.)
 
(13 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{#switch:{{uc:{{{currency|}}}}}
+
{{#switch:{{lc:{{{bundle|}}}}}
|EUR
+
|polycount pack = {{#expr: ((1
|€
+
  - ({{Item price/core|currency={{{currency|}}}| item=Polycount Pack}}
|USD
+
    /({{Item price/core|currency={{{currency|}}}| item=Shortstop}}
|$ = {{#switch:{{lc:{{{bundle|}}}}}
+
    + {{Item price/core|currency={{{currency|}}}| item=Mad Milk}}
  |polycount pack = {{#expr: ((1
+
    + {{Item price/core|currency={{{currency|}}}| item=Holy Mackerel}}
    - ({{Item price/core|currency=USD| item=Polycount Pack}}
+
    + {{Item price/core|currency={{{currency|}}}| item=Milkman}}
      /({{Item price/core|currency=USD| item=Shortstop}}
+
    + {{Item price/core|currency={{{currency|}}}| item=Black Box}}
      + {{Item price/core|currency=USD| item=Mad Milk}}
+
    + {{Item price/core|currency={{{currency|}}}| item=Battalion's Backup}}
      + {{Item price/core|currency=USD| item=Holy Mackerel}}
+
    + {{Item price/core|currency={{{currency|}}}| item=Grenadier's Softcap}}
      + {{Item price/core|currency=USD| item=Milkman}}
+
    + {{Item price/core|currency={{{currency|}}}| item=Degreaser}}
      + {{Item price/core|currency=USD| item=Black Box}}
+
    + {{Item price/core|currency={{{currency|}}}|
      + {{Item price/core|currency=USD| item=Battalion's Backup}}
 
      + {{Item price/core|currency=USD| item=Grenadier's Softcap}}
 
      + {{Item price/core|currency=USD| item=Degreaser}}
 
      + {{Item price/core|currency=USD| item=Powerjack}}
 
      + {{Item price/core|currency=USD| item=Attendant}}
 
      + {{Item price/core|currency=USD| item=Sydney Sleeper}}
 
      +
 
 
}}<noinclude>{{doc begin}}
 
}}<noinclude>{{doc begin}}
 
This is a template to display the savings of a bundle as a percent number. The prices themselves are defined in the template {{tl|Item price/core}}. This template adds the total sum of individual price of the items then subtracted by the price of the bundle then divided by total sum of individual price. <br>
 
This is a template to display the savings of a bundle as a percent number. The prices themselves are defined in the template {{tl|Item price/core}}. This template adds the total sum of individual price of the items then subtracted by the price of the bundle then divided by total sum of individual price. <br>
Line 320: Line 307:
 
** bundle name = polycount pack, the special delivery, the tank buster, the gas jockey's gear, the croc-o-style kit,  the saharan spy, noise maker bundle, a bargaining manne's bundle of bargains, winter update pack, the expert's ordnance, the hibernating bear, the medieval medic, map stamps collection, box of fancy hats,  pile of nasty weapons
 
** bundle name = polycount pack, the special delivery, the tank buster, the gas jockey's gear, the croc-o-style kit,  the saharan spy, noise maker bundle, a bargaining manne's bundle of bargains, winter update pack, the expert's ordnance, the hibernating bear, the medieval medic, map stamps collection, box of fancy hats,  pile of nasty weapons
 
** currency type = EUR, €, USD, $, GBP, £
 
** currency type = EUR, €, USD, $, GBP, £
*{{tlx|bundle savings|polycount pack|USD}} returns {{bundle savings|bundle = polycount pack|currency = USD}}
+
*<code><nowiki>{{Bundle savings|bundle = world war wednesday bundle|currency = USD}}</nowiki></code> returns {{Bundle savings|bundle = world war wednesday bundle|currency = EUR}}
  
[[Category:Templates|Item price]]
+
[[Category:Templates|Bundle Savings]]
 
</noinclude>
 
</noinclude>

Latest revision as of 16:08, 24 February 2014

Documentation for Bundle savings

This is a template to display the savings of a bundle as a percent number. The prices themselves are defined in the template {{Item price/core}}. This template adds the total sum of individual price of the items then subtracted by the price of the bundle then divided by total sum of individual price.
((sum of item prices - bundle price) / sum of item prices) * 100 = percent of bundle savings

Usage

  • {{bundle savings|bundle|currency}}
    • bundle name = polycount pack, the special delivery, the tank buster, the gas jockey's gear, the croc-o-style kit, the saharan spy, noise maker bundle, a bargaining manne's bundle of bargains, winter update pack, the expert's ordnance, the hibernating bear, the medieval medic, map stamps collection, box of fancy hats, pile of nasty weapons
    • currency type = EUR, €, USD, $, GBP, £
  • {{Bundle savings|bundle = world war wednesday bundle|currency = USD}} returns -39