Notify people in the room when others arrive/leave.
This commit is contained in:
parent
4fff8fea3a
commit
595a09d4c1
1 changed files with 3 additions and 1 deletions
|
|
@ -475,14 +475,16 @@ class Object(models.Model):
|
||||||
except:
|
except:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def move_to(self, target):
|
def move_to(self, target, quiet=False):
|
||||||
"""
|
"""
|
||||||
Moves the object to a new location.
|
Moves the object to a new location.
|
||||||
|
|
||||||
target: (Object) Reference to the object to move to.
|
target: (Object) Reference to the object to move to.
|
||||||
"""
|
"""
|
||||||
|
self.get_location().emit_to_contents("%s has left." % (self.get_name(),), exclude=self)
|
||||||
self.location = target
|
self.location = target
|
||||||
self.save()
|
self.save()
|
||||||
|
self.get_location().emit_to_contents("%s has arrived." % (self.get_name(),), exclude=self)
|
||||||
|
|
||||||
def dbref_match(self, oname):
|
def dbref_match(self, oname):
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue