Added some more information to the move-announcement hooks; these also know from where the object is coming from (this can be useful for admins wanting to produce e.g. 'player arrives from <foo>' messages insteda of the default uninformative 'player arrives.'. )

/Griatch
This commit is contained in:
Griatch 2009-09-20 00:02:57 +00:00
parent 4cee971169
commit a5a0d92985
3 changed files with 11 additions and 6 deletions

View file

@ -887,7 +887,8 @@ class Object(models.Model):
if not quiet:
#tell the old room we are leaving
self.scriptlink.announce_move_from()
self.scriptlink.announce_move_from(target)
source_location = self.location
#perform move
self.location = target
@ -895,7 +896,7 @@ class Object(models.Model):
if not quiet:
#tell the new room we are there.
self.scriptlink.announce_move_to()
self.scriptlink.announce_move_to(source_location)
#execute eventual extra commands on this object after moving it
self.scriptlink.at_after_move()