annotate gamelib/scenes/engine.py @ 263:3b4a78422201

Shuffled a bunch of stuff into more appropriate places.
author Jeremy Thurgood <firxen@gmail.com>
date Fri, 27 Aug 2010 19:29:37 +0200
parents 5f58da9eeb52
children 2ec328aeeaf8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
47
8f1fccb8cadf Skeletons for scenes in plot outline.
Simon Cross <simon@simonx>
parents:
diff changeset
1 """Engine room where things need to be repaired."""
8f1fccb8cadf Skeletons for scenes in plot outline.
Simon Cross <simon@simonx>
parents:
diff changeset
2
263
3b4a78422201 Shuffled a bunch of stuff into more appropriate places.
Jeremy Thurgood <firxen@gmail.com>
parents: 262
diff changeset
3 from gamelib.state import Scene, Item, Thing, Result
3b4a78422201 Shuffled a bunch of stuff into more appropriate places.
Jeremy Thurgood <firxen@gmail.com>
parents: 262
diff changeset
4 from gamelib.scenes.scene_widgets import (Door, InteractText, InteractNoImage,
3b4a78422201 Shuffled a bunch of stuff into more appropriate places.
Jeremy Thurgood <firxen@gmail.com>
parents: 262
diff changeset
5 InteractRectUnion, InteractImage,
3b4a78422201 Shuffled a bunch of stuff into more appropriate places.
Jeremy Thurgood <firxen@gmail.com>
parents: 262
diff changeset
6 InteractAnimated, GenericDescThing)
47
8f1fccb8cadf Skeletons for scenes in plot outline.
Simon Cross <simon@simonx>
parents:
diff changeset
7
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 class Engine(Scene):
8f1fccb8cadf Skeletons for scenes in plot outline.
Simon Cross <simon@simonx>
parents:
diff changeset
10
8f1fccb8cadf Skeletons for scenes in plot outline.
Simon Cross <simon@simonx>
parents:
diff changeset
11 FOLDER = "engine"
244
cc478e3a951e Line-art engine room.
Simon Cross <hodgestar+bzr@gmail.com>
parents: 242
diff changeset
12 BACKGROUND = "engine_room.png"
47
8f1fccb8cadf Skeletons for scenes in plot outline.
Simon Cross <simon@simonx>
parents:
diff changeset
13
8f1fccb8cadf Skeletons for scenes in plot outline.
Simon Cross <simon@simonx>
parents:
diff changeset
14 INITIAL_DATA = {
151
d00aa26941c4 Add machine and engine rooms to map. Fix typo in name of mess hall doorway thing.
Simon Cross <hodgestar+bzr@gmail.com>
parents: 55
diff changeset
15 'accessible': True,
47
8f1fccb8cadf Skeletons for scenes in plot outline.
Simon Cross <simon@simonx>
parents:
diff changeset
16 }
8f1fccb8cadf Skeletons for scenes in plot outline.
Simon Cross <simon@simonx>
parents:
diff changeset
17
151
d00aa26941c4 Add machine and engine rooms to map. Fix typo in name of mess hall doorway thing.
Simon Cross <hodgestar+bzr@gmail.com>
parents: 55
diff changeset
18 def __init__(self, state):
d00aa26941c4 Add machine and engine rooms to map. Fix typo in name of mess hall doorway thing.
Simon Cross <hodgestar+bzr@gmail.com>
parents: 55
diff changeset
19 super(Engine, self).__init__(state)
d00aa26941c4 Add machine and engine rooms to map. Fix typo in name of mess hall doorway thing.
Simon Cross <hodgestar+bzr@gmail.com>
parents: 55
diff changeset
20 self.add_thing(ToMap())
d00aa26941c4 Add machine and engine rooms to map. Fix typo in name of mess hall doorway thing.
Simon Cross <hodgestar+bzr@gmail.com>
parents: 55
diff changeset
21
d00aa26941c4 Add machine and engine rooms to map. Fix typo in name of mess hall doorway thing.
Simon Cross <hodgestar+bzr@gmail.com>
parents: 55
diff changeset
22 def enter(self):
d00aa26941c4 Add machine and engine rooms to map. Fix typo in name of mess hall doorway thing.
Simon Cross <hodgestar+bzr@gmail.com>
parents: 55
diff changeset
23 return Result("Somewhere in the darkness the engine waits and bides its time.")
d00aa26941c4 Add machine and engine rooms to map. Fix typo in name of mess hall doorway thing.
Simon Cross <hodgestar+bzr@gmail.com>
parents: 55
diff changeset
24
d00aa26941c4 Add machine and engine rooms to map. Fix typo in name of mess hall doorway thing.
Simon Cross <hodgestar+bzr@gmail.com>
parents: 55
diff changeset
25
242
12c4f87ea424 Unify doors a bit
Neil Muller <neil@dip.sun.ac.za>
parents: 151
diff changeset
26 class ToMap(Door):
151
d00aa26941c4 Add machine and engine rooms to map. Fix typo in name of mess hall doorway thing.
Simon Cross <hodgestar+bzr@gmail.com>
parents: 55
diff changeset
27
252
dfc89bc64fdb Start of walkthrough "unit test" and associated fixes and tweaks.
Jeremy Thurgood <firxen@gmail.com>
parents: 244
diff changeset
28 SCENE = "engine"
151
d00aa26941c4 Add machine and engine rooms to map. Fix typo in name of mess hall doorway thing.
Simon Cross <hodgestar+bzr@gmail.com>
parents: 55
diff changeset
29
d00aa26941c4 Add machine and engine rooms to map. Fix typo in name of mess hall doorway thing.
Simon Cross <hodgestar+bzr@gmail.com>
parents: 55
diff changeset
30 INTERACTS = {
262
5f58da9eeb52 Replace text interacts with doors.
Simon Cross <hodgestar+bzr@gmail.com>
parents: 252
diff changeset
31 "door": InteractNoImage(663, 360, 108, 193),
151
d00aa26941c4 Add machine and engine rooms to map. Fix typo in name of mess hall doorway thing.
Simon Cross <hodgestar+bzr@gmail.com>
parents: 55
diff changeset
32 }
d00aa26941c4 Add machine and engine rooms to map. Fix typo in name of mess hall doorway thing.
Simon Cross <hodgestar+bzr@gmail.com>
parents: 55
diff changeset
33
d00aa26941c4 Add machine and engine rooms to map. Fix typo in name of mess hall doorway thing.
Simon Cross <hodgestar+bzr@gmail.com>
parents: 55
diff changeset
34 INITIAL = "door"
d00aa26941c4 Add machine and engine rooms to map. Fix typo in name of mess hall doorway thing.
Simon Cross <hodgestar+bzr@gmail.com>
parents: 55
diff changeset
35
47
8f1fccb8cadf Skeletons for scenes in plot outline.
Simon Cross <simon@simonx>
parents:
diff changeset
36
8f1fccb8cadf Skeletons for scenes in plot outline.
Simon Cross <simon@simonx>
parents:
diff changeset
37 SCENES = [Engine]