Changeset 630:2707b33cbcb7


Ignore:
Timestamp:
Jun 29, 2011, 4:30:50 PM (9 years ago)
Author:
Neil Muller <drnlmuller@…>
Branch:
default
Message:

Unbreak breakable items

File:
1 edited

Legend:

Unmodified
Added
Removed
  • skaapsteker/sprites/items.py

    r622 r630  
    2121            sound.load_sound(track, track, volume)
    2222
    23     def setup_image_data(self, pos):
    24         self.image_file = self.broken_image_file if self._me.broken else self.whole_image_file
     23    def setup_image_data(self, pos, **opts):
     24        self.image_file = self.broken_image_file if opts['broken'] else self.whole_image_file
    2525        super(BreakableItem, self).setup_image_data(pos)
    2626
     
    3030            self._me.broken = True
    3131            self.broken = True
    32             self.setup_image_data(self.get_tile_pos())
     32            self.setup_image_data(self.get_tile_pos(), broken=self.broken)
    3333            if self.breaking_sound[0] is not None:
    3434                sound.play_sound(self.breaking_sound[0])
Note: See TracChangeset for help on using the changeset viewer.