comparison gamelib/scenes/bridge.py @ 150:5e5d71e40e54

Add bridge and mess to map and ways back.
author Simon Cross <hodgestar+bzr@gmail.com>
date Tue, 24 Aug 2010 23:32:05 +0200
parents 48d24a48d0ce
children b03debaec72d
comparison
equal deleted inserted replaced
149:7f6b11a0d404 150:5e5d71e40e54
1 """Bridge where the final showdown with the AI occurs.""" 1 """Bridge where the final showdown with the AI occurs."""
2 2
3 from gamelib.state import Scene, Item, Thing, Result 3 from gamelib.state import Scene, Item, Thing, Result, InteractText
4 4
5 5
6 class Bridge(Scene): 6 class Bridge(Scene):
7 7
8 # FOLDER = "bridge" 8 FOLDER = "bridge"
9 # BACKGROUND = None # TODO 9 BACKGROUND = None # TODO
10
11 # TODO: This is for testing.
12 FOLDER = "cryo"
13 BACKGROUND = "cryo_room.png"
14 NAME = "bridge"
15 10
16 INITIAL_DATA = { 11 INITIAL_DATA = {
17 'accessible': False, 12 'accessible': True,
18 } 13 }
14
15 def __init__(self, state):
16 super(Bridge, self).__init__(state)
17 self.add_thing(ToMap())
19 18
20 def enter(self): 19 def enter(self):
21 return Result("The bridge is in a sorry, shabby state") 20 return Result("The bridge is in a sorry, shabby state")
22 21
23 22
23 class ToMap(Thing):
24 "Way to map."
25
26 NAME = "bridge.tomap"
27 DEST = "map"
28
29 INTERACTS = {
30 "door": InteractText(100, 200, "To Map"),
31 }
32
33 INITIAL = "door"
34
35 def interact_without(self):
36 """Go to map."""
37 self.state.set_current_scene("map")
38
24 39
25 SCENES = [Bridge] 40 SCENES = [Bridge]