From GamingWiki
Line 56: | Line 56: | ||
-->{{#vardefine: groupcount | 0 }}<!-- | -->{{#vardefine: groupcount | 0 }}<!-- | ||
-->{{#ifeq: {{#hashvalue: thedataline | llabel |M_NUL}}-{{#hashvalue: thedataline | ldata |M_NUL}} | <!-- | -->{{#ifeq: {{#hashvalue: thedataline | llabel |M_NUL}}-{{#hashvalue: thedataline | ldata |M_NUL}} | <!-- | ||
− | --> M_NUL-M_NUL || {{#vardefine: groupcount | {{#expr: {{#var:groupcount}}+1}} }} }}<!-- | + | --> M_NUL-M_NUL ||<!-- |
+ | -->{{#vardefine: groupcount | {{#expr: {{#var:groupcount}}+1}} }} <!-- | ||
+ | -->{{#vardefine: llabelcols | {{#ifeq: {{#hashvalue: thedataline | llabel |M_NUL}} | M_NUL | 0 | 1 }} }}<!-- | ||
+ | -->}}<!-- | ||
-->{{#ifeq: {{#hashvalue: thedataline | label |M_NUL}}-{{#hashvalue: thedataline | data |M_NUL}} | <!-- | -->{{#ifeq: {{#hashvalue: thedataline | label |M_NUL}}-{{#hashvalue: thedataline | data |M_NUL}} | <!-- | ||
− | --> M_NUL-M_NUL || {{#vardefine: groupcount | {{#expr: {{#var:groupcount}}+1}} }} }}<!-- | + | --> M_NUL-M_NUL || {{#vardefine: groupcount | {{#expr: {{#var:groupcount}}+1}} }} <!-- |
+ | -->{{#vardefine: labelcols | {{#ifeq: {{#hashvalue: thedataline | label |M_NUL}} | M_NUL | 0 | 1 }} }}<!-- | ||
+ | -->}}<!-- | ||
-->{{#ifeq: {{#hashvalue: thedataline | rlabel |M_NUL}}-{{#hashvalue: thedataline | rdata |M_NUL}} | <!-- | -->{{#ifeq: {{#hashvalue: thedataline | rlabel |M_NUL}}-{{#hashvalue: thedataline | rdata |M_NUL}} | <!-- | ||
− | --> M_NUL-M_NUL || {{#vardefine: groupcount | {{#expr: {{#var:groupcount}}+1 | + | --> M_NUL-M_NUL || {{#vardefine: groupcount | {{#expr: {{#var:groupcount}}+1}} }} <!-- |
− | + | -->{{#vardefine: rlabelcols | {{#ifeq: {{#hashvalue: thedataline | rlabel |M_NUL}} | M_NUL | 0 | 1 }} }}<!-- | |
− | + | -->}}<!-- | |
− | -->{{# | + | |
− | + | If there are no groups, do nothing. | |
− | + | -->{{#ifeq:groupcount|0||<!-- | |
− | + | ||
− | + | Here we're assuming there are 6 columns total: | |
− | + | -->{{#var:groupcols|<!-- | |
+ | -->{{#switch: {{#var:groupcount}} | 1 = 6 | 2 = 3 | 3 = 2 }}<!-- | ||
+ | -->}}<!-- | ||
+ | |||
+ | -->{{#vardefine: ldatacols | <!-- | ||
+ | -->{{#ifeq: {{#hashvalue: thedataline | ldata |M_NUL}} | M_NUL | 0 | <!-- | ||
+ | -->{{#expr:{{#var:groupcols}}-{{#var:llabelcols}} }} <!-- | ||
+ | -->}}<!-- | ||
+ | -->}}<!-- | ||
+ | -->{{#vardefine: rdatacols | <!-- | ||
+ | -->{{#ifeq: {{#hashvalue: thedataline | rdata |M_NUL}} | M_NUL | 0 | <!-- | ||
+ | -->{{#expr:{{#var:groupcols}}-{{#var:rlabelcols}} }} <!-- | ||
+ | -->}}<!-- | ||
+ | -->}}<!-- | ||
+ | -->{{#vardefine: datacols | {{#expr:{{#var:columns}}-{{#var:labelcols}}-{{#var:llabelcols}}-{{#var:ldatacols}}-{{#var:rlabelcols}}-{{#var:rdatacols}} }} }}<!-- | ||
--><nowiki /> | --><nowiki /> | ||
Line 96: | Line 115: | ||
-->}}<!-- | -->}}<!-- | ||
− | -->}}<!-- end ifeq for existence of | + | -->}}<!-- end ifeq for existence of groups |
-->{{#hashreset: thedataline }}<!-- | -->{{#hashreset: thedataline }}<!-- | ||
-->}}<!-- end hashprint datalinehash | -->}}<!-- end hashprint datalinehash |