Mercurial > sypikslang
comparison gamelib/gamestate.py @ 82:b0d97d51df51
Hook up simplistic equipment screen
author | Neil Muller <drnlmuller@gmail.com> |
---|---|
date | Wed, 09 May 2012 16:51:26 +0200 |
parents | 59afe9f92383 |
children | d93e1ea2bd0d |
comparison
equal
deleted
inserted
replaced
81:59afe9f92383 | 82:b0d97d51df51 |
---|---|
40 def get_available_equipment(self): | 40 def get_available_equipment(self): |
41 """Return a list of equipment we can produce and afford""" | 41 """Return a list of equipment we can produce and afford""" |
42 available = [x for x in self.lab.science | 42 available = [x for x in self.lab.science |
43 if x.SCIENCE_TYPE == 'schematic' and x.COST <= self.money] | 43 if x.SCIENCE_TYPE == 'schematic' and x.COST <= self.money] |
44 return available | 44 return available |
45 | |
46 def get_all_equipment(self): | |
47 """Return a list of equipment we could produce, regardless of cost""" | |
48 equipment = [x for x in self.lab.science | |
49 if x.SCIENCE_TYPE == 'schematic'] | |
50 return equipment | |
45 | 51 |
46 def get_available_missions(self): | 52 def get_available_missions(self): |
47 """Return a list of missions we can feasibly attempt""" | 53 """Return a list of missions we can feasibly attempt""" |
48 available = [x for x in self.missions if x.can_attempt(self)] | 54 available = [x for x in self.missions if x.can_attempt(self)] |
49 return available | 55 return available |