Added warning message for puppeting to an object without neither location nor home set.

This commit is contained in:
Griatch 2013-04-20 16:14:12 +02:00
parent 416d6e14bc
commit ad8a9fbe69
3 changed files with 51 additions and 44 deletions

View file

@ -797,11 +797,13 @@ class Character(Object):
if self.location == None:
# make sure location is never None (home should always exist)
self.location = self.home
# save location again to be sure
self.db.prelogout_location = self.location
self.location.msg_contents("%s has entered the game." % self.name, exclude=[self])
self.location.at_object_receive(self, self.location)
if self.location:
# save location again to be sure
self.db.prelogout_location = self.location
self.location.msg_contents("%s has entered the game." % self.name, exclude=[self])
self.location.at_object_receive(self, self.location)
else:
player.msg("{r%s has no location and no home is set.{n" % self)
def at_post_puppet(self):
"""