evennia.contrib.base_systems.components.dbfield

Components - ChrisLR 2022

This file contains the Descriptors used to set Fields in Components

class evennia.contrib.base_systems.components.dbfield.DBField(default=None, category=None, strattr=False, lockstring='', autocreate=True)[source]

Bases: evennia.typeclasses.attributes.AttributeProperty

Component Attribute Descriptor. Allows you to set attributes related to a component on the class. It uses AttributeProperty under the hood but prefixes the key with the component name.

class evennia.contrib.base_systems.components.dbfield.NDBField(default=None, category=None, strattr=False, lockstring='', autocreate=True)[source]

Bases: evennia.typeclasses.attributes.NAttributeProperty

Component In-Memory Attribute Descriptor. Allows you to set in-memory attributes related to a component on the class. It uses NAttributeProperty under the hood but prefixes the key with the component name.

class evennia.contrib.base_systems.components.dbfield.TagField(default=None, enforce_single=False)[source]

Bases: object

Component Tags Descriptor. Allows you to set Tags related to a component on the class. The tags are set with a prefixed category, so it can support multiple tags or enforce a single one.

Default value of a tag is added when the component is registered. Tags are removed if the component itself is removed.

__init__(default=None, enforce_single=False)[source]

Initialize self. See help(type(self)) for accurate signature.