Модуль:FirearmsStats: различия между версиями
Pok (обсуждение | вклад) мНет описания правки |
Нет описания правки |
||
| (не показано 9 промежуточных версий 2 участников) | |||
| Строка 23: | Строка 23: | ||
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 заданы вручную, используем их, иначе рассчитываем по формуле | ||
| Строка 32: | Строка 33: | ||
-- Название | -- Название | ||
out = out .. '!' .. frame:preprocess('{{Anchor|' .. anchorName .. '}}{{ | out = out .. '!' .. frame:preprocess('{{Anchor|' .. anchorName .. '}}{{предмет|' .. itemId ..'|imageTooltip=1|vertical=1|size=64px}}\n') | ||
-- Урон (выводятся только непустые значения) | -- Урон (выводятся только непустые значения) | ||
out = out .. '|data-sort-value=' .. dataSort .. '|\n' | out = out .. '|data-sort-value=' .. dataSort .. '|\n' | ||
| Строка 42: | Строка 42: | ||
end | end | ||
if stamina > 0 then | if stamina > 0 then | ||
out = out .. ': | out = out .. frame:preprocess(':{{цвет|text|endurance|c=<b>' .. stamina .. '</b>}} Выносливость<br>\n') | ||
end | end | ||
if blunt > 0 then | if blunt > 0 then | ||
out = out .. ': | out = out .. frame:preprocess(':{{цвет|text|blunt|c=<b>' .. blunt .. '</b>}} Ушибы<br>\n') | ||
end | end | ||
if slash > 0 then | if slash > 0 then | ||
out = out .. ': | out = out .. frame:preprocess(':{{цвет|text|slash|c=<b>' .. slash .. '</b>}} Режущие<br>\n') | ||
end | end | ||
if piercing > 0 then | if piercing > 0 then | ||
out = out .. ': | out = out .. frame:preprocess(':{{цвет|text|piercing|c=<b>' .. piercing .. '</b>}} Уколы<br>\n') | ||
end | end | ||
if heat > 0 then | if heat > 0 then | ||
out = out .. ': | out = out .. frame:preprocess(':{{цвет|text|heat|c=<b>' .. heat .. '</b>}} Термические<br>\n') | ||
end | end | ||
if radiation > 0 then | if radiation > 0 then | ||
out = out .. ': | out = out .. frame:preprocess(':{{цвет|text|radiation|c=<b>' .. radiation .. '</b>}} Радиация<br>\n') | ||
end | end | ||
if caustic > 0 then | if caustic > 0 then | ||
out = out .. ': | out = out .. frame:preprocess(':{{цвет|text|caustic|c=<b>' .. caustic .. '</b>}} Кислотные<br>\n') | ||
end | end | ||
if structural > 0 then | if structural > 0 then | ||
out = out .. ': | out = out .. frame:preprocess(':{{цвет|text|structural|c=<b>' .. structural .. '</b>}} Структурные<br>\n') | ||
end | end | ||
| Строка 73: | Строка 73: | ||
out = out .. '|style="color:#77c1d9"|<b>' .. caliber .. '</b>\n' | out = out .. '|style="color:#77c1d9"|<b>' .. caliber .. '</b>\n' | ||
end | end | ||
-- Описание | -- Описание | ||
| Строка 79: | Строка 78: | ||
-- Местоположение | -- Местоположение | ||
out = out .. '|\n' | |||
if location ~= "" then | if location ~= "" then | ||
out = out | out = out .. frame:preprocess('{{SlideMenu|overlay|color=#e1f6ff|title=Список [[File:Examine.svg.192dpi.png|24x24px]]|content=<p></p>\n' .. location .. '}}\n') | ||
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 | ||