Модуль:Mount
Для документации этого модуля может быть создана страница Модуль:Mount/doc
local p = {}
function p.Main( frame )
local powersData = mw.loadData( 'Module:Mount/Powers' )
text = powersData[frame.args[1]]
return text
end
function p.InsigniaBonus( frame )
local cargo = mw.ext.cargo
tables = 'Insignia_bonuses'
fields = '_pageName, name, slot1, slot2, slot3, description'
local args = {
--where='',
orderBy = '_pageName',
}
local result = cargo.query( tables, fields, args )
local r = result[1]
local text = {}
for k, v in ipairs(result) do
if frame.args[1] == v.slot1 and frame.args[2] == v.slot2 and frame.args[3] == v.slot3 then
text[k] = v._pageName .. ', '
elseif frame.args[1] == v.slot2 and frame.args[2] == v.slot1 and frame.args[3] == v.slot3 then
text[k] = v._pageName .. ', '
elseif frame.args[1] == v.slot1 and frame.args[2] == v.slot3 and frame.args[3] == v.slot2 then
text[k] = v._pageName .. ', '
elseif frame.args[1] == v.slot3 and frame.args[2] == v.slot1 and frame.args[3] == v.slot2 then
text[k] = v._pageName .. ', '
elseif frame.args[1] == v.slot3 and frame.args[2] == v.slot2 and frame.args[3] == v.slot1 then
text[k] = v._pageName .. ', '
elseif frame.args[1] == v.slot1 and frame.args[2] == v.slot2 and frame.args[3] == 'Универсальная ячейка' then
text[k] = v._pageName .. ', '
elseif frame.args[1] == v.slot1 and frame.args[2] == v.slot3 and frame.args[3] == 'Универсальная ячейка' then
text[k] = v._pageName .. ', '
elseif frame.args[1] == v.slot2 and frame.args[2] == v.slot1 and frame.args[3] == 'Универсальная ячейка' then
text[k] = v._pageName .. ', '
elseif frame.args[1] == v.slot2 and frame.args[2] == v.slot3 and frame.args[3] == 'Универсальная ячейка' then
text[k] = v._pageName .. ', '
elseif frame.args[1] == v.slot3 and frame.args[2] == v.slot2 and frame.args[3] == 'Универсальная ячейка' then
text[k] = v._pageName .. ', '
elseif frame.args[1] == v.slot3 and frame.args[2] == v.slot1 and frame.args[3] == 'Универсальная ячейка' then
text[k] = v._pageName .. ', '
elseif frame.args[1] == v.slot1 and frame.args[2] == 'Универсальная ячейка' and frame.args[3] == 'Универсальная ячейка' then
text[k] = v._pageName .. ', '
elseif frame.args[1] == v.slot2 and frame.args[2] == 'Универсальная ячейка' and frame.args[3] == 'Универсальная ячейка' then
text[k] = v._pageName .. ', '
elseif frame.args[1] == v.slot3 and frame.args[2] == 'Универсальная ячейка' and frame.args[3] == 'Универсальная ячейка' then
text[k] = v._pageName .. ', '
elseif frame.args[1] == 'Универсальная ячейка' and frame.args[2] == 'Универсальная ячейка' and frame.args[3] == 'Универсальная ячейка' then
text[k] = v._pageName .. ', '
else
text[k] = ''
end
end
return table.concat(text)
end
return p