mirror of
https://github.com/evennia/evennia.git
synced 2026-03-29 20:17:16 +02:00
Moved object methods up from ObjectDB and mainly onto the typeclass. In the process of converting players in the same way.
This commit is contained in:
parent
302f5bdd81
commit
db512cbbf5
6 changed files with 175 additions and 226 deletions
|
|
@ -216,7 +216,7 @@ def pack_dbobj(item):
|
|||
_init_globals()
|
||||
obj = hasattr(item, 'dbobj') and item.dbobj or item
|
||||
natural_key = _FROM_MODEL_MAP[hasattr(obj, "id") and hasattr(obj, "db_date_created") and
|
||||
hasattr(obj, '__class__') and obj.__class__.__name__.lower()]
|
||||
hasattr(obj, '__dbclass__') and obj.__dbclass__.__name__.lower()]
|
||||
# build the internal representation as a tuple
|
||||
# ("__packed_dbobj__", key, creation_time, id)
|
||||
return natural_key and ('__packed_dbobj__', natural_key,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue