/ld26

To get this branch, use:
bzr branch http://9ix.org/bzr/ld26

« back to all changes in this revision

Viewing changes to inventory.lua

  • Committer: Josh C
  • Date: 2013-04-28 23:55:40 UTC
  • Revision ID: josh@9ix.org-20130428235540-wamoh325zjypaf06
dragon flag special case

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
Inventory = Class:extend {
2
2
   items = {},
 
3
   had = {},
3
4
   visible = true,
4
5
   add = function(self, item)
5
6
            item.invTile.y = 10
6
7
            item.invTile.x = 50 * #self.items
7
8
            self.items[item.name] = item
 
9
            the.app.view:flash({0,255,0})
8
10
         end,
 
11
   remove = function(self, name)
 
12
               self.had[name] = self.items[name]
 
13
               self.items[name] = nil
 
14
            end,
9
15
   draw = function(self)
10
16
             for _, item in pairs(self.items) do
11
17
                item.invTile:draw()