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

Новая страница: «local p = {} -- Функция для создания таблицы с заданными параметрами function p.templateCells(frame) local anchorName = frame.args.anchorName or "" -- Название якоря local itemId = frame.args.itemId or "" -- ID предмета local damage = frame.args.damage or "" -- Ввод в ячейк урона local stamina = tonumber(frame.args.stamina) or 0 -- Выносливость local blunt...»
 
мНет описания правки
 
(не показаны 3 промежуточные версии этого же участника)
Строка 9: Строка 9:
local stamina = tonumber(frame.args.stamina) or 0 -- Выносливость
local stamina = tonumber(frame.args.stamina) or 0 -- Выносливость
local blunt = tonumber(frame.args.blunt) or 0 -- Ушибы
local blunt = tonumber(frame.args.blunt) or 0 -- Ушибы
local slash = tonumber(frame.args.slash) or 0 -- Режущие
local slash = tonumber(frame.args.slash) or 0 -- Порезы
local piercing = tonumber(frame.args.piercing) or 0 -- Уколы  
local piercing = tonumber(frame.args.piercing) or 0 -- Уколы  
local heat = tonumber(frame.args.heat) or 0 -- Термические
local heat = tonumber(frame.args.heat) or 0 -- Термические
Строка 20: Строка 20:
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 created = frame.args.created or "" -- Создаётя


-- Если dps и dataSort заданы вручную, используем их, иначе рассчитываем по формуле
-- Если dps и dataSort заданы вручную, используем их, иначе рассчитываем по формуле
local dps = frame.args.dps or fireRate * (blunt + piercing + heat + radiation) -- Значения DPS
local dps = frame.args.dps or fireRate * (blunt + slash + piercing + heat + radiation + caustic) -- Значения DPS
local dataSort = tonumber(frame.args.dataSort) or (blunt + slash + piercing + heat + radiation + caustic) -- Значения data-sort-value
local dataSort = tonumber(frame.args.dataSort) or (blunt + slash + piercing + heat + radiation + caustic) -- Значения data-sort-value


Строка 45: Строка 46:
end
end
if slash > 0 then
if slash > 0 then
out = out .. ': <span style="color:indianred"><b>' .. slash .. '</b></span> Режущие\n'
out = out .. ': <span style="color:indianred"><b>' .. slash .. '</b></span> Порезы\n'
end
end
if piercing > 0 then
if piercing > 0 then
Строка 71: Строка 72:


-- Местоположение
-- Местоположение
out = out .. '|\n'
if location ~= "" then
if location ~= "" then
out = out .. '|\n' .. frame:preprocess('{{SlideMenu|overlay|color=#e1f6ff|title=Список [[File:Examine.svg.192dpi.png|24x24px]]|content=<p></p>\n' .. location .. '}}\n')
out = out .. frame:preprocess('{{SlideMenu|overlay|color=#e1f6ff|title=Список [[File:Examine.svg.192dpi.png|24x24px]]|content=<p></p>\n' .. location .. '}}\n')
else
end
out = out .. '|\n' .. frame:preprocess('{{FrameText|color=#82d1c4|content=Нет гарантированных мест спавна}}\n')
 
-- Создаётся
if created ~= "" then
out = out .. frame:preprocess('{{SlideMenu|overlay|color=#e1f6ff|border-color=#4c4c61|title=Создаётся [[File:hammer.svg.192dpi.png|24x24px]]|content=Создаётся в панели строительства<hr>\n' .. created .. '}}\n')
elseif location == "" then
out = out .. frame:preprocess('{{FrameText|color=#82d1c4|content=Нет гарантированных мест спавна}}\n')
end
end