mirror of
https://github.com/evennia/evennia.git
synced 2026-04-05 07:27:17 +02:00
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:
parent
4cee971169
commit
a5a0d92985
3 changed files with 11 additions and 6 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue