Шаблон:Base ingredients table — различия между версиями
Материал из Guild Wars 2 wiki
Blood (обсуждение | вклад) (Новая страница: «<onlyinclude>{| {{STDT|sortable right tpwrapper}} data-info="buys" data-useval="true" |+ {{{quantity|1}}} [[{{{item}}}]] ! Quantity ! Material ! style="width:135p…») |
|||
Строка 1: | Строка 1: | ||
− | <onlyinclude>{| {{ | + | <onlyinclude>{{#if: {{{item|}}} |
− | | | + | | {{#vardefine:output qty|{{#expr: ceil({{{quantity|1}}} / {{#vardefineecho:min output|{{#ask: [[Can be queried for base ingredients::Y]] [[Has item data object::{{{item|}}}]] | ?Has output quantity | searchlabel = | limit = 1 | headers = hide | mainlabel = - | default = 1}}}}) * {{#var:min output}} }}}} |
+ | }}<!-- | ||
+ | |||
+ | --><div style="display:inline-block;"><div class="tpwrapper inlineprices" data-info="{{{info|buys}}}" style="width:100%; font-size:12px; font-weight:bold; text-align:center;"><!-- | ||
+ | -->{{#if: {{{item|}}} | ||
+ | | <span {{#ifeq: {{#var:min output|1}} | {{{quantity|1}}} || style="border-bottom:1px silver dotted;" title="Minimum quantity of {{#var:min output|1}} due to recipe selection." }}>{{#var:output qty}}</span> [[{{{item}}}]] <span class="tptotal hide" data-id="{{#show:{{{item}}}|?Has game id#|limit=1}}" data-qty="{{#var:output qty|1}}"></span><div style="display:inline-block;" class="tpgrandtotal"></div> | ||
+ | | {{{quantity|1}}} [[{{{item}}}]] | ||
+ | }}</div><!-- | ||
+ | |||
+ | --> | ||
+ | {| {{STDT|sortable right tpwrapper}} style="margin-top:5px;" data-info="{{{info|buys}}}" data-useval="true" | ||
+ | |+ | ||
! Quantity | ! Quantity | ||
! Material | ! Material | ||
Строка 10: | Строка 21: | ||
! class="tpgrandtotal" style="text-align:right;" | ... | ! class="tpgrandtotal" style="text-align:right;" | ... | ||
|} | |} | ||
+ | </div> | ||
{{#Widget:TP prices total}}</onlyinclude> | {{#Widget:TP prices total}}</onlyinclude> | ||
Текущая версия на 12:47, 4 апреля 2018
1 [[{{{item}}}]]
Quantity | Material | Buy price | Material cost |
---|---|---|---|
The page type input value "{{{1}}}" contains invalid characters or is incomplete and therefore can cause unexpected results during a query or annotation process. ]]
|
[[{{{1}}}|{{{1}}}... | ... | |
Total cost | ... |
{{#Widget:TP prices total}}
Usage[править]
Generates a list of items from #var:base_ingredient_list generated by a call to {{base ingredients lookup}}. The vendor price of the item is queried and the total cost for the quantity of the item is calculated. A running total is then calculated at the bottom, handled by Widget:TP prices total. Uses {{base ingredients table row}} to format the the row.
{{base ingredients table | item = <item> | quantity = <quantity> | {{#var:base_ingredient_list}} }}
Parameters[править]
- Unnamed parameter 1
- Requires the value of #var:base_ingredient_list generated by a call to {{base ingredients lookup}}. The format is ~<item1>~<item2>...~<item3> if you wish to pass an arbitrary list of items. You will need to set the corresponding quantity, see {{base ingredients lookup}} for the process.
- item
- Required. The item to look up.
- quantity
- Optional. The quantity of the item to create. Default 1.
Example[править]
{{base ingredients lookup|Iron Ingot|1}} {{base ingredients table |item=Iron Ingot |quantity=1 |{{#var:base_ingredient_list}} }}
<span style="border-bottom:1px silver dotted;" title="Minimum quantity of 40
«Y» — не булево значение (да/нет).
due to recipe selection.">Ошибка выражения: неопознанное слово «span»</span> Iron Ingot <span class="tptotal hide" data-id="" data-qty="Ошибка выражения: неопознанное слово «span»"></span>Quantity | Material | Buy price | Material cost |
---|---|---|---|
1 | Iron Ingot | ... | ... |
Total cost | ... |
{{#Widget:TP prices total}}