Difference between revisions of "Template:Quality list"

From Team Fortress Wiki
Jump to: navigation, search
m (collector's before decorated to match templates and availability)
 
(50 intermediate revisions by 8 users not shown)
Line 1: Line 1:
{{#if:{{{normal|}}}|<div style="margin:0px 0px 4px;border-radius:5px;text-align:center;font-family:'TF2 Build', TF2 Build, Verdana, Geneva, sans-serif;font-size:13px;color:#fefefe;background:#B2B2B2;padding:5px 0px;">Normal</div>}}{{#if:{{{unique|}}}|<div style="margin:0px 0px 4px;border-radius:5px;text-align:center;font-family:'TF2 Build', TF2 Build, Verdana, Geneva, sans-serif;font-size:13px;color:#3a3a3a;background:#FFD700;padding:5px 0px;">Unique</div>}}{{#if:{{{vintage|}}}|<div style="margin:0px 0px 4px;border-radius:5px;text-align:center;font-family:'TF2 Build', TF2 Build, Verdana, Geneva, sans-serif;font-size:13px;color:#fefefe;background:#476291;padding:5px 0px;">Vintage</div>}}{{#if:{{{genuine|}}}|<div style="margin:0px 0px 4px;border-radius:5px;text-align:center;font-family:'TF2 Build', TF2 Build, Verdana, Geneva, sans-serif;font-size:13px;color:#fefefe;background:#4D7455;padding:5px 0px;">Genuine</div>}}{{#if:{{{strange|}}}|<div style="margin:0px 0px 4px;border-radius:5px;text-align:center;font-family:'TF2 Build', TF2 Build, Verdana, Geneva, sans-serif;font-size:13px;color:#fefefe;background:#CF6A32;padding:5px 0px;">Strange</div>}}{{#if:{{{unusual|}}}|<div style="margin:0px 0px 4px;border-radius:5px;text-align:center;font-family:'TF2 Build', TF2 Build, Verdana, Geneva, sans-serif;font-size:13px;color:#fefefe;background:#8650AC;padding:5px 0px;">Unusual</div>}}
+
{{#ifexist:Template:Dictionary/quad/{{lc:{{{item-name}}}}}|<!--
{{#if:{{{collectors|}}}|<div style="margin:0px 0px 4px;border-radius:5px;text-align:center;font-family:'TF2 Build', TF2 Build, Verdana, Geneva, sans-serif;font-size:13px;color:#fefefe;background:#AA0000;padding:5px 0px;">Collectors</div>}}{{#if:{{{community|}}}|<div style="margin:0px 0px 4px;border-radius:5px;text-align:center;font-family:'TF2 Build', TF2 Build, Verdana, Geneva, sans-serif;font-size:13px;color:#fefefe;background:#70B04A;padding:5px 0px;">Community</div>}}{{#if:{{{self-made|}}}|<div style="margin:0px 0px 4px;border-radius:5px;text-align:center;font-family:'TF2 Build', TF2 Build, Verdana, Geneva, sans-serif;font-size:13px;color:#fefefe;background:#70B04A;padding:5px 0px;">Self Made</div>}}{{#if:{{{valve|}}}|<div style="margin:0px 0px 4px;border-radius:5px;text-align:center;font-family:'TF2 Build', TF2 Build, Verdana, Geneva, sans-serif;font-size:13px;color:#fefefe;background:#A50F79;padding:5px 0px;">Valve</div>}}
+
-->{{#if:{{Quad|{{{item-name|}}}|normal}}|<div class="quality-tag tooltip-normal">[[Normal{{if lang}}|<span id="tooltip" title="{{QuAD|{{{item-name}}}|normal}}">{{item name|Normal}}</span>]]</div>}}<!--
 +
-->{{#if:{{Quad|{{{item-name|}}}|unique}}|<div class="quality-tag tooltip-unique">[[Unique{{if lang}}|<span id="tooltip" title="{{QuAD|{{{item-name}}}|unique}}">{{item name|Unique}}</span>]]</div>}}<!--
 +
-->{{#if:{{Quad|{{{item-name|}}}|vintage}}|<div class="quality-tag tooltip-vintage">[[Vintage{{if lang}}|<span id="tooltip" title="{{QuAD|{{{item-name}}}|vintage}}">{{item name|Vintage}}</span>]]</div>{{lang cat|Vintage items}}}}<!--
 +
-->{{#if:{{Quad|{{{item-name|}}}|genuine}}|<div class="quality-tag tooltip-genuine">[[Genuine{{if lang}}|<span id="tooltip" title="{{QuAD|{{{item-name}}}|genuine}}">{{item name|Genuine}}</span>]]</div>{{lang cat|Genuine items}}}}<!--
 +
-->{{#if:{{Quad|{{{item-name|}}}|strange}}|<div class="quality-tag tooltip-strange">[[Strange{{if lang}}|<span id="tooltip" title="{{QuAD|{{{item-name}}}|strange}}">{{item name|Strange}}</span>]]</div>{{lang cat|Strange items}}}}<!--
 +
-->{{#if:{{Quad|{{{item-name|}}}|unusual}}|<div class="quality-tag tooltip-unusual">[[Unusual{{if lang}}|<span id="tooltip" title="{{QuAD|{{{item-name}}}|unusual}}">{{item name|Unusual}}</span>]]</div>{{lang cat|Unusual items}}}}<!--
 +
-->{{#if:{{Quad|{{{item-name|}}}|haunted}}|<div class="quality-tag tooltip-haunted">[[Haunted{{if lang}}|<span id="tooltip" title="{{QuAD|{{{item-name}}}|haunted}}">{{item name|Haunted}}</span>]]</div>{{lang cat|Haunted items}}}}<!--
 +
-->{{#if:{{Quad|{{{item-name|}}}|collectors}}|<div class="quality-tag tooltip-collectors">[[Collector's{{if lang}}|<span id="tooltip" title="{{QuAD|{{{item-name}}}|collectors}}">{{item name|Collector's}}</span>]]</div>{{lang cat|Collector's items}}}}<!--
 +
-->{{#if:{{Quad|{{{item-name|}}}|decorated}}|<div class="quality-tag tooltip-decorated">[[Decorated{{if lang}}|<span id="tooltip" title="{{QuAD|{{{item-name}}}|decorated}}">{{item name|Decorated}}</span>]]</div>{{lang cat|Decorated items}}}}<!--
 +
-->{{#if:{{Quad|{{{item-name|}}}|community}}|<div class="quality-tag tooltip-community">[[Community (quality){{if lang}}|<span id="tooltip" title="{{QuAD|{{{item-name}}}|community}}">{{item name|Community}}</span>]]</div>}}<!--
 +
-->{{#if:{{Quad|{{{item-name|}}}|self-made}}|<div class="quality-tag tooltip-self-made">[[Self-Made{{if lang}}|<span id="tooltip" title="{{QuAD|{{{item-name}}}|self-made}}">{{item name|Self-Made}}</span>]]</div>}}<!--
 +
-->{{#if:{{Quad|{{{item-name|}}}|valve}}|<div class="quality-tag tooltip-valve">[[Valve (quality){{if lang}}|<span id="tooltip" title="{{QuAD|{{{item-name}}}|valve}}">{{item name|Valve}}</span>]]</div>}}<!--
 +
Default case:-->|<div class="quality-tag tooltip-unique">{{item link|Unique}}</div>}}<noinclude>{{Documentation}}</noinclude>

Latest revision as of 22:36, 6 June 2024

Template documentation [view] [edit] [history] [purge]

Summary

{{QuAD}} is used to display the Quality Availability Database. In other words, it will list the ways to get an item in a given quality. This particular template is a wrapper for {{Dictionary/quad}}, the Database.

Entries in this dictionary call {{QuAD/list}} to order the Availability in a fixed order, and passes them as sequentially numbered parameters to {{QuAD/list/core}}. QuAD/list/core adds punctuation (commas and ampersands) and the result is a nicely readable string. This also makes use of {{QuAD/comma}}, {{QuAD/ampersand}}, {{QuAD/p}}, and {{QuAD/series}}.

{{Qualitycheck}} is called with a Quality, and it will format the availability list for the relevant template (such as {{Wqc}} or the qualities section in {{Item infobox}}).

{{Wqc/table/core}} (header/footer), {{Cqc/table/core}} (header/footer/brace), or {{Quality list}} call Qualitycheck (or do the formatting themselves) for all the available qualities.

Usage

When new items are added that need qualities, edit the Database, {{Dictionary/quad}}.

When new availability types are added/needed, edit the Availability, {{QuAD/list}}.

If there is an item with more than 20 availabilities, update {{QuAD/list/core}}.

If there are new qualities, edit the Quality lists, {{Wqc/table/core}}, {{Cqc/table/core}}, or {{Quality list}}.