comparison gamelib/scenes/cryo.py @ 247:0bad554d0926

More tests, some cryo room fixes and docs in the build.
author Jeremy Thurgood <firxen@gmail.com>
date Fri, 27 Aug 2010 13:32:27 +0200
parents 12c4f87ea424
children dfc89bc64fdb
comparison
equal deleted inserted replaced
246:b6cfaad7deee 247:0bad554d0926
162 INITIAL_DATA = { 162 INITIAL_DATA = {
163 'fixed': True, 163 'fixed': True,
164 } 164 }
165 165
166 def interact_with_machete(self, item): 166 def interact_with_machete(self, item):
167 self.set_data('fixed', False) 167 if self.get_data('fixed'):
168 pipe = CryoPipe('cryopipe') 168 self.set_data('fixed', False)
169 self.state.add_item(pipe) 169 pipe = CryoPipe('cryo_pipe')
170 self.state.add_inventory_item(pipe.name) 170 self.state.add_item(pipe)
171 self.set_interact("chopped") 171 self.state.add_inventory_item(pipe.name)
172 self.set_interact("chopped")
173 return Result("It takes more effort than one would expect, but "
174 "eventually the pipe is separated from the wall.")
172 175
173 def is_interactive(self): 176 def is_interactive(self):
174 return self.get_data('fixed') 177 return self.get_data('fixed')
175 178
179 def interact_without(self):
180 if self.get_data('fixed'):
181 return Result("These pipes aren't attached to the wall very solidly.")
182 return None
183
176 def get_description(self): 184 def get_description(self):
177 if self.get_data('fixed'): 185 if self.get_data('fixed'):
178 return "These pipes carry cooling fluid to the cryo units." 186 return "These pipes carry cooling fluid to the cryo units."
179 else: 187 return "There used to be a pipe carrying cooling fluid here"
180 return "There used to be a pipe carrying cooling fuild here"
181 188
182 189
183 class CryoPipe(CloneableItem): 190 class CryoPipe(CloneableItem):
184 "After emptying the full can." 191 "After emptying the full can."
185 192