request_filters

class RequestFiltersMixin(name: str, similar_entities: list[str], **kwargs: dict)

Used to allow Logistics Containers to request items from the Logistic network.

set_request_filter(index: int, item: str, count: int | None = None) None

Sets the request filter at a particular index to request an amount of a certain item. Factorio imposes that an Entity can only have 1000 active requests at the same time.

Parameters:
  • index – The index of the item request.

  • item – The item name to request, or None.

  • count – The amount to request. If set to None, it defaults to the stack size of item.

Raises:
  • TypeError – If index is not an int, item is not a str or None, or count is not an int.

  • InvalidItemError – If item is not a valid item name.

  • IndexError – If index is not in the range [0, 1000).

set_request_filters(filters: list) None

Sets all the request filters of the Entity, where filters is of the format:

[(item_1, count_1), (item_2, count_2), ...]

where item_x is a str name and count_x is a positive integer.

Parameters:

filters – The request filters to set.

Raises: