Skip to content

Instantly share code, notes, and snippets.

@bucketh3ad
Created May 13, 2013 08:13
Show Gist options
  • Save bucketh3ad/5566865 to your computer and use it in GitHub Desktop.
Save bucketh3ad/5566865 to your computer and use it in GitHub Desktop.
inventory.pageList = {
weapons = 'keys',
keys = 'materials',
materials = 'consumables',
consumables = 'weapons'
} --Each key's value is the subsequent page name
inventory.pageNext = 'consumables' --Initial inventory page
inventory.pageLength = 13 --With 0 index, pages have a capacity of 14
inventory.pages = {}
for i in pairs(inventory.pageList) do --Creates a new blank table for each key in pageList
inventory.pages[i] = {}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment