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

@ -83,9 +83,10 @@ class EvenniaBasicObject(object):
"""
pass
def announce_move_from(self):
def announce_move_from(self, target_location):
"""
Called when announcing to leave a destination.
target_location - the place we are going to
"""
obj = self.scripted_obj
loc = obj.get_location()
@ -94,9 +95,10 @@ class EvenniaBasicObject(object):
if loc.is_player():
loc.emit_to("%s has left your inventory." % (obj.get_name()))
def announce_move_to(self):
def announce_move_to(self, source_location):
"""
Called when announcing one's arrival at a destination.
source_location - the place we are coming from
"""
obj = self.scripted_obj
loc = obj.get_location()