Модуль:Песочница/Pok: различия между версиями

мНет описания правки
мНет описания правки
Строка 81: Строка 81:
local backgroundColor = frame.args.backgroundColor or "" -- Цвет фона первой ячейки
local backgroundColor = frame.args.backgroundColor or "" -- Цвет фона первой ячейки
local class = frame.args.class or "" -- Класс
local class = frame.args.class or "" -- Класс
-- Проверка класса на "spacesuit-helmet"
if class == "spacesuit-helmet" then
location = frame:preprocess("{{FrameText|color = #bcceff|border-color = #4c4c61|content = Находится в скафандре}}")
end


-- Формирование строк для ячеек таблицы
-- Формирование строк для ячеек таблицы
Строка 105: Строка 100:
out = out .. '|class="' .. class .. '" style=""|\n'
out = out .. '|class="' .. class .. '" style=""|\n'


-- Проверка класса на "spacesuit-helmet"
if class == "spacesuit-helmet" then
out = out .. frame:preprocess("{{FrameText|color = #bcceff|border-color = #4c4c61|content = Находится в скафандре}}")
-- Местоположение
-- Местоположение
if location ~= "" then
elseif location ~= "" then
out = out .. 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')
end
end
Строка 113: Строка 112:
if created ~= "" then
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')
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
elseif location == "" and class ~= "spacesuit-helmet" then
out = out .. frame:preprocess('{{FrameText|color=#82d1c4|content=Нет гарантированных мест спавна}}\n')
out = out .. frame:preprocess('{{FrameText|color=#82d1c4|content=Нет гарантированных мест спавна}}\n')
end
end