Mercurial > boomslang
comparison gamelib/scenes/mess.py @ 143:d15270c2898c
Hook up brocolli and cans. Rotate brocolli to correct orientation.
author | Simon Cross <hodgestar+bzr@gmail.com> |
---|---|
date | Tue, 24 Aug 2010 22:49:14 +0200 |
parents | 95d882eeba12 |
children | ce419fb7ab8a |
comparison
equal
deleted
inserted
replaced
142:da8bf3531199 | 143:d15270c2898c |
---|---|
1 """Mess where crew eat. Fun stuff.""" | 1 """Mess where crew eat. Fun stuff.""" |
2 | 2 |
3 from gamelib.state import Scene, Item, Thing | 3 from gamelib.state import Scene, Item, Thing, InteractImage, InteractNoImage |
4 | 4 |
5 | 5 |
6 class Mess(Scene): | 6 class Mess(Scene): |
7 | 7 |
8 FOLDER = "mess" | 8 FOLDER = "mess" |
10 | 10 |
11 INITIAL_DATA = { | 11 INITIAL_DATA = { |
12 'accessible': False, | 12 'accessible': False, |
13 } | 13 } |
14 | 14 |
15 def __init__(self, state): | |
16 super(Mess, self).__init__(state) | |
17 self.add_thing(CansOnShelf()) | |
18 self.add_thing(Tubes()) | |
19 | |
20 | |
21 class CansOnShelf(Thing): | |
22 | |
23 NAME = "mess.cans" | |
24 | |
25 INTERACTS = { | |
26 "cans": InteractImage(165, 209, "cans_on_shelf.png"), | |
27 "nocans": InteractNoImage(165, 209, 50, 50), | |
28 } | |
29 | |
30 INITIAL = "cans" | |
31 | |
32 | |
33 class Tubes(Thing): | |
34 | |
35 NAME = "mess.tubes" | |
36 | |
37 INTERACTS = { | |
38 "blocked": InteractImage(250, 130, "blocking_broccoli.png"), | |
39 "broken": InteractImage(250, 183, "broken_tubes.png"), | |
40 "fixed": InteractImage(252, 183, "fixed_tubes.png"), | |
41 } | |
42 | |
43 INITIAL = "blocked" | |
44 | |
15 | 45 |
16 SCENES = [Mess] | 46 SCENES = [Mess] |