Add TagProperty, AliasProperty, PermissionProperty. Default autocreate=True for AttributeProperty.

This commit is contained in:
Griatch 2022-04-09 15:39:39 +02:00
parent 8f1f604708
commit ef7280f55a
14 changed files with 334 additions and 160 deletions

View file

@ -400,7 +400,10 @@ class ScriptBase(ScriptDB, metaclass=TypeclassBase):
overriding the call (unused by default).
"""
self.basetype_setup()
self.at_script_creation()
# initialize Attribute/TagProperties
self.init_evennia_properties()
if hasattr(self, "_createdict"):
# this will only be set if the utils.create_script
@ -471,6 +474,14 @@ class ScriptBase(ScriptDB, metaclass=TypeclassBase):
super().delete()
return True
def basetype_setup(self):
"""
Changes fundamental aspects of the type. Usually changes are made in at_script creation
instead.
"""
pass
def at_init(self):
"""
Called when the Script is cached in the idmapper. This is usually more reliable