entities.datamaps module

Provides DataMap functionality for entities.

class entities.datamaps.DataMap

Bases: Boost.Python.instance

__init__()

Raises an exception This class cannot be instantiated from Python

find((DataMap)arg1, (str)arg2) → TypeDescription :

Find a type description based on its field name or external name.

Return type:TypeDescription
find_offset((DataMap)arg1, (str)name) → int :

Return the offset of a type description by searching for its name. Return -1 if the property wasn’t found.

Return type:int
base

Return the next data map in the class hierarchy.

Return type:DataMap
chains_validated
class_name

Return the name of the class described by this data map.

Return type:str
length

Return the number of type descriptions hold by this data map.

Return type:int
optimized_datamap

Not implemented on this engine.

packed_offsets_computed
packed_size
class entities.datamaps.EntityProperty(instance, prop_type, networked, offset)[source]

Bases: object

Class used to store property information for verification.

__init__(instance, prop_type, networked, offset)[source]

Store the base attributes on instantiation.

instance

Return the instance_property instance for the class.

networked

Return whether the property is networked.

offset

Returns the offset of the property.

prop_type

Return the type of the property.

class entities.datamaps.FieldType

Bases: Boost.Python.enum

BOOLEAN = _entities._datamaps.FieldType.BOOLEAN
CHARACTER = _entities._datamaps.FieldType.CHARACTER
CLASSPTR = _entities._datamaps.FieldType.CLASSPTR
COLOR32 = _entities._datamaps.FieldType.COLOR32
CUSTOM = _entities._datamaps.FieldType.CUSTOM
EDICT = _entities._datamaps.FieldType.EDICT
EHANDLE = _entities._datamaps.FieldType.EHANDLE
EMBEDDED = _entities._datamaps.FieldType.EMBEDDED
FLOAT = _entities._datamaps.FieldType.FLOAT
FUNCTION = _entities._datamaps.FieldType.FUNCTION
INPUT = _entities._datamaps.FieldType.INPUT
INTEGER = _entities._datamaps.FieldType.INTEGER
INTEGER64 = None
INTERVAL = _entities._datamaps.FieldType.INTERVAL
MATERIALINDEX = _entities._datamaps.FieldType.MATERIALINDEX
MATRIX3X4_WORLDSPACE = _entities._datamaps.FieldType.MATRIX3X4_WORLDSPACE
MODELINDEX = _entities._datamaps.FieldType.MODELINDEX
MODELNAME = _entities._datamaps.FieldType.MODELNAME
POSITION_VECTOR = _entities._datamaps.FieldType.POSITION_VECTOR
QUATERNION = _entities._datamaps.FieldType.QUATERNION
SHORT = _entities._datamaps.FieldType.SHORT
SOUNDNAME = _entities._datamaps.FieldType.SOUNDNAME
STRING = _entities._datamaps.FieldType.STRING
TICK = _entities._datamaps.FieldType.TICK
TIME = _entities._datamaps.FieldType.TIME
TYPECOUNT = _entities._datamaps.FieldType.TYPECOUNT
VECTOR = _entities._datamaps.FieldType.VECTOR
VECTOR2D = _entities._datamaps.FieldType.VECTOR2D
VECTOR4D = None
VMATRIX = _entities._datamaps.FieldType.VMATRIX
VMATRIX_WORLDSPACE = _entities._datamaps.FieldType.VMATRIX_WORLDSPACE
VOID = _entities._datamaps.FieldType.VOID
names = {'VOID': _entities._datamaps.FieldType.VOID, 'FLOAT': _entities._datamaps.FieldType.FLOAT, 'STRING': _entities._datamaps.FieldType.STRING, 'VECTOR': _entities._datamaps.FieldType.VECTOR, 'QUATERNION': _entities._datamaps.FieldType.QUATERNION, 'INTEGER': _entities._datamaps.FieldType.INTEGER, 'BOOLEAN': _entities._datamaps.FieldType.BOOLEAN, 'SHORT': _entities._datamaps.FieldType.SHORT, 'CHARACTER': _entities._datamaps.FieldType.CHARACTER, 'COLOR32': _entities._datamaps.FieldType.COLOR32, 'EMBEDDED': _entities._datamaps.FieldType.EMBEDDED, 'CUSTOM': _entities._datamaps.FieldType.CUSTOM, 'CLASSPTR': _entities._datamaps.FieldType.CLASSPTR, 'EHANDLE': _entities._datamaps.FieldType.EHANDLE, 'EDICT': _entities._datamaps.FieldType.EDICT, 'POSITION_VECTOR': _entities._datamaps.FieldType.POSITION_VECTOR, 'TIME': _entities._datamaps.FieldType.TIME, 'TICK': _entities._datamaps.FieldType.TICK, 'MODELNAME': _entities._datamaps.FieldType.MODELNAME, 'SOUNDNAME': _entities._datamaps.FieldType.SOUNDNAME, 'INPUT': _entities._datamaps.FieldType.INPUT, 'FUNCTION': _entities._datamaps.FieldType.FUNCTION, 'VMATRIX': _entities._datamaps.FieldType.VMATRIX, 'VMATRIX_WORLDSPACE': _entities._datamaps.FieldType.VMATRIX_WORLDSPACE, 'MATRIX3X4_WORLDSPACE': _entities._datamaps.FieldType.MATRIX3X4_WORLDSPACE, 'INTERVAL': _entities._datamaps.FieldType.INTERVAL, 'MODELINDEX': _entities._datamaps.FieldType.MODELINDEX, 'MATERIALINDEX': _entities._datamaps.FieldType.MATERIALINDEX, 'VECTOR2D': _entities._datamaps.FieldType.VECTOR2D, 'TYPECOUNT': _entities._datamaps.FieldType.TYPECOUNT}
values = {0: _entities._datamaps.FieldType.VOID, 1: _entities._datamaps.FieldType.FLOAT, 2: _entities._datamaps.FieldType.STRING, 3: _entities._datamaps.FieldType.VECTOR, 4: _entities._datamaps.FieldType.QUATERNION, 5: _entities._datamaps.FieldType.INTEGER, 6: _entities._datamaps.FieldType.BOOLEAN, 7: _entities._datamaps.FieldType.SHORT, 8: _entities._datamaps.FieldType.CHARACTER, 9: _entities._datamaps.FieldType.COLOR32, 10: _entities._datamaps.FieldType.EMBEDDED, 11: _entities._datamaps.FieldType.CUSTOM, 12: _entities._datamaps.FieldType.CLASSPTR, 13: _entities._datamaps.FieldType.EHANDLE, 14: _entities._datamaps.FieldType.EDICT, 15: _entities._datamaps.FieldType.POSITION_VECTOR, 16: _entities._datamaps.FieldType.TIME, 17: _entities._datamaps.FieldType.TICK, 18: _entities._datamaps.FieldType.MODELNAME, 19: _entities._datamaps.FieldType.SOUNDNAME, 20: _entities._datamaps.FieldType.INPUT, 21: _entities._datamaps.FieldType.FUNCTION, 22: _entities._datamaps.FieldType.VMATRIX, 23: _entities._datamaps.FieldType.VMATRIX_WORLDSPACE, 24: _entities._datamaps.FieldType.MATRIX3X4_WORLDSPACE, 25: _entities._datamaps.FieldType.INTERVAL, 26: _entities._datamaps.FieldType.MODELINDEX, 27: _entities._datamaps.FieldType.MATERIALINDEX, 28: _entities._datamaps.FieldType.VECTOR2D, 29: _entities._datamaps.FieldType.TYPECOUNT}
class entities.datamaps.InputData

