Mercurial > sypikslang
diff gamelib/game_base.py @ 145:53277724645b
Science button juggling.
author | Jeremy Thurgood <firxen@gmail.com> |
---|---|
date | Fri, 11 May 2012 14:58:00 +0200 |
parents | 245ef50de84d |
children |
line wrap: on
line diff
--- a/gamelib/game_base.py Fri May 11 10:15:40 2012 +0200 +++ b/gamelib/game_base.py Fri May 11 14:58:00 2012 +0200 @@ -39,10 +39,16 @@ PREREQUISITES = () ACQUISITION_CHANCE = 1.0 SCIENCE_TYPE = None + IMAGE_NAME = None def __init__(self, points=0): self.points = points + def get_image_name(self): + if self.IMAGE_NAME is not None: + return self.IMAGE_NAME + return type(self).__name__.lower() + def spend_point(self): self.points += 1