mirror of
https://github.com/evennia/evennia.git
synced 2026-04-02 05:57:16 +02:00
OBS: You need to resync your database! Moved cmdsets into the database rather than being dependent on scripts. Moved the creation of the cmdset- and cmdset-handlers into ObjectDB.__init__ rather than bootstrapping it from the typeclass. Added some more script functionality for testing, includong the @script command for assigning a script to an object.
This commit is contained in:
parent
e965830735
commit
126e2ea61f
17 changed files with 370 additions and 216 deletions
|
|
@ -753,7 +753,8 @@ class TypedObject(SharedMemoryModel):
|
|||
for nattr in self.ndb.all():
|
||||
del nattr
|
||||
|
||||
# run hook for this new typeclass
|
||||
# run hooks for this new typeclass
|
||||
new_typeclass.basetype_setup()
|
||||
new_typeclass.at_object_creation()
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -35,6 +35,13 @@ class MetaTypeClass(type):
|
|||
printed in a nicer way (it might end up having no name at all
|
||||
otherwise due to the magics being done with get/setattribute).
|
||||
"""
|
||||
def __init__(mcs, *args, **kwargs):
|
||||
"""
|
||||
Adds some features to typeclassed objects
|
||||
"""
|
||||
super(MetaTypeClass, mcs).__init__(*args, **kwargs)
|
||||
mcs.path = "%s.%s" % (mcs.__module__, mcs.__name__)
|
||||
|
||||
def __str__(cls):
|
||||
return "%s" % cls.__name__
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue