444
edits
Inconvenient (talk | contribs) No edit summary |
Inconvenient (talk | contribs) No edit summary |
||
Line 10: | Line 10: | ||
local SourceTables = require('Module:Items/SourceTables') | local SourceTables = require('Module:Items/SourceTables') | ||
local UseTables = require('Module:Items/UseTables') | local UseTables = require('Module:Items/UseTables') | ||
local itemCount = Shared.tableCount(ItemData.Items) | |||
function p.getInvokes(frame) | function p.getInvokes(frame) | ||
Line 26: | Line 28: | ||
local itemList = {} | local itemList = {} | ||
local i = tonumber(frame.args[1]) | local i = tonumber(frame.args[1]) | ||
for i = 1, itemCount do | |||
table.insert(p._getItemsTable(i)) | |||
end | |||
return table.concat(itemList) | |||
end | |||
function p._getItemsTable(i) | |||
local itemList = {} | |||
local item = Items.getItemByID(i) | local item = Items.getItemByID(i) | ||
table.insert(itemList, '\r\n|-\r\n|') | table.insert(itemList, '\r\n|-\r\n|') | ||
Line 40: | Line 48: | ||
table.insert(itemList, Icons.GP(item.sellsFor)) | table.insert(itemList, Icons.GP(item.sellsFor)) | ||
i = i + 1 | i = i + 1 | ||
return table.concat(itemList) | |||
end | end | ||
return p | return p |
edits