Mercurial > sypikslang
diff gamelib/game_base.py @ 73:b503ccb0a86e
Only one schematic per turn, please.
author | Jeremy Thurgood <firxen@gmail.com> |
---|---|
date | Wed, 09 May 2012 00:25:58 +0200 |
parents | 52913ba12988 |
children | 74ce25ec2073 |
line wrap: on
line diff
--- a/gamelib/game_base.py Wed May 09 00:11:51 2012 +0200 +++ b/gamelib/game_base.py Wed May 09 00:25:58 2012 +0200 @@ -26,6 +26,13 @@ return True @classmethod + def depends_on(self, sciences): + for science_class, _ in self.PREREQUISITES: + if any(isinstance(science, science_class) for science in sciences): + return True + return False + + @classmethod def save_name(cls): return "%s.%s" % (cls.SCIENCE_TYPE, cls.__name__)