Bases: Boost.Python.instance

__init__((object)arg1) → None

__init__( (object)arg1) -> object

activator

Return the activator.

Return type:BaseEntity
caller

Return the caller.

Return type:BaseEntity
output_index

Return the output index.

Return type:int
value

Return the value.

Return type:Variant
class entities.datamaps.InputFunction

Bases: _memory.Function

__init__((object)self, (TypeDescription)desc, (Function)function, (object)entity) → None :

Instantiate the function instance and store the base attributes.

Parameters:
  • desc (TypeDescription) – The descriptor of the input bound to this instance.
  • function (Function) – The function of the input.
  • entity (BaseEntity) – The entity this input is bound to.
Raises:

TypeError – If the given descriptor is not an input.

class entities.datamaps.Interval

Bases: Boost.Python.instance

__init__((object)arg1) → None
range
start
class entities.datamaps.TypeDescription

Bases: Boost.Python.instance

__init__()

Raises an exception This class cannot be instantiated from Python

embedded_datamap
external_name

Return the external name of the field.

Return type:str
flags

Return the flags of the field.

Return type:int
flat_group

Not implemented on this engine.

flat_offset

Not implemented on this engine.

function

Return the input function as a pointer.

Return type:Pointer
input_function

Return a callable function if the field is an input function.

