Модуль:Prototypes/Механика/Стоимость: различия между версиями
Pok (обсуждение | вклад) мНет описания правки |
Pok (обсуждение | вклад) мНет описания правки |
||
| (не показаны 4 промежуточные версии этого же участника) | |||
| Строка 1: | Строка 1: | ||
-- Загрузка данных | -- Загрузка данных | ||
local priceData = mw.loadData(" | local JP = require("Module:JsonPaths") | ||
local priceData = mw.loadData( JP.get("prototypes/StaticPrice.json") ) | |||
local p = {} | local p = {} | ||
| Строка 24: | Строка 25: | ||
local output = {} | local output = {} | ||
local seen = {} | local seen = {} | ||
table.insert(output, '{| class="sortable-grid sortable"') | |||
table.insert(output, '! Сортировка (по стоимости)') | table.insert(output, '! Сортировка (по стоимости)') | ||
table.insert(output, '|-') | table.insert(output, '|-') | ||
| Строка 51: | Строка 53: | ||
end | end | ||
table.insert(output, "|}") | |||
return frame:preprocess(table.concat(output, "\n")) | return frame:preprocess(table.concat(output, "\n")) | ||
end | end | ||
return p | return p | ||