Mercurial > sypikslang
diff gamelib/gamestate.py @ 178:52cc28b429b7
Debugging
author | Neil Muller <drnlmuller@gmail.com> |
---|---|
date | Sat, 12 May 2012 11:42:43 +0200 |
parents | 4bbd4a1879f8 |
children | ed25c335fd67 |
line wrap: on
line diff
--- a/gamelib/gamestate.py Sat May 12 11:23:22 2012 +0200 +++ b/gamelib/gamestate.py Sat May 12 11:42:43 2012 +0200 @@ -94,14 +94,16 @@ self.points -= len(self.cur_allocation) if self.points < 0: raise RuntimeError('Spent too many points') - new_stuff = self.lab.spend_points(self.cur_allocation, self.points) - self.points = 0 - self.minions = 0 # Process mission results messages = [] for result in mission_results: result.apply(self) messages.append((result.outcome, result.text, result.loot)) + # Missions may give us science breakthroughs, so handle this after + # mission results + new_stuff = self.lab.spend_points(self.cur_allocation, self.points) + self.points = 0 + self.minions = 0 for science in new_stuff: # FIXME: Update UI better. messages.append((INFO, "SCIENCE breakthrough!", {