KKeine Bearbeitungszusammenfassung |
K (Rye Greenwood verschob die Seite Vorlage:Potionlength nach Vorlage:Buffduration: Doesn't only apply to potions, but to all kinds of buff sources.) |
||
Zeile 1: | Zeile 1: | ||
⚫ | |||
− | {{#cargo_query:tables=Recipes |
||
+ | // register localization info |
||
− | |fields=_pageName, result, resultid, resultimage, resulttext, amount, version, station, ingredients, ings, args |
||
+ | -->{{l10n/register|potionlength|en<!-- |
||
− | |where=result='Bee Headgear' OR result='Bee Breastplate' OR result='Bee Greaves' OR result='Sweetheart Necklace' |
||
+ | -->|maintext=This lasts for $duration$, but can be canceled at any time<!-- |
||
− | }} |
||
+ | -->|error=[Duration is missing! See $template_link$]<!-- |
||
+ | -->|dsk= by right-clicking the icon<!-- |
||
+ | -->|cns= by selecting the icon and canceling it in the equipment menu<!-- |
||
+ | -->|mbl= by double-tapping the buff icon<!-- |
||
+ | -->|3ds= by canceling the buff from the buffs screen<!-- |
||
+ | -->|or=or<!-- |
||
+ | -->|sep1=,<!-- separator between each element of the enumeration |
||
+ | -->|sep2=,<!-- separator between last and second last element |
||
⚫ | |||
+ | -->{{l10n/register|potionlength|de<!-- |
||
+ | -->|maintext=Dieser Effekt dauert $duration$ an, kann aber vorzeitig beendet werden, indem<!-- |
||
+ | -->|error=[Dauer fehlt! Siehe $template_link$]<!-- |
||
+ | -->|dsk= ein Rechtsklick auf das Symbol ausgeführt wird<!-- |
||
+ | -->|cns= das Symbol ausgewählt und im Ausrüstungsmenü abgebrochen wird<!-- |
||
+ | -->|mbl= auf das Symbol doppelt getippt wird<!-- |
||
+ | -->|3ds= der Statuseffekt im Statuseffektmenü abgebrochen wird<!-- |
||
+ | -->|or=oder<!-- |
||
+ | -->|sep1=,<!-- separator between each element of the enumeration |
||
+ | -->|sep2=‌<!-- separator between last and second last element: zero-width character to prevent fallback to English |
||
+ | -->}}<!-- |
||
+ | // initiate version vars |
||
− | {{#cargo_query:tables=Recipes |
||
+ | -->{{#vardefine:potl_dsk|y}}<!-- |
||
− | |fields=_pageName, result, resultid, resultimage, resulttext, amount, version, station, ingredients, ings, args |
||
+ | -->{{#vardefine:potl_cns|y}}<!-- |
||
− | |where=version='desktop console' |
||
+ | -->{{#vardefine:potl_old|y}}<!-- |
||
− | }} |
||
+ | -->{{#vardefine:potl_mbl|y}}<!-- |
||
+ | -->{{#vardefine:potl_3ds|y}}<!-- |
||
+ | // automatically generated versions |
||
⚫ | |||
+ | -->{{#ifeq:{{{eversions|}}}|no|<!-- nothing -->|<!-- |
||
+ | -->{{#vardefine:potl_ev|{{eversions|raw=y|{{{eversions|{{BASEPAGENAME}}}}}}}}}<!-- fetch exclusive info |
||
+ | -->{{#if:{{#var:potl_ev}}|<!-- {{eversions}} returned something, i.e. the buff is exclusive to some platforms |
||
+ | // reset all vars |
||
+ | -->{{#vardefine:potl_dsk|}}<!-- |
||
+ | -->{{#vardefine:potl_cns|}}<!-- |
||
+ | -->{{#vardefine:potl_old|}}<!-- |
||
+ | -->{{#vardefine:potl_mbl|}}<!-- |
||
+ | -->{{#vardefine:potl_3ds|}}<!-- |
||
+ | // fill the vars based on {{eversions}}'s result |
||
+ | -->{{#vardefine:potl_dsk|{{#if:{{#pos:{{#var:potl_ev}}|desktop}}|y}}}}<!-- |
||
+ | -->{{#vardefine:potl_cns|{{#if:{{#pos:{{#var:potl_ev}}|console}}|y}}}}<!-- |
||
+ | -->{{#vardefine:potl_old|{{#if:{{#pos:{{#var:potl_ev}}|old-gen}}|y}}}}<!-- |
||
+ | -->{{#vardefine:potl_mbl|{{#if:{{#pos:{{#var:potl_ev}}|mobile}}|y}}}}<!-- |
||
+ | -->{{#vardefine:potl_3ds|{{#if:{{#pos:{{#var:potl_ev}}|3ds}}|y}}}}<!-- |
||
+ | -->}}<!-- |
||
+ | -->}}<!-- |
||
+ | // manual overriding |
||
+ | -->{{#vardefine:potl_dsk|{{{desktop|{{{dsk|{{#var:potl_dsk}}}}}}}}}}<!-- |
||
+ | -->{{#vardefine:potl_cns|{{{console|{{{cns|{{#var:potl_cns}}}}}}}}}}<!-- |
||
+ | -->{{#vardefine:potl_old|{{{old-gen|{{{old|{{#var:potl_old}}}}}}}}}}<!-- |
||
+ | -->{{#vardefine:potl_mbl|{{{mobile|{{{mbl|{{#var:potl_mbl}}}}}}}}}}<!-- |
||
+ | -->{{#vardefine:potl_3ds|{{{3ds|{{#var:potl_3ds}}}}}}}<!-- |
||
+ | // standardizing ("yes" and "y" -> "y", anything else to empty) |
||
− | {{recipes/extract|result=Campfire/Hero's Hat|nostation=y}} |
||
+ | -->{{#vardefine:potl_dsk|{{#switch:{{#var:potl_dsk}}|yes|y=y|#default=}}}}<!-- |
||
+ | -->{{#vardefine:potl_cns|{{#switch:{{#var:potl_cns}}|yes|y=y|#default=}}}}<!-- |
||
+ | -->{{#vardefine:potl_old|{{#switch:{{#var:potl_old}}|yes|y=y|#default=}}}}<!-- |
||
+ | -->{{#vardefine:potl_mbl|{{#switch:{{#var:potl_mbl}}|yes|y=y|#default=}}}}<!-- |
||
+ | -->{{#vardefine:potl_3ds|{{#switch:{{#var:potl_3ds}}|yes|y=y|#default=}}}}<!-- |
||
+ | // vars: number of versions |
||
+ | -->{{#vardefine:potl_n|{{#len:{{#var:potl_dsk}}{{#var:potl_cns|{{#var:potl_old}}}}{{#var:potl_mbl}}{{#var:potl_3ds}}}}}}<!-- console and old-gen count as one because they have the same text |
||
+ | -->{{#vardefine:potl_ntot|{{#var:potl_n}}}}<!-- |
||
⚫ | |||
+ | // output |
||
+ | -->{{l10n|potionlength|maintext|$duration$={{{1|{{red|{{l10n|potionlength|error|$template_link$={{tl|potionlength}}}}}}}}}}}<!-- |
||
+ | -->{{#if:{{#var:potl_dsk}}|<!-- |
||
− | {{recipes/extract|result=Frost Helmet}} |
||
+ | -->{{l10n|potionlength|dsk}}<!-- |
||
+ | -->{{#ifexpr:{{#var:potl_ntot}}>1|{{nbsp}}({{icon/desktop}})}}<!-- only display icon if this is not the only version |
||
+ | -->{{#ifexpr:{{#var:potl_n}}>1|<!-- only if this is not the last version |
||
+ | -->{{#ifexpr:{{#var:potl_ntot}}>2|{{#ifexpr:{{#var:potl_n}}>2|{{l10n|potionlength|sep1}}|{{l10n|potionlength|sep2}}}}}}<!-- enumeration, requires commas (sep1); sep2 is the separator in front of last item |
||
+ | --> {{#ifexpr:{{#var:potl_n}}=2|{{l10n|potionlength|or}}}}<!-- only one version left |
||
+ | -->}}<!-- |
||
+ | -->{{#vardefine:potl_n|{{#expr:{{#var:potl_n}}-1}}}}<!-- |
||
+ | -->}}<!-- |
||
+ | -->{{#if:{{#var:potl_cns|{{#var:potl_old}}}}|<!-- |
||
+ | -->{{l10n|potionlength|cns}}<!-- |
||
+ | -->{{#ifexpr:{{#var:potl_ntot}}>1|<!-- only display icon(s) if this is not the only version |
||
+ | -->{{nbsp}}({{#if:{{#var:potl_cns}}|{{icon/console}}}}<!-- |
||
+ | -->{{#ifeq:{{#var:potl_cns}}{{#var:potl_old}}|yy| }}<!-- |
||
+ | -->{{#if:{{#var:potl_old}}|{{icon/old-gen}}}})<!-- |
||
+ | -->}}<!-- |
||
+ | -->{{#ifexpr:{{#var:potl_n}}>1|<!-- only if this is not the last version |
||
+ | -->{{#ifexpr:{{#var:potl_ntot}}>2|{{#ifexpr:{{#var:potl_n}}>2|{{l10n|potionlength|sep1}}|{{l10n|potionlength|sep2}}}}}}<!-- enumeration, requires commas, but no comma in front of last item |
||
+ | --> {{#ifexpr:{{#var:potl_n}}=2|{{l10n|potionlength|or}}}}<!-- only one version left |
||
+ | -->}}<!-- |
||
+ | -->{{#vardefine:potl_n|{{#expr:{{#var:potl_n}}-1}}}}<!-- |
||
+ | -->}}<!-- |
||
+ | -->{{#if:{{#var:potl_mbl}}|<!-- |
||
+ | -->{{l10n|potionlength|mbl}}<!-- |
||
+ | -->{{#ifexpr:{{#var:potl_ntot}}>1|{{nbsp}}({{icon/mobile}})}}<!-- only display icon if this is not the only version |
||
+ | -->{{#ifexpr:{{#var:potl_n}}>1|<!-- only if this is not the last version |
||
+ | -->{{#ifexpr:{{#var:potl_ntot}}>2|{{#ifexpr:{{#var:potl_n}}>2|{{l10n|potionlength|sep1}}|{{l10n|potionlength|sep2}}}}}}<!-- enumeration, requires commas, but no comma in front of last item |
||
+ | --> {{#ifexpr:{{#var:potl_n}}=2|{{l10n|potionlength|or}}}}<!-- only one version left |
||
+ | -->}}<!-- |
||
+ | -->{{#vardefine:potl_n|{{#expr:{{#var:potl_n}}-1}}}}<!-- |
||
+ | -->}}<!-- |
||
+ | -->{{#if:{{#var:potl_3ds}}|<!-- |
||
− | {{recipes/test|result=Frost Helmet}} |
||
+ | -->{{l10n|potionlength|3ds}}<!-- |
||
+ | -->{{#ifexpr:{{#var:potl_ntot}}>1|{{nbsp}}({{icon/3ds}})}}<!-- only display icon if this is not the only version |
||
+ | -->}}<!-- |
||
+ | -->.<!-- |
||
+ | --><noinclude>{{i18n-ready}}{{doc}}</noinclude> |
||
− | {{recipes/extract|result=Bee Headgear/Bee Breastplate/Bee Greaves/Sweetheart Necklace|sep= '''und''' |nostation=y}} |
||
− | |||
− | |||
− | |||
− | {{recipes/test|result=Bee Headgear}} |
||
− | |||
− | |||
− | |||
− | {{recipes/test|result=Bee Headgear/Bee Breastplate/Bee Greaves/Sweetheart Necklace}} |
||
− | |||
− | |||
− | |||
− | {{recipes/extract|result=Campfire}} |
||
− | |||
− | |||
− | {{recipes/test|result=Campfire}} |
||
− | |||
− | |||
− | |||
− | {{recipes/test|result=Campfire/Hero's Hat}} |
Version vom 18. Juni 2021, 22:34 Uhr
Dieser Effekt dauert [Dauer fehlt! Siehe {{potionlength}}] an, kann aber vorzeitig beendet werden, indem ein Rechtsklick auf das Symbol ausgeführt wird (), das Symbol ausgewählt und im Ausrüstungsmenü abgebrochen wird ( ), auf das Symbol doppelt getippt wird () oder der Statuseffekt im Statuseffektmenü abgebrochen wird ().
Dokumentation Die folgende Dokumentation stammt von der Seite Vorlage:Buffduration/Dokumentation. (bearbeiten | Versionsgeschichte)
Siehe auch die englische Vorlagenseite: Template:Buffduration. Sie enthält möglicherweise umfassendere oder aktuellere Informationen.
Diese Seite ist nicht oder unvollständig übersetzt. | |
Hilf mit, indem du den Text übersetzt und anschließend diesen Hinweis entfernst. Dies entfernt diese Seite auch aus der Liste von Seiten mit unzureichender Übersetzung. |
Use as a shortcut when adding in the buff times in the main paragraph of a buff item.
Verwendung
{{ potionlength |<buff duration> |eversions = no/<page name> (optional) }}
- Unnamed parameter 1
- Duration of the buff.
- eversions
- By default, the template will hide information about how to cancel a buff on certain platforms based on the platforms the buff is available on (utilizing {{eversions}} with the name of the page the template is used on). Set this parameter to
to suppress this behavior and make it display information for all versions. Set it to any page's name to cause the template to take that entity as an {{eversions}} base.no
- Exclusivity can be manually overridden with the version parameters described on Template:Exclusive.