444
edits
Inconvenient (talk | contribs) No edit summary |
Inconvenient (talk | contribs) mNo edit summary |
||
Line 18: | Line 18: | ||
while i < numberOfItems do | while i < numberOfItems do | ||
result = result..'\r\n{{#invoke:ItemsTable|getItemsTable|'..i..'}}' | result = result..'\r\n{{#invoke:ItemsTable|getItemsTable|'..i..'}}' | ||
i = i + | i = i + 100 | ||
end | end | ||
result = result..'\r\n|}' | result = result..'\r\n|}' | ||
Line 25: | Line 25: | ||
function p.getItemsTable(frame) | function p.getItemsTable(frame) | ||
local allItems = ItemData.Items | |||
local itemList = {} | local itemList = {} | ||
local i = tonumber(frame.args[1]) | local i = tonumber(frame.args[1]) | ||
local iend = i + | local iend = i + 100 | ||
while i < iend do | while i < iend do | ||
local item = | local item = allItems[i] | ||
local itemRow = '\r\n|-' | if item then | ||
local itemRow = '\r\n|-' | |||
itemRow = itemRow..'\r\n|'..Icons.Icon({item.name, type='item', notext=true, size=50}) | |||
itemRow = itemRow..'||'..item.name..'||'..(i - 1)..'||'..item.category..'||'..item.type | |||
itemRow = itemRow..'||data-sort-value="'..item.sellsFor..'"|[[File:Coins.svg|20px]] '..item.sellsFor | |||
itemRow = itemRow..'||style="text-align:right;"|'..SourceTables.getItemSources(item.name) | |||
itemRow = itemRow..'||style="text-align:right;"|'..UseTables.getItemUses(item.name) | |||
table.insert(itemList, itemRow) | |||
end | |||
i = i + 1 | i = i + 1 | ||
end | end |
edits