entities.classes module

Provides access to many objects for entities.

class entities.classes._ServerClasses[source]

Bases: memory.manager.TypeManager

Class used to retrieve objects dynamically for a server class.

__init__()[source]

Store the base attributes.

_add_input(instance, name, desc, contents)[source]

Add the input to the given instance’s inputs dictionary.

_add_keyvalue(instance, name, desc, contents)[source]

Add the keyvalue to the instance’s keyvalues dictionary.

_add_property(instance, name, offset, contents, prop_type, networked=False)[source]

Add the property to the given instance’s properties dictionary.

_find_descriptors(datamap, base_name='', base_offset=0)[source]

Find descriptors and yield their values.

_find_properties(table, base_name='', base_offset=0)[source]

Find send props and yield their values.

_get_base_server_classes(table)[source]

Yield all baseclasses within the table.

_get_server_class(class_name, datamap)[source]

Retrieve values for the server class.

entity_property(type_name, offset, networked)[source]

Entity property.

get_entity_server_classes(entity)[source]

Return the entity’s server classes.

Parameters:entity (BaseEntity) – The entity whose server classes should be retrieved.
Returns:A list containing memory.manager.CustomType instances that have been created based on the entity files stored in paths.SP_DATA_PATH.
Return type:list
static input(name, desc)[source]

Input type DataMap object.

static keyvalue(name, type_name)[source]

Entity keyvalue.