Шаблон:Game mode version — различия между версиями

Материал из Guild Wars 2 wiki
Перейти к: навигация, поиск
(Новая страница: «{{#switch:{{{1|}}}| pvp = {{#vardefine:type|pvp}} | {{#vardefine:type|pve}} }}<!-- --><div style="margin: 10px auto; padding-left:10px; width: 500px; {{#switch…»)
 
 
(не показаны 24 промежуточные версии этого же участника)
Строка 1: Строка 1:
{{#switch:{{{1|}}}| pvp = {{#vardefine:type|pvp}} | {{#vardefine:type|pve}} }}<!--  
+
{{#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}}.}}
 +
}}
 +
}}<!--
  
--><div style="margin: 10px auto; padding-left:10px; width: 500px; {{#switch:{{#var:type}} | pvp = background: #0008C0; | background: #C00800; }}" title="{{#switch:{{#var:type}} | pvp = PvE version | PvP 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:{{#var:type}} | pvp = background: #DBDBFF; border: solid #0008C0; | background: #FFDBDB; border: solid #C00800; }} border-width: 1px; margin-bottom:15px; border-left: none; padding: 0.5em 1em;">
+
 
{| cellpadding="0" cellspacing="0" style="background-color: transparent;"
+
-->{{#switch: {{#arraymap: {{{1|}}}|,|@@@|@@@|,}}
| style="vertical-align:middle;" | [[File:{{#switch:{{#var:type}}| pvp = Hero panel Menu Bar icon | PvP Menu Bar icon}}.png|32px]]
+
| pve,wvw,pvp
| style="vertical-align:middle; padding-left: 1em;" | This {{{type|skill}}} has a {{#switch: {{#var:type}}  
+
| pve,pvp,wvw = {{#vardefine:button1|pve}}{{#vardefine:button2|wvw}}{{#vardefine:button3|pvp}}
| pvp = [[Player versus Environment|PvE]]{{#if:{{{wvw|}}}|&nbsp;version (including [[World versus World|WvW]])|-only version}} — see [[{{{name|{{#titleparts:{{trim|{{#explode:{{BASEPAGENAME}}|(}}}}}}}}}]].
+
| #default = {{#vardefine:button1|{{#explode:{{{1}}}|,|0}}}}{{#vardefine:button2|{{#explode:{{{1}}}|,|1}}}}{{#vardefine:button3|{{#explode:{{{1}}}|,|2}}}}
| [[Player versus Player|PvP]]{{#if:{{{wvw|}}}|&nbsp;version (including [[World versus World|WvW]])|-only version}} — see [[{{{name|{{BASEPAGENAME}} (PvP)}}}]]. }}
+
}}<!--
|}</div></div><noinclude>
+
 
 +
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 gamemodes, mostly skills.
+
This is a notice template for things that are split between game modes, mostly skills and traits.
  
; unnamed parameter 1 : Optional. The game mode version of the page. Defaults to pve.
+
; unnamed parameter 1
; name : Optional. Name of the page that will be linked. Defaults to <code><nowiki>{{BASEPAGENAME}}</nowiki></code>.
+
: Required. The game modes to create buttons for. Separate differing game modes via comma. Example values:
; type : Optional. Sets the type of the page. Defaults to skill.
+
<pre>
; wvw : Optional. Includes a notice that the version of the linked page will be used for the World vs. World ruleset.
+
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|name = Example|wvw = y}}
+
<div id="gmv-2018-03-27">{{game mode version|pve,wvw,pvp|scope=2018-03-27}}</div>
 
</pre>
 
</pre>
{{game mode version|pvp|name = Example|wvw = y}}
+
<div id="gmv-2018-03-27">{{game mode version|pve,wvw,pvp|scope=2018-03-27}}</div>
  
<pre>
+
== See also ==
{{game mode version|type = trait|name = Example (PvP)|wvw = y}}
+
* [[Widget:Game mode buttons]]
</pre>
 
{{game mode version|type = trait|name = Example (PvP)|wvw = y}}
 
  
[[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>

See also[править]