Модуль:Prototypes/Механика/Стоимость: различия между версиями

мНет описания правки
мНет описания правки
Строка 20: Строка 20:
     -- Если не нашли совпадение, возвращаем стандартный текст
     -- Если не нашли совпадение, возвращаем стандартный текст
     return frame:preprocess("нет")
     return frame:preprocess("нет")
end
function p.table(frame)
    local output = {}
    table.insert(output, '{| class="wikitable"')
    table.insert(output, '|-')
    table.insert(output, '! Предмет')
    table.insert(output, '! Стоимость')
    for _, item in ipairs(priceData) do
        table.insert(output, '|-')
        table.insert(output, '| ' .. item.id)
        table.insert(output, '| {{ColorPalette|Other|price|' .. item.StaticPrice.price .. '}}$')
    end
    table.insert(output, '|}')
    return table.concat(output, "\n")
end
end


return p
return p