Шаблон:Game mode version — различия между версиями
Материал из Guild Wars 2 wiki
Blood (обсуждение | вклад) (Новая страница: «{{#switch:{{{1|}}}| pvp = {{#vardefine:type|pvp}} | {{#vardefine:type|pve}} }}<!-- --><div style="margin: 10px auto; padding-left:10px; width: 500px; {{#switch…») |
Blood (обсуждение | вклад) |
||
(не показаны 24 промежуточные версии этого же участника) | |||
Строка 1: | Строка 1: | ||
− | {{#switch:{{{1|}}}| | + | {{#if: <!-- Setting variables --> |
+ | {{#vardefine:gmvtype|{{lc:{{{type|{{#if:{{#show:{{PAGENAME}}|?Has context}}|{{#show:{{PAGENAME}}|?Has context}}|skill}}}}}}}}} | ||
+ | {{#if: {{{1|}}} | ||
+ | | {{#vardefine:gmvmessage|{{#switch:{{#var:gmvtype}}|skill=Это умение разделено|trait=Эта черта разделена|effect=Этот эффект разделен|#default=Это разделено}} между игровыми режимами — выберите нужный вам режим:}} | ||
+ | {{#arraymap:{{{1}}}|,|@@@| | ||
+ | {{#if: {{#pos:@@@|pve}} | {{#vardefine:gmv-pve|@@@}} }} | ||
+ | {{#if: {{#pos:@@@|wvw}} | {{#vardefine:gmv-wvw|@@@}} }} | ||
+ | {{#if: {{#pos:@@@|pvp}} | {{#vardefine:gmv-pvp|@@@}} }} | ||
+ | |}} | ||
+ | | {{#vardefine:gmvmessage|This template has not been configured correctly.<br>For help, see {{tl|Game mode version}}.}} | ||
+ | }} | ||
+ | }}<!-- | ||
− | --> | + | Sorting the ambiguous triple (either pve,wvw,pvp or pve,pvp,wvw) into the fixed order PvE, WvW, PvP (based on the widget order) |
− | <div style="{{# | + | |
− | + | -->{{#switch: {{#arraymap: {{{1|}}}|,|@@@|@@@|,}} | |
− | + | | pve,wvw,pvp | |
− | + | | pve,pvp,wvw = {{#vardefine:button1|pve}}{{#vardefine:button2|wvw}}{{#vardefine:button3|pvp}} | |
− | + | | #default = {{#vardefine:button1|{{#explode:{{{1}}}|,|0}}}}{{#vardefine:button2|{{#explode:{{{1}}}|,|1}}}}{{#vardefine:button3|{{#explode:{{{1}}}|,|2}}}} | |
− | + | }}<!-- | |
− | + | ||
+ | Template | ||
+ | |||
+ | -->{{#if: {{{scope|}}} | ||
+ | | <div class="notice static metadata" style="width: 330px; background: #C00800;" title="Версия игрового режима"> | ||
+ | <div class="background" style="border-style: solid; border-width: 1px; margin-bottom: 15px; border-left: none; padding: 0.5em 1em;"> | ||
+ | <div class="gmvbuttons" data-gmvbuttons="{{{1}}}" data-scope="{{{scope}}}" style="text-align:center;">Выберите нужный вам режим игры для просмотра:<br><!--{{#if: {{{1|}}} | {{#Widget:Game mode buttons|button1={{#var:button1}}|button2={{#var:button2}}|button3={{#var:button3}}|scope={{{scope}}}}} }}--></div> | ||
+ | </div> | ||
+ | </div> | ||
+ | |||
+ | | <div class="notice static metadata" style="width: 620px; background: #C00800;" title="Версия игрового режима"> | ||
+ | <div class="background" style="border-style: solid; border-width: 1px; margin-bottom: 15px; border-left: none; padding: 0.5em 1em;"> | ||
+ | <table cellpadding="0" cellspacing="0" style="background-color: transparent;"> | ||
+ | <tr> | ||
+ | <td class="notice-icon" style="vertical-align:middle; white-space:nowrap; width:80px; text-align:center;"><span style="height:32px;display:inline-block;" class="gamemode pve">[[File:Hero panel Menu Bar icon.png|32px|link=]]</span><span style="height:32px;display:inline-block;" class="gamemode wvw">[[File:WvW Menu Bar icon.png|32px|link=]]</span><span style="height:32px;display:inline-block;" class="gamemode pvp">[[File:PvP Menu Bar icon.png|32px|link=]]</span></td> | ||
+ | <td style="vertical-align:middle; padding-left: 1em;">{{#var:gmvmessage}} | ||
+ | <div class="gmvbuttons" data-gmvbuttons="{{{1}}}" style="text-align:center;"><!--{{#if: {{{1|}}} | {{#Widget:Game mode buttons|button1={{#var:button1}}|button2={{#var:button2}}|button3={{#var:button3}}}} }}--></div> | ||
+ | </td> | ||
+ | </tr> | ||
+ | </table> | ||
+ | </div> | ||
+ | </div> | ||
+ | }}<noinclude> | ||
== Description == | == Description == | ||
− | This is a notice template for things that are split between | + | This is a notice template for things that are split between game modes, mostly skills and traits. |
− | ; unnamed parameter 1 : | + | ; unnamed parameter 1 |
− | + | : Required. The game modes to create buttons for. Separate differing game modes via comma. Example values: | |
− | ; | + | <pre> |
− | + | pve wvw,pvp | |
+ | pve,wvw pvp | ||
+ | pve pvp,wvw | ||
+ | pve,wvw,pvp | ||
+ | </pre> | ||
+ | ; scope | ||
+ | : Optional. Restricts the switching logic to a specified game update, used by /history subpages. Example value: <code>|scope=2018-03-27</code> | ||
=== Examples === | === Examples === | ||
<pre> | <pre> | ||
− | {{game mode version|pvp}} | + | {{game mode version|pve wvw,pvp}} |
</pre> | </pre> | ||
− | {{game mode version|pvp}} | + | {{game mode version|pve wvw,pvp}} |
<pre> | <pre> | ||
− | {{game mode version|pvp| | + | <div id="gmv-2018-03-27">{{game mode version|pve,wvw,pvp|scope=2018-03-27}}</div> |
</pre> | </pre> | ||
− | {{game mode version|pvp| | + | <div id="gmv-2018-03-27">{{game mode version|pve,wvw,pvp|scope=2018-03-27}}</div> |
− | + | == See also == | |
− | + | * [[Widget:Game mode buttons]] | |
− | |||
− | |||
− | [[Category:Notice templates]]</noinclude> | + | [[Category:Notice templates]] |
+ | </noinclude> |
Текущая версия на 01:16, 28 марта 2021
Description[править]
This is a notice template for things that are split between game modes, mostly skills and traits.
- unnamed parameter 1
- Required. The game modes to create buttons for. Separate differing game modes via comma. Example values:
pve wvw,pvp pve,wvw pvp pve pvp,wvw pve,wvw,pvp
- scope
- Optional. Restricts the switching logic to a specified game update, used by /history subpages. Example value:
|scope=2018-03-27
Examples[править]
{{game mode version|pve wvw,pvp}}
<div id="gmv-2018-03-27">{{game mode version|pve,wvw,pvp|scope=2018-03-27}}</div>