comparison gamelib/scenes/mess.py @ 242:12c4f87ea424

Unify doors a bit
author Neil Muller <neil@dip.sun.ac.za>
date Fri, 27 Aug 2010 11:32:49 +0200
parents ec2682b373e7
children dfc89bc64fdb
comparison
equal deleted inserted replaced
241:b1451b0b906f 242:12c4f87ea424
3 from random import choice 3 from random import choice
4 4
5 from gamelib.state import Scene, Item, CloneableItem, Thing, InteractImage, InteractNoImage, Result 5 from gamelib.state import Scene, Item, CloneableItem, Thing, InteractImage, InteractNoImage, Result
6 from gamelib.statehelpers import GenericDescThing 6 from gamelib.statehelpers import GenericDescThing
7 from gamelib.cursor import CursorSprite 7 from gamelib.cursor import CursorSprite
8 from gamelib.scenes.scene_widgets import Door
8 9
9 10
10 class Mess(Scene): 11 class Mess(Scene):
11 12
12 FOLDER = "mess" 13 FOLDER = "mess"
193 return Result("It takes quite a lot of tape, but eventually everything is" 194 return Result("It takes quite a lot of tape, but eventually everything is"
194 " airtight and ready to hold pressure. Who'd've thought duct" 195 " airtight and ready to hold pressure. Who'd've thought duct"
195 " tape could actually be used to tape ducts?") 196 " tape could actually be used to tape ducts?")
196 197
197 198
198 class ToMap(Thing): 199 class ToMap(Door):
199 "Way to map."
200 200
201 NAME = "mess.tomap" 201 NAME = "mess.tomap"
202 DEST = "map"
203 202
204 INTERACTS = { 203 INTERACTS = {
205 "door": InteractNoImage(20, 390, 85, 150), 204 "door": InteractNoImage(20, 390, 85, 150),
206 } 205 }
207 206
208 INITIAL = "door" 207 INITIAL = "door"
209 208
210 def get_description(self):
211 return "A doorway leads out to the rest of the ship"
212
213 def interact_without(self):
214 """Go to map."""
215 self.state.set_current_scene("map")
216
217 209
218 SCENES = [Mess] 210 SCENES = [Mess]