annotate gamelib/scenes/engine.py @ 151:d00aa26941c4

Add machine and engine rooms to map. Fix typo in name of mess hall doorway thing.
author Simon Cross <hodgestar+bzr@gmail.com>
date Tue, 24 Aug 2010 23:38:04 +0200
parents 2e2f6ff54780
children 12c4f87ea424
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
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
3 from gamelib.state import Scene, Item, Thing, InteractText, Result
47
8f1fccb8cadf Skeletons for scenes in plot outline.
Simon Cross <simon@simonx>
parents:
diff changeset
4
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 class Engine(Scene):
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 FOLDER = "engine"
8f1fccb8cadf Skeletons for scenes in plot outline.
Simon Cross <simon@simonx>
parents:
diff changeset
9 BACKGROUND = None # TODO
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 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
12 'accessible': True,
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
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 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
16 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
17 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
18
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 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
20 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
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
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 class ToMap(Thing):
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 "Way to map."
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
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
26 NAME = "engine.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
27 DEST = "map"
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
28
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 INTERACTS = {
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 "door": InteractText(100, 200, "To Map"),
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
31 }
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 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
34
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 def interact_without(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
36 """Go to map."""
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
37 self.state.set_current_scene("map")
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
38
47
8f1fccb8cadf Skeletons for scenes in plot outline.
Simon Cross <simon@simonx>
parents:
diff changeset
39
8f1fccb8cadf Skeletons for scenes in plot outline.
Simon Cross <simon@simonx>
parents:
diff changeset
40 SCENES = [Engine]