# HG changeset patch # User Neil Muller # Date 1336661178 -7200 # Node ID 8f717b2b3378430dab5bd9bd3a8630f9a1d1883e # Parent be79e113d4943afccad0540eef23ccad847f841b Advance milestone diff -r be79e113d494 -r 8f717b2b3378 gamelib/gamestate.py --- 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':