diff --git a/evennia/contrib/base_systems/components/README.md b/evennia/contrib/base_systems/components/README.md index fc594aa036..8f30b03630 100644 --- a/evennia/contrib/base_systems/components/README.md +++ b/evennia/contrib/base_systems/components/README.md @@ -39,7 +39,7 @@ class Health(Component): Components may define DBFields or NDBFields at the class level. DBField will store its values in the host's DB with a prefixed key. NDBField will store its values in the host's NDB and will not persist. -The key used will be 'component_name__field_name'. +The key used will be 'component_name::field_name'. They use AttributeProperty under the hood. Example: diff --git a/evennia/contrib/base_systems/components/dbfield.py b/evennia/contrib/base_systems/components/dbfield.py index 7e2d16edee..9adbf8197f 100644 --- a/evennia/contrib/base_systems/components/dbfield.py +++ b/evennia/contrib/base_systems/components/dbfield.py @@ -21,7 +21,7 @@ class DBField(AttributeProperty): owner (object): The component classF on which this is set name (str): The name that was used to set the DBField. """ - key = f"{owner.name}__{name}" + key = f"{owner.name}::{name}" self._key = key db_fields = getattr(owner, "_db_fields", None) if db_fields is None: @@ -45,7 +45,7 @@ class NDBField(NAttributeProperty): owner (object): The component class on which this is set name (str): The name that was used to set the DBField. """ - key = f"{owner.name}__{name}" + key = f"{owner.name}::{name}" self._key = key ndb_fields = getattr(owner, "_ndb_fields", None) if ndb_fields is None: