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

мНет описания правки
мНет описания правки
Строка 122: Строка 122:
    if subMode == 'chem' then
    if subMode == 'chem' then
        local output = getChemOutput(data, id)
        return frame:preprocess('{{СollapsibleMenu|' .. getChemOutput(data, id) .. '}}')
        if not output or output == '' then
            return 'getChemOutput вернул пустой результат.'
        end
        return mw.getCurrentFrame():preprocess('{{СollapsibleMenu|' .. output .. '}}')
    elseif subMode == 'contained' then
    elseif subMode == 'contained' then
        local output = getContainedOutput(data, id, false)
        return frame:preprocess('{{СollapsibleMenu|' .. getContainedOutput(data, id, false) .. '}}')
        if not output or output == '' then
            return 'getContainedOutput вернул пустой результат.'
        end
        return mw.getCurrentFrame():preprocess('{{СollapsibleMenu|' .. output .. '}}')
    else
    else
        return 'Неизвестный подрежим для framing: ' .. subMode
        return 'Неизвестный подрежим для framing: ' .. subMode
    end
    end
end
end


     -- При нормальном режиме
     -- При нормальном режиме
     if mode == 'chem' then
     if mode == 'chem' then
         return getChemOutput(data, id)
         return frame:preprocess(getChemOutput(data, id))
     elseif mode == 'contained' then
     elseif mode == 'contained' then
         return getContainedOutput(data, id, false)
         return frame:preprocess(getContainedOutput(data, id, false))
     else
     else
         return 'Неизвестный режим: ' .. mode
         return 'Неизвестный режим: ' .. mode