Шаблон:StoreVariables
This template is a simple helper template that stores its parameter input to variables. The variable names are prefixed with
, which can be adjusted via {{options}}.
sv_
It is mainly intended to be used in cargo queries.
Usage
{{ storeVariables | <variable name 1> = <variable value 1> | <variable name 2> = <variable value 2> | ... | <variable name n> = <variable value n> }}
There is another version of the template, {{storeVariables/sum}}
, which, if it receives the name of a variable for which there is already a value, adds the existing value of the variable to the newly passed value. Note that this means that manual resetting of variables will likely be required.
Examples
Code | Result |
---|---|
{{storeVariables|damage=10|usetime=fast}} |
damage: 10, usetime: fast |
{{storeVariables/sum|crit=0.4|knockback=strong}} |
crit: 1.1, knockback: weak |
Options
Цей шаблон підтримує параметри через шаблон {{options}}. Нижче наведено всі дійсні параметри. Щодо використання та іншої інформації перегляньте {{options}}.
Дивіться Template:storeVariables/initOptions, щодо налаштування параметрів цього шаблону.
Назва | Інша назва | Значення за замовчуванням | Заміна значень[1] | Примітка |
---|---|---|---|---|
prefix | sv_ | |||
fields | (empty) | |||
fields_sep | / |
- ↑ Значення із заміною будуть збережені та завантажені як замінені значення. Інші значення без замін будуть збережені та завантажені як є.