entities.hooks module
Provides memory hooking functionality for entities.
-
class entities.hooks.EntityCondition[source]
Bases: object
Store some default entity conditions.
-
static equals_datamap_classname(*classnames)[source]
Return a function that requires an entities.entity.Entity`
instance. The returned function returns True
if the entity’s
datamap classname equals one of the passed classnames.
- Return type:
lambda
-
static equals_entity_classname(*classnames)[source]
Return a function that requires an entities.entity.Entity`
instace. The returned function returns True
if the entity’s
classname equals one of the passed classnames.
- Return type:
lambda
-
static is_bot_player(entity)[source]
Return True
if the entity is a bot.
- Return type:
bool
-
static is_human_player(entity)[source]
Return True
if the entity is a human player.
- Return type:
bool
-
static is_not_player(entity)[source]
Return True
if the entity is not a player.
- Return type:
bool
-
static is_player(entity)[source]
Return True
if the entity is a player.
- Return type:
bool
-
class entities.hooks.EntityPostHook(*args, **kwargs)[source]
Bases: _EntityHook
Decorator class used to create entity post hooks that auto unload.
-
hook_type = _memory.HookType.POST
-
class entities.hooks.EntityPreHook(*args, **kwargs)[source]
Bases: _EntityHook
Decorator class used to create entity pre hooks that auto unload.
-
hook_type = _memory.HookType.PRE