[sorrows-mudlib] r193 committed - Summary: Wrong room description printed when moving between rooms....

0 views
Skip to first unread message

sorrows...@googlecode.com

unread,
Dec 23, 2010, 6:59:30 AM12/23/10
to sorrows-mud...@googlegroups.com
Revision: 193
Author: richard.m.tew
Date: Thu Dec 23 03:59:02 2010
Log: Summary: Wrong room description printed when moving between rooms.
Issue: http://code.google.com/p/sorrows-mudlib/issues/detail?id=21
Description: When the player moves from one room to another, he sees the
description of the room he is leaving when he enters the new room, rather
than the description of the room he is entering.

http://code.google.com/p/sorrows-mudlib/source/detail?r=193

Modified:
/trunk/games/room - simple/services/world.py
/trunk/games/room - simple/world/body.py
/trunk/games/room - simple/world/object.py
/trunk/mudlib/commands/move.py

=======================================
--- /trunk/games/room - simple/services/world.py Thu Mar 4 22:09:46 2010
+++ /trunk/games/room - simple/services/world.py Thu Dec 23 03:59:02 2010
@@ -29,6 +29,12 @@
ob.SetLongDescription("This is a chest.")
ob.MoveTo(room)

+ room2 = self.secondRoom = Room()
+ room2.SetShortDescription("A second room")
+ room2.SetLongDescription("This is a second room.")
+ room2.AddExit("north", room)
+ room.AddExit("south", room2)
+
def AddUser(self, user):
if self.bodiesByUsername.has_key(user.name):
raise RuntimeError("User", user.name, "already present")
=======================================
--- /trunk/games/room - simple/world/body.py Wed Feb 24 00:17:49 2010
+++ /trunk/games/room - simple/world/body.py Thu Dec 23 03:59:02 2010
@@ -13,7 +13,5 @@
def MoveDirection(self, verb):
destinationRoom = self.container.GetExitRoom(verb)
if destinationRoom:
- self.MoveTo(destinationRoom)
- return True
- return False
-
+ return self.MoveTo(destinationRoom)
+
=======================================
--- /trunk/games/room - simple/world/object.py Tue Apr 27 22:40:40 2010
+++ /trunk/games/room - simple/world/object.py Thu Dec 23 03:59:02 2010
@@ -77,4 +77,5 @@

dest.AddObject(self)
self.container = dest
-
+ return dest
+
=======================================
--- /trunk/mudlib/commands/move.py Tue Apr 27 22:24:50 2010
+++ /trunk/mudlib/commands/move.py Thu Dec 23 03:59:02 2010
@@ -8,7 +8,8 @@
def syntax_(context):
direction = util.ResolveDirection(context.verb)

- if context.body.MoveDirection(direction):
- context.user.Tell(context.room.LookString(context.body))
+ destRoom = context.body.MoveDirection(direction)
+ if destRoom is not None:
+ context.user.Tell(destRoom.LookString(context.body))
else:
context.user.Tell("You can't go %s." % direction)

Reply all
Reply to author
Forward
0 new messages