Template:This is a: Difference between revisions
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= | ||
}}<!-- | |||
++ "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|{{# | | 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= 以来}}) | | ({{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= 以来}}) | ||
}} | }} | ||
| {{#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|, |zh=、}}|{{Autolang| and |zh= 和 }}}}<!-- | | {{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|, |zh=、}}|{{Autolang| and |zh= 和 }}}}<!-- | |||
-->{{#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|, |zh=、}}|{{Autolang| and |zh= 和 }}}}{{#ifexist: Template:{{{game2|}}} | {{ {{{game2}}} |4}} | {{ {{game icon name|{{{game2}}} }}|4}} }} }}<!-- | -->{{#if:{{{game2|}}}|{{#if:{{{game3|}}}|{{Autolang|, |zh=、}}|{{Autolang| and |zh= 和 }}}}{{#ifexist: Template:{{{game2|}}} | {{ {{{game2}}} |4}} | {{ {{game icon name|{{{game2}}} }}|4}} }} }}<!-- | ||
Line 150: | Line 156: | ||
-->{{#if:{{{game5|}}}|{{Autolang| and |eo= kaj |zh= 和 }}{{#ifexist: Template:{{{game5|}}} | {{ {{{game5}}} |4}} | {{ {{game icon name|{{{game5}}} }}|4}} }} }}<!-- | -->{{#if:{{{game5|}}}|{{Autolang| and |eo= kaj |zh= 和 }}{{#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 | | true = {{main other|[[Category:Internal entities]]}} | ||
| #default = {{main other | | #default = {{main other|[[Category:Non-internal entities]]}}<!-- | ||
|e2|brush={{main other | -->}} | ||
|e1|e3|int point|int brush={{main other | |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 | | {{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:{{{ | -->{{#if:{{{game1|}}}|<!-- | ||
-->[[Category:{{{game1}}} {{{topic|<!-- | |||
-->{{#switch:{{{1|}}} | |||
|#default=entities | |||
|c2|cvar|convar=console variables | |||
|c1|command=console commands | |||
|c0|QC command=QC Commands | |||
|s0|pixel shader=pixel shaders | |||
|s1|vertex shader=vertex shaders | |||
|s2|shader parameter=shader parameters<!-- | |||
-->}}<!-- | |||
|s2|shader parameter=shader parameters<!-- | -->}}}]]<!-- | ||
-->}}<!-- | |||
-->{{#if:{{{game2|}}}|<!-- | |||
-->[[Category:{{{game2}}} {{{topic|<!-- | |||
-->{{#switch:{{{1|}}} | |||
|#default=entities | |||
|c2|cvar|convar=console variables | |||
|c1|command=console commands | |||
|c0|QC command=QC Commands | |||
|s0|pixel shader=pixel shaders | |||
|s1|vertex shader=vertex shaders | |||
|s2|shader parameter=shader parameters<!-- | |||
-->}}<!-- | |||
-->}}}]]<!-- | |||
|s2|shader parameter=shader parameters<!-- | -->}}<!-- | ||
-->{{#if:{{{game3|}}}|<!-- | |||
-->[[Category:{{{game3}}} {{{topic|<!-- | |||
-->{{#switch:{{{1|}}} | |||
|#default=entities | |||
|c2|cvar|convar=console variables | |||
|c1|command=console commands | |||
|c0|QC command=QC Commands | |||
|s0|pixel shader=pixel shaders | |||
|s1|vertex shader=vertex shaders | |||
|s2|shader parameter=shader parameters<!-- | |||
-->}}<!-- | |||
-->}}}]]<!-- | |||
-->}}<!-- | |||
|s2|shader parameter=shader parameters<!-- | -->{{#if:{{{game4|}}}|<!-- | ||
-->[[Category:{{{game4}}} {{{topic|<!-- | |||
-->{{#switch:{{{1|}}} | |||
|#default=entities | |||
|c2|cvar|convar=console variables | |||
|c1|command=console commands | |||
|c0|QC command=QC Commands | |||
|s0|pixel shader=pixel shaders | |||
|s1|vertex shader=vertex shaders | |||
|s2|shader parameter=shader parameters<!-- | |||
-->}}<!-- | |||
-->}}}]]<!-- | |||
-->}}<!-- | |||
-->{{#if:{{{game5|}}}|<!-- | |||
|s2|shader parameter=shader parameters<!-- | -->[[Category:{{{game5}}} {{{topic|<!-- | ||
-->{{#switch:{{{1|}}} | |||
|#default=entities | |||
|c2|cvar|convar=console variables | |||
|c1|command=console commands | |||
|c0|QC command=QC Commands | |||
|s0|pixel shader=pixel shaders | |||
|s1|vertex shader=vertex shaders | |||
|s2|shader parameter=shader parameters<!-- | |||
-->}}<!-- | |||
-->}}}]]<!-- | |||
|s2|shader parameter=shader parameters<!-- | |||
-->}} | -->}} | ||
|}} | |}} | ||
<!-- else if not {{{game}}}: --> | |||
| {{#if: {{{series|}}} | | {{#if: {{{series|}}} | ||
| {{Main other | | {{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 | ||
--> | -->{{#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 | | {{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 | | {{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|}}} | |||
-->{{main other|<!-- | |||
-->{{#switch:{{{1|}}} | |||
|e0|point =[[Category:Point Entities]] | |||
|e1|int point=[[Category:Point Entities]] | |||
|e2|brush =[[Category:Brush Entities]] | |||
|e3|int point=[[Category:Brush Entities]] | |||
|e4|mesh =[[Category:Mesh Entities]] | |||
|e5|path =[[Category:Path Entities]] | |||
|s0|pixel shader =[[Category:Pixel Shaders]] | |||
|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 ++ | ||
--> | -->{{#ifeq:{{{cut}}}|0||{{Main other|[[Category:Cut Entities]]|}}}}<!-- | ||
-->}}<!-- 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.
The above documentation is transcluded from Template:This is a/doc. (Edit | Page history)
Editors can experiment in this template's sandbox (edit) and testcases (edit) pages.
Editors can experiment in this template's sandbox (edit) and testcases (edit) pages.