Mercurial > sypikslang
diff gamelib/gamestate.py @ 130:8f717b2b3378
Advance milestone
author | Neil Muller <drnlmuller@gmail.com> |
---|---|
date | Thu, 10 May 2012 16:46:18 +0200 |
parents | 685301e35f88 |
children | 31ab0af26bb5 |
line wrap: on
line diff
--- a/gamelib/gamestate.py Thu May 10 16:39:47 2012 +0200 +++ b/gamelib/gamestate.py Thu May 10 16:46:18 2012 +0200 @@ -5,7 +5,8 @@ from gamelib import missions, lab from gamelib.game_base import get_subclasses -from gamelib.constants import NEW_SCIENCE, NEW_SCHEMATIC, M_VALS +from gamelib.constants import (NEW_SCIENCE, NEW_SCHEMATIC, M_VALS, MILESTONES, + NEW_MILESTONE) class Game(object): @@ -77,6 +78,8 @@ for result in mission_results: result.apply(self) messages.append((result.outcome, result.message)) + if result.outcome == NEW_MILESTONE: + self.milestone = MILESTONES[M_VALS[self.milestone] + 1] for science in new_stuff: # FIXME: Update UI better. if science.SCIENCE_TYPE == 'research':