mirror of
https://github.com/evennia/evennia.git
synced 2026-03-23 16:26:30 +01:00
Fixed creation. Time to start cleaning the .dbobj hierarchy.
This commit is contained in:
parent
e28d544fb0
commit
4e0b5be962
5 changed files with 13 additions and 8 deletions
|
|
@ -764,11 +764,16 @@ class TypeclassBase(SharedMemoryModelBase):
|
|||
Metaclass which should be set for the root of model proxies
|
||||
that don't define any new fields, like Object, Script etc.
|
||||
"""
|
||||
|
||||
def __new__(cls, name, bases, attrs):
|
||||
"""
|
||||
We must define our Typeclasses as proxies. We also store the path
|
||||
directly on the class, this is useful for managers.
|
||||
"""
|
||||
|
||||
attrs["typename"] = cls.__name__
|
||||
attrs["path"] = "%s.%s" % (attrs["__module__"], name)
|
||||
|
||||
# typeclass proxy setup
|
||||
if "Meta" in attrs:
|
||||
attrs["Meta"].proxy = True
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue