Модуль:ArmorStats: различия между версиями

Нет описания правки
Нет описания правки
Строка 7: Строка 7:
     local itemId = frame.args.itemId or ""  -- ID предмета
     local itemId = frame.args.itemId or ""  -- ID предмета
      
      
     local protection1 = frame.args.protection1 or "-" -- Ударный
     local protBlunt = frame.args.protBlunt or "-" -- Ударный
     local protection2 = frame.args.protection2 or "-" -- Режущий
     local protSlash = frame.args.protSlash or "-" -- Режущий
     local protection3 = frame.args.protection3 or "-" -- Колющий
     local protPiercing = frame.args.protPiercing or "-" -- Колющий
     local protection4 = frame.args.protection4 or "-" -- Высокотемпературный
     local protHead = frame.args.protHead or "-" -- Высокотемпературный
     local protection5 = frame.args.protection5 or "-" -- Кислотный
     local protRadiation = frame.args.protRadiation or "-" -- Кислотный
     local protection6 = frame.args.protection6 or "-" -- Радиационный
     local protCaustic = frame.args.protCaustic or "-" -- Радиационный
     local protection7 = frame.args.protection7 or "-" -- Взрывной
     local protExplosion = frame.args.protExplosion or "-" -- Взрывной
      
      
     local description = frame.args.description or "" -- Описание
     local description = frame.args.description or "" -- Описание
     local location = frame.args.location or "" -- Местонахождение
     local location = frame.args.location or "" -- Местонахождение
    local backgroundColor = frame.args.backgroundColor or "" -- Цвет фона для всех ячеек, кроме первой


     -- Вызов функции из модуля Entity Lookup для создания image tooltip
     -- Вызов функции из модуля Entity Lookup для создания image tooltip
Строка 32: Строка 33:
     out = out .. imageTooltip
     out = out .. imageTooltip
     out = out .. '<br>' .. itemName .. '\n'
     out = out .. '<br>' .. itemName .. '\n'
     out = out .. '|style="font-weight:500;color: crimson"|' .. protection1 .. '\n'
     out = out .. '|style="font-weight:500;color: crimson;background-color: ' .. backgroundColor .. '"|' .. protBlunt .. '\n'
     out = out .. '|style="font-weight:500;color: indianred"|' .. protection2 .. '\n'
     out = out .. '|style="font-weight:500;color: indianred;background-color: ' .. backgroundColor .. '"|' .. protSlash .. '\n'
     out = out .. '|style="font-weight:500;color: darksalmon"|' .. protection3 .. '\n'
     out = out .. '|style="font-weight:500;color: darksalmon;background-color: ' .. backgroundColor .. '"|' .. protPiercing .. '\n'
     out = out .. '|style="font-weight:500;color: orange"|' .. protection4 .. '\n'
     out = out .. '|style="font-weight:500;color: orange;background-color: ' .. backgroundColor .. '"|' .. protHead .. '\n'
     out = out .. '|style="font-weight:500;color: plum"|' .. protection5 .. '\n'
     out = out .. '|style="font-weight:500;color: plum;background-color: ' .. backgroundColor .. '"|' .. protRadiation .. '\n'
     out = out .. '|style="font-weight:500;color: limegreen"|' .. protection6 .. '\n'
     out = out .. '|style="font-weight:500;color: limegreen;background-color: ' .. backgroundColor .. '"|' .. protCaustic .. '\n'
     out = out .. '|style="font-weight:500;color: tan"|' .. protection7 .. '\n'
     out = out .. '|style="font-weight:500;color: tan;background-color: ' .. backgroundColor .. '"|' .. protExplosion .. '\n'
     out = out .. '|\n' .. description .. '\n\n|\n' .. location .. '\n|-\n'
     out = out .. '|style="background-color: ' .. backgroundColor .. '"|\n' .. description .. '\n'
    out = out .. '|style="background-color: ' .. backgroundColor .. '"|\n' .. location .. '\n|-'


     return out
     return out