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

Материал из Guild Wars 2 wiki
Перейти к: навигация, поиск
 
(не показаны 2 промежуточные версии этого же участника)
Строка 1: Строка 1:
<includeonly>{{#show: {{{1|}}}
+
<includeonly>{{#if: {{{icon|}}} | {{Game update icon result format|Skill|File:{{{icon}}}|{{{1}}}|{{{2|{{{1}}}}}}}} | {{#show: {{{1|}}}
 
| ?Has context
 
| ?Has context
 
| ?Has game icon
 
| ?Has game icon
Строка 7: Строка 7:
 
| userparam = {{{1|}}}
 
| userparam = {{{1|}}}
 
| format = template
 
| format = template
| template = Game update icon result format
+
| template = Game update icon result format{{!}}name={{{2|}}}
 
| default=[[{{{1|}}}]]
 
| default=[[{{{1|}}}]]
}}</includeonly><noinclude>
+
}}{{#if: {{{note|}}}|<span>:</span> {{{note|}}}{{increment|notect}}{{#subobject:note{{#var:notect}}
A template that provides skill and trait icons for game update pages. Format template: {{tl|Game update icon result format}}.
+
|Has game update context page={{PAGENAME}}
 +
|Has game update page={{{1|}}}
 +
|Has game update note={{{note|}}}
 +
}}}}}}</includeonly><noinclude>
 +
== Description ==
 +
A template that provides skill and trait icons for game update pages. Furthermore, allows to set game update "note" which then can be substituted by {{tl|Game update helper}}. Format template: {{tl|Game update icon result format}}.
  
 
== Usage ==
 
== Usage ==
Строка 18: Строка 23:
 
;1 ''(unnamed parameter)''
 
;1 ''(unnamed parameter)''
 
:skill or trait page name.
 
:skill or trait page name.
 +
;2 ''(unnamed parameter)''
 +
:Optional. Displayed skill or trait name. This one may differ from the page name, for example upper-/lowercase mistakes in the game update notes.
 +
;icon
 +
:Optional. Specify a valid filename without the "File:" prefix.
 +
;note
 +
:Optional. Displays the game update note and creates a subobject ([[Property:Has game update context page|Has game update context page]]=Game updates/<date> and [[Property:Has game update page|Has game update page]]=skill or trait page) which sets the property [[Property:Has game update note|Has game update note]].
  
 
== Example ==
 
== Example ==
 
<pre>{{Game update icon|Retribution (trait)}}</pre>
 
<pre>{{Game update icon|Retribution (trait)}}</pre>
 +
{{Game update icon|Retribution (trait)}}
  
{{Game update icon|Retribution (trait)}}
+
<pre>{{Game update icon|Retribution (trait)|note=This trait no longer grants bonus ferocity.}}</pre>
 +
{{Game update icon|Retribution (trait)|note=This trait no longer grants bonus ferocity.}}
  
 
== Notes ==
 
== Notes ==

Текущая версия на 09:58, 13 октября 2019

Description[править]

A template that provides skill and trait icons for game update pages. Furthermore, allows to set game update "note" which then can be substituted by {{Game update helper}}. Format template: {{Game update icon result format}}.

Usage[править]

{{Game update icon|<page name>}}

Parameters[править]

1 (unnamed parameter)
skill or trait page name.
2 (unnamed parameter)
Optional. Displayed skill or trait name. This one may differ from the page name, for example upper-/lowercase mistakes in the game update notes.
icon
Optional. Specify a valid filename without the "File:" prefix.
note
Optional. Displays the game update note and creates a subobject (Has game update context page=Game updates/<date> and Has game update page=skill or trait page) which sets the property Has game update note.

Example[править]

{{Game update icon|Retribution (trait)}}
Retribution (trait).png
 Retribution
{{Game update icon|Retribution (trait)|note=This trait no longer grants bonus ferocity.}}
Retribution (trait).png
 Retribution: This trait no longer grants bonus ferocity.

Notes[править]

// Scripts to use when viewing game updates
if (mw.config.get('wgPageName').substring(0, 12) == 'Game_updates') {
    $('li .skillicon, li .effecticon, li .traiticon').each(function(){
      $(this).parent('li').addClass('patchnote');
    });
}
.patchnote { line-height: 2.7em; }
.patchnote .skillicon img, .patchnote .traiticon img { background-color: black; }