Модуль:ArmorStats: различия между версиями
Pok (обсуждение | вклад) Нет описания правки |
Pok (обсуждение | вклад) Нет описания правки |
||
| Строка 2: | Строка 2: | ||
function p.templateCells(frame) | function p.templateCells(frame) | ||
local color = | local color = frame.args.color or "" -- Цвет фона | ||
local anchorName = | local anchorName = frame.args.anchorName or "" -- Название якоря | ||
local image = | local image = frame.args.image or "" -- Путь к изображению предмета | ||
local itemId = | local itemId = frame.args.itemId or "" -- ID предмета | ||
local protection1 = | local protection1 = frame.args.protection1 or "-" -- Ударный | ||
local protection2 = | local protection2 = frame.args.protection2 or "-" -- Режущий | ||
local protection3 = | local protection3 = frame.args.protection3 or "-" -- Колющий | ||
local protection4 = | local protection4 = frame.args.protection4 or "-" -- Высокотемпературный | ||
local protection5 = | local protection5 = frame.args.protection5 or "-" -- Кислотный | ||
local protection6 = | local protection6 = frame.args.protection6 or "-" -- Радиационный | ||
local protection7 = | local protection7 = frame.args.protection7 or "-" -- Взрывной | ||
local description = | local description = frame.args.description or "" -- Описание | ||
local location = | local location = frame.args.location or "" -- Местонахождение | ||
-- Вызов шаблона Anchor | -- Вызов шаблона Anchor | ||
| Строка 22: | Строка 22: | ||
-- Вызов функции из модуля Entity Lookup для создания image tooltip | -- Вызов функции из модуля Entity Lookup для создания image tooltip | ||
local imageTooltip = frame:expandTemplate{ title = 'Entity Lookup', args = { 'createimagetooltip', 'File:' .. image, itemId, 'Мета=64x64px' } } | local imageTooltip = frame:expandTemplate{ | ||
title = 'Entity Lookup', args = { 'createimagetooltip', 'File:' .. image, itemId, 'Мета=64x64px' } | |||
} | |||
-- Вызов функции из модуля Entity Lookup для получения имени элемента | -- Вызов функции из модуля Entity Lookup для получения имени элемента | ||
local itemName = frame:expandTemplate{ title = 'Entity Lookup', args = { 'getname', itemId } } | local itemName = frame:expandTemplate{ | ||
title = 'Entity Lookup', args = { 'getname', itemId } | |||
} | |||
-- Формирование строк для ячеек таблицы | -- Формирование строк для ячеек таблицы | ||