17,260
edits
m (reset usedelim for successive Dump instances) |
(re-added backslashed multiquote support, clarified the code) |
||
Line 1: | Line 1: | ||
<onlyinclude>{{#vardefine:usedelim|}}{{#fornumargs: argnum | argval | <onlyinclude>{{#vardefine:usedelim|}}<!-- | ||
| {{#ifeq:{{#var:argnum}}|1||{{#vardefine:first|{{#explode:{{#var: | |||
-->{{#loop: qid | For each argument (arg|arg|arg|...) | ||
-->{{#fornumargs: argnum | argval | |||
| {{#ifeq: {{#var:argnum}} | 1 | |||
| <!-- game selector - do nothing --> | |||
| {{#vardefine:ctr|-1}}<!-- | |||
For each range (range\range\range\...) | |||
-->{{#while: | {{#explode:{{#var:argval}}|\|{{++|ctr}}}} | |||
| {{#vardefine:range|{{#explode:{{#var:argval}}|\|{{#var:ctr}}}}}}<!-- | |||
-->{{#vardefine:first|{{#explode:{{#var:range}}|-|0}}}}<!-- | |||
-->{{#vardefine:last|{{#explode:{{#var:range}}|-|1}}}}<!-- | |||
For each quote (qid-qid) | |||
-->{{#loop: qid | {{#var:first}} | {{#expr:{{!!=|last|{{#var:first}}}}-{{#var:first}}+1}} | |||
| {{#if: {{#var:usedelim}} | |||
| {{!!=|dump-qdelim|{{{qdelim|{{S}}}}}}} | |||
| {{#vardefine:usedelim|true}} | |||
}}<!-- | |||
-->{{:{{Zelda|{{{1}}}}} Text Dump/Select|{{#var:qid}}|{{!!=|dump-ldelim|{{{ldelim|{{S}}}}}}}}} | |||
}} | |||
}} | |||
}} | |||
}}</onlyinclude> | }}</onlyinclude> | ||