Template:Game icon name/doc: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Created page with "== Description == This template takes the full game name and delivers the string that must be put in double braces to get the game's icon, if existent. Ideally, this is the o...")
 
(Examples.)
Line 1: Line 1:
== Description ==
__NOTOC__
This template takes the full game name and delivers the string that must be put in double braces to get the game's icon, if existent.
This template takes the full game name and delivers a string that must be put in double braces to get the game's icon, if existent.


Ideally, this is the only page that maps game names to game acronyms.
Ideally, this is the only page that maps game names to game acronyms.
== Parameters ==
* {{param|1}} - the full, case sensitive game name.


== Examples ==
== Examples ==


{| class=wikitable
{| style="background: none"
! Wikitext
| <code><nowiki>{{game icon name|Half-Life 2}}</nowiki></code>
! Result
| &rarr; {{game icon name|Half-Life 2}}
|-
| <code><nowiki>{{ {{game icon name|Half-Life 2}} }}</nowiki></code>
| &rarr; {{ {{game icon name|Half-Life 2}} }}
| {{tip|Use {{tl|Game icon}} for this purpose if you (want to type less and) don't want a broken page state if the icon does not exist.}}
|-
| <code><nowiki>{{game icon|Half-Life 2}}</nowiki></code>
| &rarr; {{game icon|Half-Life 2}}
|-
| <br>
|-
|-
| <pre>{{game icon name|Half-Life 2}}</pre>
| <code><nowiki>{{game icon name|asdf}}</nowiki></code>
|     {{game icon name|Half-Life 2}}
| &rarr; {{game icon name|asdf}}
| {{note|If unknown games deliver nothing, it allows the use of <code><nowiki>{{#if: {{game icon name|...}} | ...}}</nowiki></code>. {{tl|Game icon}} relies on this property.}}
|-
|-
| <pre>{{ {{game icon name|Half-Life 2}} }}</pre> {{note|This is what {{tl|Game icon}} does!}}
| <code><nowiki>{{ {{game icon name|asdf}} }}</nowiki></code>
|     {{ {{game icon name|Half-Life 2}} }}
| &rarr; {{ {{game icon name|asdf}} }}
| {{tip|Use {{tl|Game icon}} to avoid this.}}
|-
|-
| <pre>{{game icon name|asdf}}</pre> {{note|Unknown games delivering nothing allows the use of<br><code><nowiki>{{#if: {{game icon name|...}} | ... }}</nowiki></code> }}
| <code><nowiki>{{game icon|asdf}}</nowiki></code>
|     {{game icon name|asdf}}
| &rarr; {{game icon|asdf}}
|}
|}
== See Also ==
* {{tl|Game icon}}


== Available Names ==
== Available Names ==
Line 100: Line 117:
| Team Fortress 2 || tf2
| Team Fortress 2 || tf2
|}
|}
== See Also ==
* {{tl|Game icon}}

Revision as of 08:00, 2 October 2021

This template takes the full game name and delivers a string that must be put in double braces to get the game's icon, if existent.

Ideally, this is the only page that maps game names to game acronyms.

Parameters

  • {{{1}}} - the full, case sensitive game name.

Examples

{{game icon name|Half-Life 2}} → hl2
{{ {{game icon name|Half-Life 2}} }} Half-Life 2
Tip.pngTip:Use {{Game icon}} for this purpose if you (want to type less and) don't want a broken page state if the icon does not exist.
{{game icon|Half-Life 2}} Half-Life 2

{{game icon name|asdf}}
Note.pngNote:If unknown games deliver nothing, it allows the use of {{#if: {{game icon name|...}} | ...}}. {{Game icon}} relies on this property.
{{ {{game icon name|asdf}} }} → {{ }}
Tip.pngTip:Use {{Game icon}} to avoid this.
{{game icon|asdf}}

See Also

  • {{Game icon}}

Available Names

Input Output
Alien Swarm as
Alien Swarm: Reactive Drop asrd
Black Mesa
Black Mesa (Source)
bms
Contagion con
Counter-Strike cs
Counter-Strike: Condition Zero cscz
Condition Zero Deleted Scenes czds
Counter-Strike: Source css
Counter-Strike: Global Offensive csgo
Dota 2 dota2
Entropy : Zero ez1
Entropy : Zero 2 ez2
Garry's Mod GMOD
Half-Life hl1
Half-Life: Source hls
Half-Life 2 hl2
Half-Life 2: Episode One ep1
Half-Life 2: Episode Two ep2
Half-Life 2 episodes hl2episodes
Half-Life Alyx HL:A
INFRA INFRA
Insurgency insurgency
Left 4 Dead l4d
Left 4 Dead 2 l4d2
Left 4 Dead series l4ds
Mapbase mapbase
Portal 2010 ARG Update
Portal
portal
Portal 2 portal2
Portal 2: Community Edition P2CE
Sin Episodes sin
Source 2006 src06
Source 2007 src07
Source 2009 src09
Source 2013 src13
Source 2013 MP src13mp
Source Filmmaker sfm
Synergy synergy
Team Fortress 2 tf2