Модуль:Prototypes/Хранилище/Предмет: различия между версиями
Pok (обсуждение | вклад) Нет описания правки |
Pok (обсуждение | вклад) мНет описания правки |
||
| Строка 101: | Строка 101: | ||
end | end | ||
-- Основная функция модуля | -- Основная функция модуля | ||
function p.main(frame) | function p.main(frame) | ||
| Строка 112: | Строка 111: | ||
if not data then return 'Не удалось загрузить данные.' end | if not data then return 'Не удалось загрузить данные.' end | ||
-- | -- Проверка на framing | ||
if mode == 'framing' then | if mode == 'framing' then | ||
local subMode = frame.args[2] | local subMode = frame.args[3] | ||
id = frame.args[2] | |||
if subMode == 'chem' then | if subMode == 'chem' then | ||
return mw.getCurrentFrame():preprocess('{{СollapsibleMenu|' .. getChemOutput(data, id) .. '}}') | return mw.getCurrentFrame():preprocess('{{СollapsibleMenu|' .. getChemOutput(data, id) .. '}}') | ||
| Строка 124: | Строка 125: | ||
end | end | ||
-- При | -- При обычном режиме, без framing | ||
if mode == 'chem' then | if mode == 'chem' then | ||
return getChemOutput(data, id) | return getChemOutput(data, id) | ||