name

Return the name of the field.

Return type:str
offset

Return the offset of the field.

Return type:int
override_count
override_field
packed_offset
save_restore
size

Return the size of the field.

Return type:int
size_in_bytes
tolerance
type

Return the type of the field.

Return type:FieldType
class entities.datamaps.TypeDescriptionFlags[source]

Bases: enum.IntFlag

TypeDescription flags wrapper enumerator.

FUNCTIONTABLE = <TypeDescriptionFlags.FUNCTIONTABLE: 32>
GLOBAL = <TypeDescriptionFlags.GLOBAL: 1>
INDEX = <TypeDescriptionFlags.INDEX: 4096>
INPUT = <TypeDescriptionFlags.INPUT: 8>
INSENDTABLE = <TypeDescriptionFlags.INSENDTABLE: 256>
KEY = <TypeDescriptionFlags.KEY: 4>
MODELINDEX = <TypeDescriptionFlags.MODELINDEX: 2048>
NOERRORCHECK = <TypeDescriptionFlags.NOERRORCHECK: 1024>
OUTPUT = <TypeDescriptionFlags.OUTPUT: 16>
OVERRIDE = <TypeDescriptionFlags.OVERRIDE: 128>
PRIVATE = <TypeDescriptionFlags.PRIVATE: 512>
PTR = <TypeDescriptionFlags.PTR: 64>
SAVE = <TypeDescriptionFlags.SAVE: 2>
VIEW_NEVER = <TypeDescriptionFlags.VIEW_NEVER: 32768>
VIEW_OTHER_PLAYER = <TypeDescriptionFlags.VIEW_OTHER_PLAYER: 8192>
VIEW_OWN_TEAM = <TypeDescriptionFlags.VIEW_OWN_TEAM: 16384>
class entities.datamaps.Variant

Bases: Boost.Python.instance

__init__((object)arg1) → None
get_bool((Variant)arg1) → bool :

Return the value as a boolean.

Return type:bool
get_color((Variant)arg1) → Color :

Return the value as a color.

Return type:Color
get_entity((Variant)arg1) → object :

Return the value as a handle.

Return type:BaseHandle
get_float((Variant)arg1) → float :

Return the value as a floating value.

Return type:float
get_int((Variant)arg1) → int :

Return the value as an integer.

Return type:int
get_string((Variant)arg1) → str :

Return the value as a string.

Return type:str
get_vector((Variant)arg1) → Vector :

Return the value as a vector.

Return type:Value
set_bool((Variant)arg1, (bool)arg2) → None :

Set the value as a boolean.

set_color((Variant)arg1, (Color)arg2) → None :

Set the value as a color.

set_entity((Variant)arg1, (object)arg2) → None :

Set the value as an entity.

set_float((Variant)arg1, (float)arg2) → None :

Set the value as a floating value.

set_int((Variant)arg1, (Channel)arg2) → None :

Set the value as an integer.

set_string((Variant)arg1, (str)arg2) → None :

Set the value as a string.

set_vector((Variant)arg1, (Vector)arg2) → None :

Set the value as a Vector.

type

Return the type of the value.

Return type:FieldType