effects.templates module

Base templates for effect classes.

class effects.templates.TempEntityTemplate(temp_entity)[source]

Bases: _effects._base.BaseTempEntity

A temp entity template.

__init__(temp_entity)[source]

Initialize the instance.

Parameters:temp_entity (BaseTempEntity) – The base entity instance to copy the base from.
add_hook(callback)[source]

Register a hook for this temp entity.

Parameters:callback (function) – The callback function to register.
handle_hook(temp_entity, recipient_filter)[source]

Call the registered callbacks.

Parameters:
Return type:

bool

remove_hook(callback)[source]

Unregister a hook for this temp entity.

Parameters:callback (function) – The callback function to unregister.
aliases

Return the aliases of the temp entity.

Return type:GameConfigObj
hooks

Return the registered hooks for this temp entity.

Return type:dict
properties

Return the properties data of the temp entity.

Return type:dict
size

Return the size of the temp entity instance.

Return type:int
class effects.templates.TempEntityTemplates[source]

Bases: dict

Container class used to store the temp entity templates instances.