mirror of
https://github.com/evennia/evennia.git
synced 2026-03-20 14:56:30 +01:00
Added warning message for puppeting to an object without neither location nor home set.
This commit is contained in:
parent
416d6e14bc
commit
ad8a9fbe69
3 changed files with 51 additions and 44 deletions
|
|
@ -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):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue