entities.dictionary module

Provides helper class to store entity instances.

class entities.dictionary.EntityDictionary(factory=<class 'entities._base.Entity'>, *args, **kwargs)[source]

Bases: core.AutoUnload, dict

Helper class used to store entity instances.

__init__(factory=<class 'entities._base.Entity'>, *args, **kwargs)[source]

Initialize the dictionary.

_on_entity_deleted(base_entity)[source]

OnEntityDeleted listener callback.

_unload_instance()[source]

Unregister our OnEntityDeleted listener.

on_automatically_removed(index)[source]

Called when an index is automatically removed.