/ld26

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

« back to all changes in this revision

Viewing changes to main.lua

  • Committer: Josh C
  • Date: 2013-04-28 16:51:36 UTC
  • Revision ID: josh@9ix.org-20130428165136-f3eg4lscd1mdb9wo
level tweaks

Show diffs side-by-side

added added

removed removed

Lines of Context:
54
54
}
55
55
 
56
56
GameView = View:extend {
57
 
   level = 'forest1', --default level
 
57
   level = 'shore', --default level
58
58
   onNew = function (self)
59
59
              --print('loading level: '..self.level)
60
60
              for _, obj in ipairs(levels[self.level].objects()) do
61
61
                 self:add(obj)
62
62
              end
63
63
              for _, obj in ipairs(svg_objects[self.level]) do
64
 
                 self:add(obj)
 
64
                 if not the.inventory.items[obj.name] then
 
65
                    self:add(obj)
 
66
                 end
65
67
              end
66
68
 
67
69
              self:add(the.inventory)