Mercurial > pyntnclick
diff 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 |
line wrap: on
line diff
--- a/gamelib/scenes/mess.py Tue Aug 24 22:41:59 2010 +0200 +++ b/gamelib/scenes/mess.py Tue Aug 24 22:49:14 2010 +0200 @@ -1,6 +1,6 @@ """Mess where crew eat. Fun stuff.""" -from gamelib.state import Scene, Item, Thing +from gamelib.state import Scene, Item, Thing, InteractImage, InteractNoImage class Mess(Scene): @@ -12,5 +12,35 @@ 'accessible': False, } + def __init__(self, state): + super(Mess, self).__init__(state) + self.add_thing(CansOnShelf()) + self.add_thing(Tubes()) + + +class CansOnShelf(Thing): + + NAME = "mess.cans" + + INTERACTS = { + "cans": InteractImage(165, 209, "cans_on_shelf.png"), + "nocans": InteractNoImage(165, 209, 50, 50), + } + + INITIAL = "cans" + + +class Tubes(Thing): + + NAME = "mess.tubes" + + INTERACTS = { + "blocked": InteractImage(250, 130, "blocking_broccoli.png"), + "broken": InteractImage(250, 183, "broken_tubes.png"), + "fixed": InteractImage(252, 183, "fixed_tubes.png"), + } + + INITIAL = "blocked" + SCENES = [Mess]