Модуль:Prototypes/Механика/Стоимость: различия между версиями
Pok (обсуждение | вклад) мНет описания правки |
Pok (обсуждение | вклад) мНет описания правки Метка: ручная отмена |
||
| Строка 24: | Строка 24: | ||
local output = {} | local output = {} | ||
local seen = {} | local seen = {} | ||
table.insert(output, '{| class="sortable-grid sortable"') | |||
table.insert(output, '! Сортировка (по стоимости)') | |||
table.insert(output, '|-') | |||
for _, item in ipairs(priceData) do | for _, item in ipairs(priceData) do | ||
| Строка 40: | Строка 43: | ||
table.insert( | table.insert( | ||
output, | output, | ||
" | "|data-sort-value=" .. item.StaticPrice.price .. | ||
" | "|{{Cut-Layout|1=[[File:" .. item.id .. ".png|32px|link=]] " .. | ||
name .. "|2=" .. priceFormatted .. "}}" | name .. "|2=" .. priceFormatted .. "}}" | ||
) | ) | ||
table.insert(output, " | table.insert(output, "|-") | ||
end | end | ||
end | end | ||
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 | ||