Difference between revisions of "Template:Game"

From comp.tf
Jump to navigation Jump to search
Line 20: Line 20:
 
</div><!--
 
</div><!--
  
 +
Variables transformations
 +
-->{{#vardefine:team1|{{#ifeq:{{{team1|}}}||TBD|{{#ifeq:{{{team1|}}}|&nbsp;|TBD|{{#explode:{{#explode:{{Team/{{{team1|}}}}}|link=|1}}|]]|0}} }}}}}}<!--
 +
-->{{#vardefine:team2|{{#ifeq:{{{team2|}}}||TBD|{{#ifeq:{{{team2|}}}|&nbsp;|TBD|{{#explode:{{#explode:{{Team/{{{team2|}}}}}|link=|1}}|]]|0}} }}}}}}<!--
 +
-->{{#vardefine:map_name|{{#if:{{{map|}}}}}}}<!--
 
Storage of score in variables (later in SMW)
 
Storage of score in variables (later in SMW)
-->{{#switch:{{{win|}}}
+
-->
 +
{{#switch:{{{win|}}}
 
|1={{#vardefine:team1wins|{{#expr:{{#var:team1wins|0}} + 1}} }}
 
|1={{#vardefine:team1wins|{{#expr:{{#var:team1wins|0}} + 1}} }}
 
|2={{#vardefine:team2wins|{{#expr:{{#var:team2wins|0}} + 1}} }}
 
|2={{#vardefine:team2wins|{{#expr:{{#var:team2wins|0}} + 1}} }}
| }}</includeonly>
+
| }}
<noinclude>
+
{{#subobject:{{#var:team1|TBD}}_vs_{{#var:team2|TBD}}_at_{{#var:Raw_Match_date|TBD}}{{#var:timezone|}}_in_Match_{{#var:map_name|TBD}}
{{Game |t1score=4 |t2score=1 |win=draw |map=cp_gullywash_final1 }}
+
|has match ={{#var:team1|TBD}}_vs_{{#var:team2|TBD}}_at_{{#var:Raw_Match_date|TBD}}{{#var:timezone|}}_in_Match_{{#var:match_number|TBD}}
</noinclude>
+
|Has map ={{#var:map_name|TBD}}
 +
}}{{#vardefine:games1|0}}{{#vardefine:games2|0}}{{#vardefine:finished|false}}</includeonly><noinclude>{{documentation}}[[Category:Source Liquipedia]]</noinclude>
 +
</includeonly>

Revision as of 00:57, 26 January 2017

(view - edit) Documentation

Template:Game/doc

</includeonly>