Модуль:Prototypes/Хранилище/Предмет: различия между версиями

Нет описания правки
мНет описания правки
Строка 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
     -- Проверка на 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)