Mercurial > pyntnclick
comparison gamelib/scenes/cryo.py @ 362:4e939b3c73f8
Allow Nones in list of results
author | Neil Muller <neil@dip.sun.ac.za> |
---|---|
date | Sat, 28 Aug 2010 17:07:24 +0200 |
parents | 9d97d2e338db |
children | 2cadb47405a4 |
comparison
equal
deleted
inserted
replaced
361:9d97d2e338db | 362:4e939b3c73f8 |
---|---|
163 self.set_data('fixed', False) | 163 self.set_data('fixed', False) |
164 pipe = TubeFragment('tube_fragment') | 164 pipe = TubeFragment('tube_fragment') |
165 self.state.add_item(pipe) | 165 self.state.add_item(pipe) |
166 self.state.add_inventory_item(pipe.name) | 166 self.state.add_inventory_item(pipe.name) |
167 self.set_interact("chopped") | 167 self.set_interact("chopped") |
168 result = Result("It takes more effort than one would expect, but " | 168 return (Result("It takes more effort than one would expect, but " |
169 "eventually the pipe is separated from the wall.") | 169 "eventually the pipe is separated from the wall."), |
170 ai_result = make_jim_dialog("Prisoner %s. Vandalism is an offence " | 170 make_jim_dialog("Prisoner %s. Vandalism is an offence " |
171 "punishable by a minimum of an additional 6 months " | 171 "punishable by a minimum of an additional 6 months " |
172 "to your sentence" % PLAYER_ID, self.state) | 172 "to your sentence" % PLAYER_ID, self.state)) |
173 if ai_result: | |
174 return result, ai_result | |
175 return result | |
176 | |
177 | 173 |
178 def is_interactive(self): | 174 def is_interactive(self): |
179 return self.get_data('fixed') | 175 return self.get_data('fixed') |
180 | 176 |
181 def interact_without(self): | 177 def interact_without(self): |