requirements¶
- punyecs.requirements(world: World, require: set[str], exclude: set[str] | None = None, exclude_objs: list[Any] | None = None, exclude_attr_vals: dict[str, Any] | None = None, exclude_attr_funcs: dict[str, Callable[[Any], bool]] | None = None)¶
Use as a decorator, runs the decorated function on each entity that has the required components and none of the excluded components (or excluded objects).
- Parameters:
require – Required attribute for an entity to be ran.
exclude – Entity must not have the following attributes.
exclude_objs – Exculde individual objects from being ran.