# HG changeset patch # User Neil Muller # Date 1283026399 -7200 # Node ID 72baf5bfebc6242a9eb0b7719ef30b77814896d7 # Parent 308a433c47132761d33355fa4195db678449da90 Support for partial fixed state (pending artwork) diff -r 308a433c4713 -r 72baf5bfebc6 Resources/images/bridge/comp_alert_life_support_partial.png Binary file Resources/images/bridge/comp_alert_life_support_partial.png has changed diff -r 308a433c4713 -r 72baf5bfebc6 Resources/images/mess/replaced_tubes.png Binary file Resources/images/mess/replaced_tubes.png has changed diff -r 308a433c4713 -r 72baf5bfebc6 gamelib/scenes/bridge.py --- a/gamelib/scenes/bridge.py Sat Aug 28 22:05:50 2010 +0200 +++ b/gamelib/scenes/bridge.py Sat Aug 28 22:13:19 2010 +0200 @@ -503,6 +503,7 @@ 'ai offline' : 'comp_alert_ai_offline.png', 'engine offline' : 'comp_alert_engine_offline.png', 'life support' : 'comp_alert_life_support.png', + 'life support partial' : 'comp_alert_life_support_partial.png', } # Point to start drawing changeable alerts @@ -580,7 +581,7 @@ def _get_nav_page(self): if not self.state.scenes['engine'].get_data('engine online'): return self._nav_messages['engine offline'] - elif not self.state.scenes['mess'].get_data('life support online'): + elif not self.state.scenes['mess'].get_data('life support status') == 'fixed': return self._nav_messages['life support'] else: for thing in self._nav_lines: @@ -599,10 +600,12 @@ if not self.state.scenes['engine'].get_data('engine online'): surface.blit(self._alert_messages['engine offline'], (xpos, ypos)) ypos += self._alert_messages['engine offline'].get_size()[1] + self.ALERT_SPACING - if not self.state.scenes['mess'].get_data('life support online'): + if self.state.scenes['mess'].get_data('life support status') == 'broken': surface.blit(self._alert_messages['life support'], (xpos, ypos)) ypos += self._alert_messages['life support'].get_size()[1] + self.ALERT_SPACING - + if self.state.scenes['mess'].get_data('life support status') == 'replaced': + surface.blit(self._alert_messages['life support partial'], (xpos, ypos)) + ypos += self._alert_messages['life support partial'].get_size()[1] + self.ALERT_SPACING def draw_things(self, surface): if self.get_data('tab') == 'alert': diff -r 308a433c4713 -r 72baf5bfebc6 gamelib/scenes/mess.py --- a/gamelib/scenes/mess.py Sat Aug 28 22:05:50 2010 +0200 +++ b/gamelib/scenes/mess.py Sat Aug 28 22:13:19 2010 +0200 @@ -17,7 +17,7 @@ INITIAL_DATA = { 'accessible': True, - 'life support online': False, + 'life support status': 'broken', # broken, replaced, fixed } def __init__(self, state): @@ -147,6 +147,7 @@ INTERACTS = { "blocked": InteractImage(250, 130, "blocking_broccoli.png"), "broken": InteractImage(250, 183, "broken_tubes.png"), + "replaced": InteractImage(250, 183, "fixed_tubes.png"), "fixed": InteractImage(252, 183, "fixed_tubes.png"), } @@ -189,7 +190,8 @@ else: self.state.remove_inventory_item(item.name) self.set_data('status', 'replaced') - # TODO: An interact image for fixed but untaped pipes + self.set_interact("replaced") + self.scene.set_data('life support status', 'replaced') return Result( "The pipes slot neatly into place, but don't make an airtight seal." ) @@ -203,7 +205,7 @@ self.set_data("fixed", True) self.set_data("status", "fixed") self.set_interact("fixed") - self.scene.set_data('life support online', True) + self.scene.set_data('life support status', 'fixed') # TODO: A less anticlimactic climax? return Result("It takes quite a lot of tape, but eventually everything is" " airtight and ready to hold pressure. Who'd've thought duct" diff -r 308a433c4713 -r 72baf5bfebc6 sources/art/bridge_alert_base.xcf Binary file sources/art/bridge_alert_base.xcf has changed