mirror of
https://github.com/evennia/evennia.git
synced 2026-03-17 21:36:30 +01:00
Cleaned up typeclasses, removing a lot of extranenous and ineffective code from the setattr/getattr methods that are called most often.
This commit is contained in:
parent
f306c5a6a2
commit
7b2a4e4467
5 changed files with 186 additions and 192 deletions
|
|
@ -27,6 +27,7 @@ Common examples of uses of Scripts:
|
|||
from django.conf import settings
|
||||
from django.db import models
|
||||
from src.typeclasses.models import Attribute, TypedObject
|
||||
from django.contrib.contenttypes.models import ContentType
|
||||
from src.scripts.manager import ScriptManager
|
||||
|
||||
#------------------------------------------------------------
|
||||
|
|
@ -244,9 +245,10 @@ class ScriptDB(TypedObject):
|
|||
#
|
||||
|
||||
# this is required to properly handle attributes and typeclass loading
|
||||
attribute_model_path = "src.scripts.models"
|
||||
attribute_model_name = "ScriptAttribute"
|
||||
#attribute_model_path = "src.scripts.models"
|
||||
#attribute_model_name = "ScriptAttribute"
|
||||
typeclass_paths = settings.SCRIPT_TYPECLASS_PATHS
|
||||
attribute_class = ScriptAttribute
|
||||
|
||||
# this is used by all typedobjects as a fallback
|
||||
try:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue