Changeset 370:b5a0081f5784 for nagslang


Ignore:
Timestamp:
Sep 6, 2013, 7:37:00 PM (7 years ago)
Author:
Stefano Rivera <stefano@…>
Branch:
default
rebase_source:
cd063d804a4a033004f90453839827be38bc79f8
Message:

Make the inventory a set

Location:
nagslang
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • nagslang/game_object.py

    r364 r370  
    485485
    486486    def _collect(self, protagonist):
    487         protagonist.inventory[self._name] = self
     487        protagonist.inventory.add(self._name)
    488488        # TODO: Make this less hacky.
    489489        self.physicser.remove_from_space()
  • nagslang/protagonist.py

    r367 r370  
    7373            self._make_physics(space, position), self._make_renderer())
    7474        self.world = world
    75         self.inventory = {}
     75        self.inventory = set()
    7676        self.health_level = PROTAGONIST_HEALTH_MAX_LEVEL
    7777
Note: See TracChangeset for help on using the changeset viewer.