Mercurial > pyntnclick
comparison gamelib/scenes/cryo.py @ 242:12c4f87ea424
Unify doors a bit
author | Neil Muller <neil@dip.sun.ac.za> |
---|---|
date | Fri, 27 Aug 2010 11:32:49 +0200 |
parents | ca490aecbe0e |
children | 0bad554d0926 |
comparison
equal
deleted
inserted
replaced
241:b1451b0b906f | 242:12c4f87ea424 |
---|---|
8 from gamelib.cursor import CursorSprite | 8 from gamelib.cursor import CursorSprite |
9 from gamelib.state import Scene, Item, CloneableItem, Thing, Result, \ | 9 from gamelib.state import Scene, Item, CloneableItem, Thing, Result, \ |
10 InteractImage, InteractNoImage, InteractRectUnion, \ | 10 InteractImage, InteractNoImage, InteractRectUnion, \ |
11 InteractAnimated | 11 InteractAnimated |
12 from gamelib.statehelpers import GenericDescThing | 12 from gamelib.statehelpers import GenericDescThing |
13 from gamelib.scenes.scene_widgets import Door | |
13 from gamelib.constants import DEBUG | 14 from gamelib.constants import DEBUG |
14 from gamelib.scenes.game_constants import PLAYER_ID | 15 from gamelib.scenes.game_constants import PLAYER_ID |
15 | 16 |
16 | 17 |
17 class Cryo(Scene): | 18 class Cryo(Scene): |
266 "Hitting the cryo unit with the femur doesn't achieve anything", | 267 "Hitting the cryo unit with the femur doesn't achieve anything", |
267 "You hit the chamber with the femur. Nothing happens.", | 268 "You hit the chamber with the femur. Nothing happens.", |
268 ]), soundfile="clang2.ogg") | 269 ]), soundfile="clang2.ogg") |
269 | 270 |
270 | 271 |
271 class CryoRoomDoor(Thing): | 272 class CryoRoomDoor(Door): |
272 "Door to the cryo room." | 273 "Door to the cryo room." |
273 | 274 |
274 NAME = "cryo.door" | 275 NAME = "cryo.door" |
275 | 276 |
276 INTERACTS = { | 277 INTERACTS = { |
310 "Sadly, this isn't that sort of game.", | 311 "Sadly, this isn't that sort of game.", |
311 "Your valiant efforts are foiled by the Evil Game Designer.", | 312 "Your valiant efforts are foiled by the Evil Game Designer.", |
312 "The door resists. Try something else, perhaps?", | 313 "The door resists. Try something else, perhaps?", |
313 ])) | 314 ])) |
314 | 315 |
315 def is_interactive(self): | |
316 return True | |
317 | |
318 def half_open_door(self): | 316 def half_open_door(self): |
319 self.set_data('door', "ajar") | 317 self.set_data('door', "ajar") |
320 self.set_interact("ajar") | 318 self.set_interact("ajar") |
321 | 319 |
322 def open_door(self): | 320 def open_door(self): |