This article's documentation is for anything that uses the Source engine. Click here for more information.

Template:This is a: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
(Set missing default of {{{icon}}} to 0. Removed duplicate game icon if {{{icon}}} is not 0. Removed several unnecessary #ifs, especially concerning {{{nocat}}}. Increased readability.)
Line 14: Line 14:
     ++ Icon for game ++
     ++ Icon for game ++


-->{{#switch: {{{icon|}}}
-->{{#switch: {{{icon|0}}}
|#default={{Game icon|{{{icon}}}}}
|#default={{Game icon|{{{icon}}}}} 
|1={{Game icon|{{{game}}}}}
|1={{Game icon|{{{game}}}}} 
|0=
|0=
}}{{#if:{{{icon|}}}|&nbsp;}}<!--
}}<!--


     ++ "This is a ______ available in" ++
     ++ "This is a ______ available in" ++
Line 131: Line 131:
| l4ds
| l4ds
| l4d
| l4d
| Left 4 Dead={{Autolang|the|ru=в|zh=}} {{l4dseries|{{#if:{{{icon|}}}|3|4}}|suf={{Autolang||zh=:zh-cn}}}}
| Left 4 Dead={{Autolang|the|ru=в|zh=}} {{l4dseries|{{#ifeq:{{{icon|0}}}|0|4|3}}|suf={{Autolang||zh=:zh-cn}}}}
| #default={{Autolang|the|ru=в серии игр|zh=}} [[{{{series}}}]] {{Autolang|series|ru=|zh=系列}}
| #default={{Autolang|the|ru=в серии игр|zh=}} [[{{{series}}}]] {{Autolang|series|ru=|zh=系列}}
| 1={{#if: {{{seriescs|}}}
| 1={{#if: {{{seriescs|}}}
Line 139: Line 139:


-->{{#if:{{{game|}}}
-->{{#if:{{{game|}}}
     | ({{Autolang|since|eo=post|ru=начиная с|zh=自从}} {{#ifexist: Template:{{{game|}}} | {{ {{{game}}} |4}} | {{ {{game icon name|{{{game}}} }}|4}} }}{{Autolang||zh=&nbsp;以来}})
     | ({{Autolang|since|eo=post|ru=начиная с|zh=自从}} {{#ifexist: Template:{{{game|}}} | {{ {{{game}}} |{{#ifeq:{{{icon|0}}}|0|4|3}}}} | {{ {{game icon name|{{{game}}} }}|{{#ifeq:{{{icon|0}}}|0|4|3}}}} }}{{Autolang||zh=&nbsp;以来}})
     }}
     }}
   | {{#if: {{{game|}}}
   | {{#if: {{{game|}}}
     | <!-- Multiple games -->{{#if:{{{game1|}}}|{{Autolang|the following {{#switch:{{{engine|}}}|#default={{{engine|{{Source|4.1}}}}}|1|goldsrc|gldsrc={{gldsrc|4.1}}|0|2|source={{source|4.1}}|3|source2={{source2|4.1}}}} games:<br>|zh=以下 {{#switch:{{{engine|}}}|#default={{{engine|{{Source|4.1}}}}}|1|goldsrc|gldsrc={{gldsrc|4.1}}|0|2|source={{source|4.1}}|3|source2={{source2|4.1}}}} 游戏:<br>|ru=в следующих {{#switch:{{{engine|}}}|#default={{{engine|{{Source|4.1}}}}}|1|goldsrc|gldsrc={{gldsrc|4.1}}|0|2|source={{source|4.1}}|3|source2={{source2|4.1}}}} играх:<br>}}<!--
     | <!-- Multiple games -->{{#if:{{{game1|}}}
               -->{{#ifexist: Template:{{{game|}}} | {{ {{{game}}} |4}} | {{ {{game icon name|{{{game}}} }}|4}} }}{{#if:{{{game2|}}}|{{Autolang|,&nbsp;|zh=、}}|{{Autolang|&nbsp;and&nbsp;|zh=&nbsp;和&nbsp;}}}}<!--
      | {{Autolang
        |the following {{#switch:{{{engine|}}}|#default={{{engine|{{Source|4.1}}}}}|1|goldsrc|gldsrc={{gldsrc|4.1}}|0|2|source={{source|4.1}}|3|source2={{source2|4.1}}}} games:<br><!--
    -->|zh=以下 {{#switch:{{{engine|}}}|#default={{{engine|{{Source|4.1}}}}}|1|goldsrc|gldsrc={{gldsrc|4.1}}|0|2|source={{source|4.1}}|3|source2={{source2|4.1}}}} 游戏:<br>
        |ru=в следующих {{#switch:{{{engine|}}}|#default={{{engine|{{Source|4.1}}}}}|1|goldsrc|gldsrc={{gldsrc|4.1}}|0|2|source={{source|4.1}}|3|source2={{source2|4.1}}}} играх:<br>
        }}<!--
               -->{{#ifexist: Template:{{{game|}}} | {{ {{{game}}} |4}} | {{ {{game icon name|{{{game}}} }}|4}} }}<!--
  -->{{#if:{{{game2|}}}|{{Autolang|,&nbsp;|zh=、}}|{{Autolang|&nbsp;and&nbsp;|zh=&nbsp;和&nbsp;}}}}<!--
               -->{{#ifexist: Template:{{{game1|}}} | {{ {{{game1}}} |4}} | {{ {{game icon name|{{{game1}}} }}|4}} }}<!--
               -->{{#ifexist: Template:{{{game1|}}} | {{ {{{game1}}} |4}} | {{ {{game icon name|{{{game1}}} }}|4}} }}<!--
               -->{{#if:{{{game2|}}}|{{#if:{{{game3|}}}|{{Autolang|,&nbsp;|zh=、}}|{{Autolang|&nbsp;and&nbsp;|zh=&nbsp;和&nbsp;}}}}{{#ifexist: Template:{{{game2|}}} | {{ {{{game2}}} |4}} | {{ {{game icon name|{{{game2}}} }}|4}} }} }}<!--
               -->{{#if:{{{game2|}}}|{{#if:{{{game3|}}}|{{Autolang|,&nbsp;|zh=、}}|{{Autolang|&nbsp;and&nbsp;|zh=&nbsp;和&nbsp;}}}}{{#ifexist: Template:{{{game2|}}} | {{ {{{game2}}} |4}} | {{ {{game icon name|{{{game2}}} }}|4}} }} }}<!--
Line 150: Line 156:
               -->{{#if:{{{game5|}}}|{{Autolang|&nbsp;and&nbsp;|eo=&nbsp;kaj&nbsp;|zh=&nbsp;和&nbsp;}}{{#ifexist: Template:{{{game5|}}} | {{ {{{game5}}} |4}} | {{ {{game icon name|{{{game5}}} }}|4}} }} }}<!--
               -->{{#if:{{{game5|}}}|{{Autolang|&nbsp;and&nbsp;|eo=&nbsp;kaj&nbsp;|zh=&nbsp;和&nbsp;}}{{#ifexist: Template:{{{game5|}}} | {{ {{{game5}}} |4}} | {{ {{game icon name|{{{game5}}} }}|4}} }} }}<!--
       Single game
       Single game
       -->|{{Autolang||ru=в}} {{#ifexist: Template:{{{game|}}} | {{ {{{game}}} |4}} | {{ {{game icon name|{{{game}}} }}|4}} }} }}
       -->|{{Autolang||ru=в}} {{#ifexist: Template:{{{game|}}} | {{ {{{game}}} |{{#ifeq:{{{icon|0}}}|0|4|3}}}} | {{ {{game icon name|{{{game}}} }}|{{#ifeq:{{{icon|0}}}|0|4|3}}}} }}
  }}
     | {{Autolang|all|eo=ĉiuj|ru=во всех играх на движке|zh=所有的}} {{#switch:{{{engine|}}}|#default={{{engine|{{source|4}}}}}{{#if:{{{nocat|}}}||{{source topicon|nocat=1}}}}
     | {{Autolang|all|eo=ĉiuj|ru=во всех играх на движке|zh=所有的}} {{#switch:{{{engine|}}}|#default={{{engine|{{source|4}}}}}{{#if:{{{nocat|}}}||{{source topicon|nocat=1}}}}
                 |1|goldsrc|gldsrc={{gldsrc|4}}{{#if:{{{nocat|}}}||{{gldsrc topicon|nocat=1}}}}
                 |1|goldsrc|gldsrc={{gldsrc|4}}{{#if:{{{nocat|}}}||{{gldsrc topicon|nocat=1}}}}
Line 202: Line 209:
     + Category for (non-)internal entitiy +
     + Category for (non-)internal entitiy +


-->{{#switch:{{{1|}}}
-->{{#ifeq:{{{nocat|0}}}|0| {{#switch:{{{1|}}}
|#default={{#switch:{{lc:{{{internal}}}}}
|#default=<!--
-->{{#switch:{{lc:{{{internal}}}}}
| 1
| 1
| true = {{main other|{{#if:{{{nocat|}}}||[[Category:Internal entities]]}}}}
| true = {{main other|[[Category:Internal entities]]}}
| #default = {{main other|{{#if:{{{nocat|}}}||[[Category:Non-internal entities]]}}}} }}
| #default = {{main other|[[Category:Non-internal entities]]}}<!--
|e2|brush={{main other|{{#if:{{{nocat|}}}||[[Category:Non-internal entities]]}}}}
-->}}
|e1|e3|int point|int brush={{main other|{{#if:{{{nocat|}}}||[[Category:Internal entities]]}}}}
|e2|brush={{main other|[[Category:Non-internal entities]]}}
|vertex shader|pixel shader|s1|s0|s2|shader parameter|c1|c0|c2|cvar|convar|command|QC command=}}<!--
|e1|e3|int point|int brush={{main other|[[Category:Internal entities]]}}
|vertex shader|pixel shader|s1|s0|s2|shader parameter|c1|c0|c2|cvar|convar|command|QC command=<!--
-->}} }}<!--


     + Entity Categories +
     + Entity Categories +
-->{{#ifeq:{{{nocat|0}}}|0|<!-- if nocat != 0, skip the following


-->{{#if: {{{game|}}}
-->{{#if: {{{game|}}}
| {{Main other|{{#if:{{{nocat|}}}||[[Category:{{{game}}} {{{topic|<!--
| {{Main other|[[Category:{{{game}}} {{{topic|<!--
-->{{#switch:{{{1|}}}
-->{{#switch:{{{1|}}}
|#default=entities
|#default=entities
Line 223: Line 235:
                 |s1|vertex shader=vertex shaders
                 |s1|vertex shader=vertex shaders
                 |s2|shader parameter=shader parameters
                 |s2|shader parameter=shader parameters
}}<!---->}}}]]}}}}
}}<!---->}}}]]}}
{{Main other|<!--
{{Main other|<!--
-->{{#if:{{{nocat|}}}||<!--
-->{{#if:{{{game1|}}}|<!--
-->{{#if:{{{game1|}}}|<!--
-->[[Category:{{{game1}}} {{{topic|<!--
-->[[Category:{{{game1}}} {{{topic|<!--
-->{{#switch:{{{1|}}}
-->{{#switch:{{{1|}}}
|#default=entities
|#default=entities
|c2|cvar|convar=console variables
|c2|cvar|convar=console variables
|c1|command=console commands
|c1|command=console commands
|c0|QC command=QC Commands
|c0|QC command=QC Commands
|s0|pixel shader=pixel shaders
|s0|pixel shader=pixel shaders
|s1|vertex shader=vertex shaders
|s1|vertex shader=vertex shaders
|s2|shader parameter=shader parameters<!--
 
-->}}<!--
|s2|shader parameter=shader parameters<!--
-->}}}]]<!--
-->}}<!--
-->}}<!--
-->}}}]]<!--
-->{{#if:{{{game2|}}}|<!--
-->}}<!--
-->[[Category:{{{game2}}} {{{topic|<!--
-->{{#if:{{{game2|}}}|<!--
-->{{#switch:{{{1|}}}
-->[[Category:{{{game2}}} {{{topic|<!--
|#default=entities
-->{{#switch:{{{1|}}}
|c2|cvar|convar=console variables
|#default=entities
|c1|command=console commands
|c2|cvar|convar=console variables
|c0|QC command=QC Commands
|c1|command=console commands
|s0|pixel shader=pixel shaders
|c0|QC command=QC Commands
|s1|vertex shader=vertex shaders
|s0|pixel shader=pixel shaders
|s2|shader parameter=shader parameters<!--
|s1|vertex shader=vertex shaders
-->}}<!--
 
-->}}}]]<!--
|s2|shader parameter=shader parameters<!--
-->}}<!--
-->}}<!--
-->{{#if:{{{game3|}}}|<!--
-->}}}]]<!--
-->[[Category:{{{game3}}} {{{topic|<!--
-->}}<!--
-->{{#switch:{{{1|}}}
-->{{#if:{{{game3|}}}|<!--
|#default=entities
-->[[Category:{{{game3}}} {{{topic|<!--
|c2|cvar|convar=console variables
-->{{#switch:{{{1|}}}
|c1|command=console commands
|#default=entities
|c0|QC command=QC Commands
|c2|cvar|convar=console variables
|s0|pixel shader=pixel shaders
|c1|command=console commands
|s1|vertex shader=vertex shaders
|c0|QC command=QC Commands
|s2|shader parameter=shader parameters<!--
|s0|pixel shader=pixel shaders
-->}}<!--
|s1|vertex shader=vertex shaders
-->}}}]]<!--
 
-->}}<!--
|s2|shader parameter=shader parameters<!--
-->{{#if:{{{game4|}}}|<!--
-->}}<!--
-->[[Category:{{{game4}}} {{{topic|<!--
-->}}}]]<!--
-->{{#switch:{{{1|}}}
-->}}<!--
|#default=entities
-->{{#if:{{{game4|}}}|<!--
|c2|cvar|convar=console variables
-->[[Category:{{{game4}}} {{{topic|<!--
|c1|command=console commands
-->{{#switch:{{{1|}}}
|c0|QC command=QC Commands
|#default=entities
|s0|pixel shader=pixel shaders
|c2|cvar|convar=console variables
|s1|vertex shader=vertex shaders
|c1|command=console commands
|s2|shader parameter=shader parameters<!--
|c0|QC command=QC Commands
-->}}<!--
|s0|pixel shader=pixel shaders
-->}}}]]<!--
|s1|vertex shader=vertex shaders
-->}}<!--
 
-->{{#if:{{{game5|}}}|<!--
|s2|shader parameter=shader parameters<!--
-->[[Category:{{{game5}}} {{{topic|<!--
-->}}<!--
-->{{#switch:{{{1|}}}
-->}}}]]<!--
|#default=entities
-->}}<!--
|c2|cvar|convar=console variables
-->{{#if:{{{game5|}}}|<!--
|c1|command=console commands
-->[[Category:{{{game5}}} {{{topic|<!--
|c0|QC command=QC Commands
-->{{#switch:{{{1|}}}
|s0|pixel shader=pixel shaders
|#default=entities
|s1|vertex shader=vertex shaders
|c2|cvar|convar=console variables
|s2|shader parameter=shader parameters<!--
|c1|command=console commands
-->}}<!--
|c0|QC command=QC Commands
-->}}}]]<!--
|s0|pixel shader=pixel shaders
|s1|vertex shader=vertex shaders
 
|s2|shader parameter=shader parameters<!--
-->}}<!--
-->}}}]]<!--
-->}}<!--
-->}}
-->}}
|}}
|}}
<!-- else if not {{{game}}}: -->
| {{#if: {{{series|}}}
| {{#if: {{{series|}}}
   | {{Main other|{{#if:{{{nocat|}}}||[[Category:{{{series}}} series {{{topic|<!--
   | {{Main other|[[Category:{{{series}}} series {{{topic|<!--
-->{{#switch:{{{1|}}}<!--
-->{{#switch:{{{1|}}}<!--
-->|#default=entities<!--
-->|#default=entities<!--
Line 308: Line 314:
                 -->|s1|vertex shader=vertex shaders<!--
                 -->|s1|vertex shader=vertex shaders<!--
                 -->|s2|shader parameter=shader parameters<!--
                 -->|s2|shader parameter=shader parameters<!--
-->}}<!---->}}}]]}}<!--
-->}}<!---->}}}]]<!--
     Game Specific
     Game Specific
-->{{#if:{{{nocat|}}}||{{#switch:{{{series|}}}<!--
-->{{#switch:{{{series|}}}<!--
-->|#default=<!--
-->|#default=<!--
-->|l4d|l4ds|Left 4 Dead|Left 4 Dead series=[[Category:Left 4 Dead <!--
-->|l4d|l4ds|Left 4 Dead|Left 4 Dead series=[[Category:Left 4 Dead <!--
Line 331: Line 337:
                         <!--|s2|shader parameter=shader parameters
                         <!--|s2|shader parameter=shader parameters
-->}}]]<!--
-->}}]]<!--
-->}}}}}}
-->}}<!--
-->}}
<!-- else if not {{{series}}} -->
   | {{#if: {{{seriescs|}}}
   | {{#if: {{{seriescs|}}}
     | {{Main other|{{#if:{{{nocat|}}}||[[Category:{{{seriescs}}}: Source <!--
     | {{Main other|[[Category:{{{seriescs}}}: Source <!--
-->{{#switch:{{{1|}}}
-->{{#switch:{{{1|}}}
|#default=entities
|#default=entities
Line 342: Line 350:
                 |s1|vertex shader=vertex shaders
                 |s1|vertex shader=vertex shaders
                 |s2|shader parameter=shader parameters
                 |s2|shader parameter=shader parameters
}}]]}}}}
}}]]}}
     | {{Main other|{{#if:{{{nocat|}}}||[[Category:<!--
     | {{Main other|[[Category:<!--
-->{{#switch:{{{engine|}}}<!--
-->{{#switch:{{{engine|}}}<!--
-->|#default={{{engine|Source}}}<!--
-->|#default={{{engine|Source}}}<!--
Line 358: Line 366:
                 -->|s1|vertex shader=vertex shaders<!--
                 -->|s1|vertex shader=vertex shaders<!--
                 -->|s2|shader parameter=shader parameters<!--
                 -->|s2|shader parameter=shader parameters<!--
-->}}]]}}}}
-->}}]]}}
     }}
     }}
   }}
   }}
}}<!--
}}<!--
-->{{main other|{{#switch:{{{1|}}}
 
|e0|point={{#if:{{{nocat|}}}||[[Category:Point Entities]]}}
-->{{main other|<!--
|e1|int point={{#if:{{{nocat|}}}||[[Category:Point Entities]]}}
-->{{#switch:{{{1|}}}
|e2|brush={{#if:{{{nocat|}}}||[[Category:Brush Entities]]}}
|e0|point   =[[Category:Point Entities]]
|e3|int point={{#if:{{{nocat|}}}||[[Category:Brush Entities]]}}
|e1|int point=[[Category:Point Entities]]
|e4|mesh={{#if:{{{nocat|}}}||[[Category:Mesh Entities]]}}
|e2|brush   =[[Category:Brush Entities]]
|e5|path={{#if:{{{nocat|}}}||[[Category:Path Entities]]}}
|e3|int point=[[Category:Brush Entities]]
|s0|pixel shader={{#if:{{{nocat|}}}||[[Category:Pixel Shaders]]}}
|e4|mesh     =[[Category:Mesh Entities]]
|s1|vertex shaders={{#if:{{{nocat|}}}||[[Category:Vertex Shaders]]}}
|e5|path     =[[Category:Path Entities]]
}}<!--
|s0|pixel shader =[[Category:Pixel Shaders]]
-->{{#if:{{{nocat|}}}||<!--
|s1|vertex shaders=[[Category:Vertex Shaders]]
}}<!--
-->{{#switch:{{{1|}}}<!--
-->{{#switch:{{{1|}}}<!--
-->|#default=[[Category:Entities]]<!--
-->|#default=[[Category:Entities]]<!--
-->|c1|c2|c0|QC command|cvar|convar|command|s0|s1|pixel shader|vertex shader=|s2|shader parameter=<!--
-->|c1|c2|c0|QC command|cvar|convar|command|s0|s1|pixel shader|vertex shader=|s2|shader parameter=<!--
-->}}<!--
-->}}<!--
-->}}}}<!--
-->}}<!--


     ++ Cut entities ++
     ++ Cut entities ++


-->{{#if:{{{nocat|}}}
-->{{#ifeq:{{{cut}}}|0||{{Main other|[[Category:Cut Entities]]|}}}}<!--
|
 
|{{#ifeq:{{{cut}}}|1|{{Main other|[[Category:Cut Entities]]|}}}}}}</onlyinclude></includeonly>
-->}}<!-- end if nocat != 0
[[Category:Templates]][[Category:Formatting templates]][[Category:Entity Templates]][[Category:FGD Templates]]
 
--></onlyinclude></includeonly><!--
 
-->[[Category:Templates]]<!--
-->[[Category:Formatting templates]]<!--
-->[[Category:Entity Templates]]<!--
-->[[Category:FGD Templates]]

Revision as of 21:55, 17 September 2023

Todo: Use a strings subpage to reduce duplication, aswell to clean up Autolang in the code, moving all translations to strings subpage.
English (en)Deutsch (de)Esperanto (eo)Español (es)Français (fr)Suomi (fi)Hrvatski (hr)Magyar (hu)Italiano (it)日本語 (ja)한국어 (ko)Nederlands (nl)Polski (pl)Português (pt)Português do Brasil (pt-br)Русский (ru)Slovenčina (sk)Svenska (sv)Türkçe (tr)Українська (uk)Tiếng Việt (vi)中文 (zh)中文(臺灣) (zh-tw)
Curly brackets white.pngTemplate Documentation [view] [edit]
Icon-translate.png Available doc translations
View
Page history
Icon-translate.png
This template uses a strings subpage
Please follow the format on this subpage(s) to add translations.
Number of strings:32
Approximate status of translation:English (en) 96.88% Deutsch (de) 84.38% Español (es) 68.75% Esperanto (eo) 53.13% Suomi (fi) 78.13% Hrvatski (hr) 96.88% Português do Brasil (pt-br) 81.25% Русский (ru) 96.88% Slovenčina (sk) 81.25% 中文 (zh) 84.38% 
Gnome app science.png
This template uses a Testcases subpage
You can test how this page looks with it's different skins and parsers.
#if: