Модуль:ArmorStats: различия между версиями
Pok (обсуждение | вклад) Модуль для страниц с бронёй |
Pok (обсуждение | вклад) мНет описания правки |
||
| Строка 2: | Строка 2: | ||
function p.templateCells(frame) | function p.templateCells(frame) | ||
local color = frame.args.color or "" -- Цвет фона | local color = frame.args.color or "#FFFFFF" -- Цвет фона | ||
local anchorName = frame.args.anchorName or "" -- Название якоря | local anchorName = frame.args.anchorName or "" -- Название якоря | ||
local image = frame.args.image or "" -- Путь к изображению предмета | local image = frame.args.image or "" -- Путь к изображению предмета | ||
| Строка 21: | Строка 21: | ||
-- Формирование строк для ячеек таблицы | -- Формирование строк для ячеек таблицы | ||
out = out .. ' | out = out .. '|style="background-color: ' .. color .. ';"|{{Anchor|' .. anchorName .. '}}{{#invoke:Entity Lookup|createimagetooltip|File:' .. image .. '|itemId=' .. itemId .. '|Мета=64x64px}}<br>{{#invoke:Entity Lookup|getname|' .. itemId .. '}} \n' | ||
out = out .. '|style="font-weight:500;color: crimson"|' .. protection1 .. ' %\n' | out = out .. '|style="font-weight:500;color: crimson"|' .. protection1 .. ' %\n' | ||
out = out .. '|style="font-weight:500;color: indianred"|' .. protection2 .. ' %\n' | out = out .. '|style="font-weight:500;color: indianred"|' .. protection2 .. ' %\n' | ||