Anonymous

Module:ItemsTable: Difference between revisions

From Melvor Idle
m
no edit summary
mNo edit summary
mNo edit summary
Line 9: Line 9:
function p.getItemTable(frame)
function p.getItemTable(frame)
   local itemList = {}
   local itemList = {}
   local index = tonumber(frame.args[1])
   local istart = tonumber(frame.args[1])
  local iend = istart + 50
   for i, item in Shared.skpairs(ItemData.Items) do
   for i, item in Shared.skpairs(ItemData.Items) do
     if i >= index and i < index + 50 then
     if i >= istart and i < iend then
       local itemRow = '\r\n|-'
       local itemRow = '\r\n|-'
       itemRow = itemRow..'|'..Icons.Icon({item.name, notext=true, size=50})..'|'..item.id..'|'..item.category
       itemRow = itemRow..'\r\n|'..Icons.Icon({item.name, type='item', notext=true, size=50})..'|'..item.id..'|'..item.category
       itemRow = itemRow..'|'..item.type..'|'..Icons.Icon({'Currency', notext=true, size=25})
       itemRow = itemRow..'|'..item.type..'|'..Icons.Icon({'Currency', notext=true, size=25})
       itemRow = itemRow..' '..item.sellsFor..'|'..SourceTables.getItemSources(item.name)..'|'..UseTables.getItemUses(item.name)
       itemRow = itemRow..' '..item.sellsFor..'|'..SourceTables.getItemSources(item.name)..'|'..UseTables.getItemUses(item.name)
444

edits