Mercurial > pyntnclick
annotate gamelib/scenes/mess.py @ 145:ce419fb7ab8a
Add items to mess.
author | Simon Cross <hodgestar+bzr@gmail.com> |
---|---|
date | Tue, 24 Aug 2010 22:59:46 +0200 |
parents | d15270c2898c |
children | 1be149cc42db |
rev | line source |
---|---|
47
8f1fccb8cadf
Skeletons for scenes in plot outline.
Simon Cross <simon@simonx>
parents:
diff
changeset
|
1 """Mess where crew eat. Fun stuff.""" |
8f1fccb8cadf
Skeletons for scenes in plot outline.
Simon Cross <simon@simonx>
parents:
diff
changeset
|
2 |
143
d15270c2898c
Hook up brocolli and cans. Rotate brocolli to correct orientation.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
140
diff
changeset
|
3 from gamelib.state import Scene, Item, Thing, InteractImage, InteractNoImage |
145 | 4 from gamelib.cursor import CursorSprite |
47
8f1fccb8cadf
Skeletons for scenes in plot outline.
Simon Cross <simon@simonx>
parents:
diff
changeset
|
5 |
8f1fccb8cadf
Skeletons for scenes in plot outline.
Simon Cross <simon@simonx>
parents:
diff
changeset
|
6 |
8f1fccb8cadf
Skeletons for scenes in plot outline.
Simon Cross <simon@simonx>
parents:
diff
changeset
|
7 class Mess(Scene): |
8f1fccb8cadf
Skeletons for scenes in plot outline.
Simon Cross <simon@simonx>
parents:
diff
changeset
|
8 |
8f1fccb8cadf
Skeletons for scenes in plot outline.
Simon Cross <simon@simonx>
parents:
diff
changeset
|
9 FOLDER = "mess" |
140
95d882eeba12
Link up mess hall background.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
55
diff
changeset
|
10 BACKGROUND = "mess_hall.png" |
47
8f1fccb8cadf
Skeletons for scenes in plot outline.
Simon Cross <simon@simonx>
parents:
diff
changeset
|
11 |
8f1fccb8cadf
Skeletons for scenes in plot outline.
Simon Cross <simon@simonx>
parents:
diff
changeset
|
12 INITIAL_DATA = { |
55
2e2f6ff54780
Part of the cryo door puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
47
diff
changeset
|
13 'accessible': False, |
47
8f1fccb8cadf
Skeletons for scenes in plot outline.
Simon Cross <simon@simonx>
parents:
diff
changeset
|
14 } |
8f1fccb8cadf
Skeletons for scenes in plot outline.
Simon Cross <simon@simonx>
parents:
diff
changeset
|
15 |
143
d15270c2898c
Hook up brocolli and cans. Rotate brocolli to correct orientation.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
140
diff
changeset
|
16 def __init__(self, state): |
d15270c2898c
Hook up brocolli and cans. Rotate brocolli to correct orientation.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
140
diff
changeset
|
17 super(Mess, self).__init__(state) |
145 | 18 self.add_item(EmptyCan("empty_can")) |
19 self.add_item(FullCan("full_can")) | |
20 self.add_item(TubeFragments("tube_fragments")) | |
21 self.add_item(ReplacementTubes("replacement_tubes")) | |
143
d15270c2898c
Hook up brocolli and cans. Rotate brocolli to correct orientation.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
140
diff
changeset
|
22 self.add_thing(CansOnShelf()) |
d15270c2898c
Hook up brocolli and cans. Rotate brocolli to correct orientation.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
140
diff
changeset
|
23 self.add_thing(Tubes()) |
d15270c2898c
Hook up brocolli and cans. Rotate brocolli to correct orientation.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
140
diff
changeset
|
24 |
d15270c2898c
Hook up brocolli and cans. Rotate brocolli to correct orientation.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
140
diff
changeset
|
25 |
145 | 26 class EmptyCan(Item): |
27 "After emptying the full can." | |
28 | |
29 INVENTORY_IMAGE = "empty_can.png" | |
30 CURSOR = CursorSprite('empty_can_cursor.png', 47, 3) | |
31 | |
32 | |
33 class FullCan(Item): | |
34 "Found on the shelf." | |
35 | |
36 INVENTORY_IMAGE = "full_can.png" | |
37 CURSOR = CursorSprite('full_can_cursor.png', 47, 3) | |
38 | |
39 | |
40 class TubeFragments(Item): | |
41 "Old tubes that need repair." | |
42 | |
43 INVENTORY_IMAGE = "tube_fragments.png" | |
44 CURSOR = CursorSprite('tube_fragments_cursor.png', 47, 3) | |
45 | |
46 | |
47 class ReplacementTubes(Item): | |
48 "Repaired tubes." | |
49 | |
50 INVENTORY_IMAGE = "replacement_tubes.png" | |
51 CURSOR = CursorSprite('replacement_tubes.png', 47, 3) | |
52 | |
53 | |
143
d15270c2898c
Hook up brocolli and cans. Rotate brocolli to correct orientation.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
140
diff
changeset
|
54 class CansOnShelf(Thing): |
d15270c2898c
Hook up brocolli and cans. Rotate brocolli to correct orientation.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
140
diff
changeset
|
55 |
d15270c2898c
Hook up brocolli and cans. Rotate brocolli to correct orientation.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
140
diff
changeset
|
56 NAME = "mess.cans" |
d15270c2898c
Hook up brocolli and cans. Rotate brocolli to correct orientation.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
140
diff
changeset
|
57 |
d15270c2898c
Hook up brocolli and cans. Rotate brocolli to correct orientation.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
140
diff
changeset
|
58 INTERACTS = { |
d15270c2898c
Hook up brocolli and cans. Rotate brocolli to correct orientation.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
140
diff
changeset
|
59 "cans": InteractImage(165, 209, "cans_on_shelf.png"), |
d15270c2898c
Hook up brocolli and cans. Rotate brocolli to correct orientation.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
140
diff
changeset
|
60 "nocans": InteractNoImage(165, 209, 50, 50), |
d15270c2898c
Hook up brocolli and cans. Rotate brocolli to correct orientation.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
140
diff
changeset
|
61 } |
d15270c2898c
Hook up brocolli and cans. Rotate brocolli to correct orientation.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
140
diff
changeset
|
62 |
d15270c2898c
Hook up brocolli and cans. Rotate brocolli to correct orientation.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
140
diff
changeset
|
63 INITIAL = "cans" |
d15270c2898c
Hook up brocolli and cans. Rotate brocolli to correct orientation.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
140
diff
changeset
|
64 |
d15270c2898c
Hook up brocolli and cans. Rotate brocolli to correct orientation.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
140
diff
changeset
|
65 |
d15270c2898c
Hook up brocolli and cans. Rotate brocolli to correct orientation.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
140
diff
changeset
|
66 class Tubes(Thing): |
d15270c2898c
Hook up brocolli and cans. Rotate brocolli to correct orientation.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
140
diff
changeset
|
67 |
d15270c2898c
Hook up brocolli and cans. Rotate brocolli to correct orientation.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
140
diff
changeset
|
68 NAME = "mess.tubes" |
d15270c2898c
Hook up brocolli and cans. Rotate brocolli to correct orientation.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
140
diff
changeset
|
69 |
d15270c2898c
Hook up brocolli and cans. Rotate brocolli to correct orientation.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
140
diff
changeset
|
70 INTERACTS = { |
d15270c2898c
Hook up brocolli and cans. Rotate brocolli to correct orientation.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
140
diff
changeset
|
71 "blocked": InteractImage(250, 130, "blocking_broccoli.png"), |
d15270c2898c
Hook up brocolli and cans. Rotate brocolli to correct orientation.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
140
diff
changeset
|
72 "broken": InteractImage(250, 183, "broken_tubes.png"), |
d15270c2898c
Hook up brocolli and cans. Rotate brocolli to correct orientation.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
140
diff
changeset
|
73 "fixed": InteractImage(252, 183, "fixed_tubes.png"), |
d15270c2898c
Hook up brocolli and cans. Rotate brocolli to correct orientation.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
140
diff
changeset
|
74 } |
d15270c2898c
Hook up brocolli and cans. Rotate brocolli to correct orientation.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
140
diff
changeset
|
75 |
d15270c2898c
Hook up brocolli and cans. Rotate brocolli to correct orientation.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
140
diff
changeset
|
76 INITIAL = "blocked" |
d15270c2898c
Hook up brocolli and cans. Rotate brocolli to correct orientation.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
140
diff
changeset
|
77 |
47
8f1fccb8cadf
Skeletons for scenes in plot outline.
Simon Cross <simon@simonx>
parents:
diff
changeset
|
78 |
8f1fccb8cadf
Skeletons for scenes in plot outline.
Simon Cross <simon@simonx>
parents:
diff
changeset
|
79 SCENES = [Mess] |