Mercurial > boomslang
comparison gamelib/scenes/bridge.py @ 409:72baf5bfebc6
Support for partial fixed state (pending artwork)
author | Neil Muller <neil@dip.sun.ac.za> |
---|---|
date | Sat, 28 Aug 2010 22:13:19 +0200 |
parents | df3216b369b1 |
children | 14761edcccad |
comparison
equal
deleted
inserted
replaced
408:308a433c4713 | 409:72baf5bfebc6 |
---|---|
501 ALERTS = { | 501 ALERTS = { |
502 'ai looping' : 'comp_alert_ai_looping.png', | 502 'ai looping' : 'comp_alert_ai_looping.png', |
503 'ai offline' : 'comp_alert_ai_offline.png', | 503 'ai offline' : 'comp_alert_ai_offline.png', |
504 'engine offline' : 'comp_alert_engine_offline.png', | 504 'engine offline' : 'comp_alert_engine_offline.png', |
505 'life support' : 'comp_alert_life_support.png', | 505 'life support' : 'comp_alert_life_support.png', |
506 'life support partial' : 'comp_alert_life_support_partial.png', | |
506 } | 507 } |
507 | 508 |
508 # Point to start drawing changeable alerts | 509 # Point to start drawing changeable alerts |
509 ALERT_OFFSET = (16, 140) | 510 ALERT_OFFSET = (16, 140) |
510 ALERT_SPACING = 4 | 511 ALERT_SPACING = 4 |
578 thing.scene = None | 579 thing.scene = None |
579 | 580 |
580 def _get_nav_page(self): | 581 def _get_nav_page(self): |
581 if not self.state.scenes['engine'].get_data('engine online'): | 582 if not self.state.scenes['engine'].get_data('engine online'): |
582 return self._nav_messages['engine offline'] | 583 return self._nav_messages['engine offline'] |
583 elif not self.state.scenes['mess'].get_data('life support online'): | 584 elif not self.state.scenes['mess'].get_data('life support status') == 'fixed': |
584 return self._nav_messages['life support'] | 585 return self._nav_messages['life support'] |
585 else: | 586 else: |
586 for thing in self._nav_lines: | 587 for thing in self._nav_lines: |
587 if thing.name not in self.things: | 588 if thing.name not in self.things: |
588 self.add_thing(thing) | 589 self.add_thing(thing) |
597 surface.blit(self._alert_messages['ai offline'], (xpos, ypos)) | 598 surface.blit(self._alert_messages['ai offline'], (xpos, ypos)) |
598 ypos += self._alert_messages['ai offline'].get_size()[1] + self.ALERT_SPACING | 599 ypos += self._alert_messages['ai offline'].get_size()[1] + self.ALERT_SPACING |
599 if not self.state.scenes['engine'].get_data('engine online'): | 600 if not self.state.scenes['engine'].get_data('engine online'): |
600 surface.blit(self._alert_messages['engine offline'], (xpos, ypos)) | 601 surface.blit(self._alert_messages['engine offline'], (xpos, ypos)) |
601 ypos += self._alert_messages['engine offline'].get_size()[1] + self.ALERT_SPACING | 602 ypos += self._alert_messages['engine offline'].get_size()[1] + self.ALERT_SPACING |
602 if not self.state.scenes['mess'].get_data('life support online'): | 603 if self.state.scenes['mess'].get_data('life support status') == 'broken': |
603 surface.blit(self._alert_messages['life support'], (xpos, ypos)) | 604 surface.blit(self._alert_messages['life support'], (xpos, ypos)) |
604 ypos += self._alert_messages['life support'].get_size()[1] + self.ALERT_SPACING | 605 ypos += self._alert_messages['life support'].get_size()[1] + self.ALERT_SPACING |
605 | 606 if self.state.scenes['mess'].get_data('life support status') == 'replaced': |
607 surface.blit(self._alert_messages['life support partial'], (xpos, ypos)) | |
608 ypos += self._alert_messages['life support partial'].get_size()[1] + self.ALERT_SPACING | |
606 | 609 |
607 def draw_things(self, surface): | 610 def draw_things(self, surface): |
608 if self.get_data('tab') == 'alert': | 611 if self.get_data('tab') == 'alert': |
609 self._draw_alerts(surface) | 612 self._draw_alerts(surface) |
610 super(BridgeCompDetail, self).draw_things(surface) | 613 super(BridgeCompDetail, self).draw_things(surface) |