Changeset 370:b5a0081f5784


Ignore:
Timestamp:
09/06/13 19:37:00 (8 years ago)
Author:
Stefano Rivera <stefano@…>
Branch:
default
Phase:
public
Rebase:
63643036336438303461346130333330303466393034353338333938323762653338626337396638
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.