Mercurial > pyntnclick
comparison gamelib/scenes/map.py @ 130:11afefc4aeaf
InteractText for mocking up scenes. Allow backgrounds to be None. Mock up map.
author | Simon Cross <hodgestar+bzr@gmail.com> |
---|---|
date | Tue, 24 Aug 2010 18:38:44 +0200 |
parents | 3417cf0e8795 |
children | 97c5ff0a05bb |
comparison
equal
deleted
inserted
replaced
129:4223d66d88b4 | 130:11afefc4aeaf |
---|---|
5 six months. | 5 six months. |
6 | 6 |
7 Many parts of the ship are derelict and inaccessible. | 7 Many parts of the ship are derelict and inaccessible. |
8 """ | 8 """ |
9 | 9 |
10 from gamelib.state import Scene, Item, Thing | 10 from gamelib.state import Scene, Item, Thing, InteractText |
11 | 11 |
12 | 12 |
13 class Map(Scene): | 13 class Map(Scene): |
14 | 14 |
15 FOLDER = "map" | 15 FOLDER = "map" |
17 | 17 |
18 INITIAL_DATA = { | 18 INITIAL_DATA = { |
19 'accessible': True, | 19 'accessible': True, |
20 } | 20 } |
21 | 21 |
22 def __init__(self, state): | |
23 super(Map, self).__init__(state) | |
24 self.add_thing(ToCryo()) | |
25 self.add_thing(ToBridge()) | |
26 self.add_thing(ToMess()) | |
27 self.add_thing(ToEngine()) | |
28 self.add_thing(ToMachine()) | |
29 | |
30 | |
31 class ToCryo(Thing): | |
32 "Way to cryo room." | |
33 | |
34 NAME = "map.tocryo" | |
35 | |
36 INTERACTS = { | |
37 "room": InteractText(100, 200, "To Cryo"), | |
38 } | |
39 | |
40 INITIAL = "room" | |
41 | |
42 | |
43 class ToBridge(Thing): | |
44 "Way to bridge room." | |
45 | |
46 NAME = "map.tobridge" | |
47 | |
48 INTERACTS = { | |
49 "room": InteractText(300, 200, "To Bridge"), | |
50 } | |
51 | |
52 INITIAL = "room" | |
53 | |
54 | |
55 class ToMess(Thing): | |
56 "Way to cryo room." | |
57 | |
58 NAME = "map.tomess" | |
59 | |
60 INTERACTS = { | |
61 "room": InteractText(100, 300, "To Mess"), | |
62 } | |
63 | |
64 INITIAL = "room" | |
65 | |
66 | |
67 class ToEngine(Thing): | |
68 "Way to engine room." | |
69 | |
70 NAME = "map.toengine" | |
71 | |
72 INTERACTS = { | |
73 "room": InteractText(300, 300, "To Engine"), | |
74 } | |
75 | |
76 INITIAL = "room" | |
77 | |
78 | |
79 class ToMachine(Thing): | |
80 "Way to machine room." | |
81 | |
82 NAME = "map.tomachine" | |
83 | |
84 INTERACTS = { | |
85 "room": InteractText(100, 400, "To Machine"), | |
86 } | |
87 | |
88 INITIAL = "room" | |
89 | |
22 | 90 |
23 SCENES = [Map] | 91 SCENES = [Map] |