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

Материал из МК14 | Space Station 14 Wiki
Нет описания правки
Нет описания правки
Строка 1: Строка 1:
return { test = function()
return { test = function()
local ok, result = pcall(function()
local ok, result = pcall(function()
local t = mw.title.new("MediaWiki:Tooltip.css"); if t then return tostring(t.exists) .. " " .. tostring(t.contentModel) end return "nil"
local ok, r = pcall(function() local groups = {}; for i, g in ipairs(mw.site.userGroups or {}) do groups[#groups+1] = g end; return table.concat(groups, ",") end); return tostring(r)
end)
end)
if ok then return tostring(result) else return 'ERR: ' .. tostring(result) end
if ok then return tostring(result) else return 'ERR: ' .. tostring(result) end
end, }
end, }

Версия от 12:34, 22 июня 2026

Для документации этого модуля может быть создана страница Модуль:TableOfChemicals/doc

return { test = function()
local ok, result = pcall(function()
local ok, r = pcall(function() local groups = {}; for i, g in ipairs(mw.site.userGroups or {}) do groups[#groups+1] = g end; return table.concat(groups, ",") end); return tostring(r)
end)
if ok then return tostring(result) else return 'ERR: ' .. tostring(result) end
end, }