mirror of
https://github.com/evennia/evennia.git
synced 2026-04-04 23:17:17 +02:00
More fixes and cleanup in wake of ic/ooc changes.
This commit is contained in:
parent
86f76d0d08
commit
3e8b43d222
9 changed files with 66 additions and 40 deletions
|
|
@ -73,6 +73,7 @@ def create_object(typeclass, key=None, location=None,
|
|||
# this will either load the typeclass or the default one
|
||||
new_object = new_db_object.typeclass
|
||||
|
||||
|
||||
if not object.__getattribute__(new_db_object, "is_typeclass")(typeclass, exact=True):
|
||||
# this will fail if we gave a typeclass as input and it still gave us a default
|
||||
SharedMemoryModel.delete(new_db_object)
|
||||
|
|
@ -105,6 +106,10 @@ def create_object(typeclass, key=None, location=None,
|
|||
# perform a move_to in order to display eventual messages.
|
||||
if home:
|
||||
new_object.home = home
|
||||
else:
|
||||
new_object.home = settings.CHARACTER_DEFAULT_HOME
|
||||
|
||||
|
||||
if location:
|
||||
new_object.move_to(location, quiet=True)
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue