comparison gamelib/scenes/machine.py @ 333:81f5fb9f50e4

Hook up manual.
author Simon Cross <hodgestar+bzr@gmail.com>
date Sat, 28 Aug 2010 14:24:07 +0200
parents 0bb1ab329bee
children 3aee5895c2c6
comparison
equal deleted inserted replaced
332:349c5bac4bb5 333:81f5fb9f50e4
270 class ManualThing(Thing): 270 class ManualThing(Thing):
271 271
272 NAME = "machine.manual" 272 NAME = "machine.manual"
273 273
274 INTERACTS = { 274 INTERACTS = {
275 "manual": InteractNoImage(434, 496, 66, 34), # TODO: replace with manual 275 "manual": InteractImage(432, 493, "manual_on_floor.png"),
276 "empty": InteractNoImage(434, 496, 66, 34),
277 } 276 }
278 277
279 INITIAL = "manual" 278 INITIAL = "manual"
280 279
281 def interact_without(self): 280 def interact_without(self):
282 if self.current_interact is self.interacts["manual"]: 281 self.scene.remove_thing(self)
283 self.state.add_inventory_item("manual") 282 self.state.add_inventory_item("manual")
284 self.set_interact("empty") 283 return Result("Ah! The ship's instruction manual. You'd feel better"
285 return Result("Ah! The ship's instruction manual. You'd feel better" 284 " if the previous owner wasn't lying next to it with a"
286 " if the previous owner wasn't lying next to it with a" 285 " gaping hole in his rib cage.")
287 " gaping hole in his rib cage.")
288 286
289 287
290 class Manual(Item): 288 class Manual(Item):
291 "A ship instruction manual." 289 "A ship instruction manual."
292 290