Difference between revisions of "Template:Game"

From comp.tf
Jump to navigation Jump to search
m (Reverted edits by Cirlo (talk) to last revision by Efefknee)
Line 1: Line 1:
 
<includeonly><div class="match-row">
 
<includeonly><div class="match-row">
<div class="left">
+
<div class="left">
<div class="check">{{#ifeq:{{{win|}}}|draw|<abbr title="Draw">D</abbr>|{{#ifeq:{{{win|}}}|1|[[File:GreenCheck.png|link=]]|[[File:NoCheck.png|link=]]}}}}</div>
+
  <div class="check">{{#ifeq:{{{win|}}}|1|[[Image:GreenCheck.png|link=]]|[[Image:NoCheck.png|link=]]}}</div>
<div class="score team1">
+
  <div class="score team1">{{{t1score|}}}</div>
{{#if:{{{t1score|}}}|{{{t1score}}}|}}
+
</div>
</div>
+
<div class="map">{{#ifeq:{{{unplayed|}}}|1|<del>|}}<strong>{{#if:{{{map|}}}|[[{{{map|}}}]]|}}</strong>{{#ifeq:{{{unplayed|}}}|1|</del>|}}</div>
</div>
+
<div class="right">
<div class="right">
+
  <div class="score team2">{{{t2score|}}}</div>
<div class="check">{{#ifeq:{{{win|}}}|draw|<abbr title="Draw">D</abbr>|{{#ifeq:{{{win|}}}|2|[[File:GreenCheck.png|link=]]|[[File:NoCheck.png|link=]]}}}}</div>
+
  <div class="check">{{#ifeq:{{{win|}}}|2|[[Image:GreenCheck.png|link=]]|[[Image:NoCheck.png|link=]]}}</div>
<div class="score team2">
+
</div>
{{#if:{{{t2score|}}}|{{{t2score}}}|}}
+
<div style="clear:both"></div>
</div>
+
</div></includeonly>
</div>
 
<div class="map">
 
{{#ifeq:{{{unplayed|}}}|1|<del>|}}
 
<strong>{{#if:{{{map|}}}|[[{{{map}}}]]|TBD}}</strong>
 
{{#ifeq:{{{unplayed|}}}|1|</del>|}}
 
</div>
 
<div style="clear:both"></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)
 
-->
 
{{#switch:{{{win|}}}
 
|1={{#vardefine:team1wins|{{#expr:{{#var:team1wins|0}} + 1}} }}
 
|2={{#vardefine:team2wins|{{#expr:{{#var:team2wins|0}} + 1}} }}
 
| }}
 
{{#subobject:maps
 
|Has map ={{#var:map_name|TBD}}
 
}}{{#vardefine:games1|0}}{{#vardefine:games2|0}}{{#vardefine:finished|false}}
 
</includeonly>
 
<noinclude>
 
{{documentation}}[[Category:Source Liquipedia]]
 
</noinclude>
 

Revision as of 01:25, 26 January 2017