Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDinko Galetic <dgaletic@everflame.(none)>2010-06-08 23:00:09 (GMT)
committer Dinko Galetic <dgaletic@everflame.(none)>2010-06-08 23:00:09 (GMT)
commit9c3dab23e1db2cff18b9a598a35dc768c092b39c (patch)
tree9d088727495038c1d28c8e793bd1677dab6370b6
parent73bbce1c5db4bdfe8df520154671dbbab8bed07d (diff)
Added create_some_rooms() function.
A temporary measure for testing. It creates two rooms, sets their descriptions and adds some items to them.
-rw-r--r--library/pippy/scholar/scholar.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/library/pippy/scholar/scholar.py b/library/pippy/scholar/scholar.py
index fbc45ba..7fba91c 100644
--- a/library/pippy/scholar/scholar.py
+++ b/library/pippy/scholar/scholar.py
@@ -55,3 +55,18 @@ def load():
def save():
pass
+
+# For testing purposes only. Needs some serious design thinking
+# about how rooms will behave (how to store the instances).
+def create_some_rooms():
+ starting = Room()
+ # TODO: exits shouldn't be hardcoded in room descriptions!
+ starting.description = "Though rather small, this room looks quite cozy, mostly due to an inviting bed. There is a desk by the north wall, with a painting hung low on the wall so that one can easily glance at it while working at the desk. The door and windows keep most of the noise out. There is an exit to the west."
+ starting.contains = [starting_painting, starting_bed]
+ balcony = Room()
+ balcony.description = "This is a balcony overlooking the large waterfalls over which this mansion was built. Enormous amounts of water spill over it each second and fall hundreds of meters before hitting the ground. It is no wonder many artists choose this particular room when staying here. There is an exit to the east."
+ starting.add_exit(West, balcony)
+
+ return [starting, balcony]
+
+