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

Нет описания правки
Нет описания правки
Строка 41: Строка 41:
     -- Формирование строк для ячеек таблицы
     -- Формирование строк для ячеек таблицы
     local out = ""
     local out = ""
     out = out .. '!style="background-color: ' .. color .. ';border-top: 1px solid ' .. borderColor .. ';border-bottom: 1px solid ' .. borderColor .. ';border-left: 2px solid ' .. borderColor .. ';"|' .. anchor  
     out = out .. '!class="' .. class .. '" style="background-color: ' .. color .. ';border-top: 1px solid ' .. borderColor .. ';border-bottom: 1px solid ' .. borderColor .. ';border-left: 2px solid ' .. borderColor .. ';"|' .. anchor  
     out = out .. imageTooltip
     out = out .. imageTooltip
     out = out .. '<br>' .. itemName .. '\n'
     out = out .. '<br>' .. itemName .. '\n'
     out = out .. '|style="font-weight:bold;color: crimson;background-color: ' .. backgroundColor .. '"|' .. protBlunt .. '\n'
     out = out .. '|class="' .. class .. '" style="font-weight:bold;color: crimson;background-color: ' .. backgroundColor .. '"|' .. protBlunt .. '\n'
     out = out .. '|style="font-weight:bold;color: indianred;background-color: ' .. backgroundColor .. '"|' .. protSlash .. '\n'
     out = out .. '|class="' .. class .. '" style="font-weight:bold;color: indianred;background-color: ' .. backgroundColor .. '"|' .. protSlash .. '\n'
     out = out .. '|style="font-weight:bold;color: darksalmon;background-color: ' .. backgroundColor .. '"|' .. protPiercing .. '\n'
     out = out .. '|class="' .. class .. '" style="font-weight:bold;color: darksalmon;background-color: ' .. backgroundColor .. '"|' .. protPiercing .. '\n'
     out = out .. '|style="font-weight:bold;color: orange;background-color: ' .. backgroundColor .. '"|' .. protHeat .. '\n'
     out = out .. '|class="' .. class .. '" style="font-weight:bold;color: orange;background-color: ' .. backgroundColor .. '"|' .. protHeat .. '\n'
     out = out .. '|style="font-weight:bold;color: plum;background-color: ' .. backgroundColor .. '"|' .. protRadiation .. '\n'
     out = out .. '|class="' .. class .. '" style="font-weight:bold;color: plum;background-color: ' .. backgroundColor .. '"|' .. protRadiation .. '\n'
     out = out .. '|style="font-weight:bold;color: limegreen;background-color: ' .. backgroundColor .. '"|' .. protCaustic .. '\n'
     out = out .. '|class="' .. class .. '" style="font-weight:bold;color: limegreen;background-color: ' .. backgroundColor .. '"|' .. protCaustic .. '\n'
     out = out .. '|style="font-weight:bold;color: tan;background-color: ' .. backgroundColor .. '"|' .. protExplosion .. '\n'
     out = out .. '|class="' .. class .. '" style="font-weight:bold;color: tan;background-color: ' .. backgroundColor .. '"|' .. protExplosion .. '\n'
     out = out .. '|style="background-color: ' .. backgroundColor .. '"|\n' .. description .. '\n'
     out = out .. '|class="' .. class .. '" style="background-color: ' .. backgroundColor .. '"|\n' .. description .. '\n'
     out = out .. '|style="background-color: ' .. backgroundColor .. '"|\n' .. location .. '\n|-'
     out = out .. '|class="' .. class .. '" style="background-color: ' .. backgroundColor .. '"|\n' .. location .. '\n|-'


     -- Обертываем только первый элемент в <div>
     return out
    local wrappedOut = '<div class="' .. class .. '">' .. out:gsub("^<div class="..class..">", "") .. '</div>'
 
    return wrappedOut
end
end


return p
return p