mirror of
https://github.com/evennia/evennia.git
synced 2026-03-24 00:36:30 +01:00
Fixed website. Fixing references to db_references, not sure how to add the m2m field access to the admin. Fixed wrapper for db_home.
This commit is contained in:
parent
272a6ddc2d
commit
fd9acd6bf9
11 changed files with 187 additions and 261 deletions
|
|
@ -53,7 +53,7 @@ _GA = object.__getattribute__
|
|||
|
||||
def create_object(typeclass, key=None, location=None,
|
||||
home=None, permissions=None, locks=None,
|
||||
aliases=None, destination=None, report_to=None):
|
||||
aliases=None, destination=None, report_to=None, testmode=False):
|
||||
"""
|
||||
Create a new in-game object. Any game object is a combination
|
||||
of a database object that stores data persistently to
|
||||
|
|
@ -69,6 +69,7 @@ def create_object(typeclass, key=None, location=None,
|
|||
If report_to is not set, errors will be raised as en Exception
|
||||
containing the error message. If set, this method will return
|
||||
None upon errors.
|
||||
testmode is only intended for Evennia unittest system
|
||||
"""
|
||||
global _Object, _ObjectDB
|
||||
if not _Object:
|
||||
|
|
@ -134,6 +135,9 @@ def create_object(typeclass, key=None, location=None,
|
|||
# perform a move_to in order to display eventual messages.
|
||||
if home:
|
||||
new_object.home = home
|
||||
elif testmode:
|
||||
# this is required by unittest
|
||||
pass
|
||||
else:
|
||||
new_object.home = settings.CHARACTER_DEFAULT_HOME
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue