logistic_condition¶
- class LogisticConditionMixin(
- connect_to_logistic_network: bool =
False, - logistic_condition: Any =
NOTHING, - *,
- extra_keys: dict[str, Any] | None =
None, Allows the Entity to have an logistic enable condition, such as when the amount of some item in the logistic network exceeds some constant.
- connect_to_logistic_network : bool¶
Serialized
This attribute is imported/exported from blueprint strings.
Whether or not this entity should connect to the logistic network it resides in.
- logistic_condition : Condition¶
Serialized
This attribute is imported/exported from blueprint strings.
The logistic condition that must be passed in order for this entity to function, if configured to do so.
- set_logistic_condition(
- first_operand: SignalID | None =
None, - comparator: '>' | '<' | '=' | '==' | '≥' | '>=' | '≤' | '<=' | '≠' | '!=' =
'<', - second_operand: SignalID | int =
0, Sets the logistic condition of the Entity.
comparatorcan be specified as stored as the single unicode character which is used by Factorio, or you can use the Python formatted 2-character equivalents:# One of: [">", "<", "=", "≥", "≤", "≠"] # Or, alternatively: [">", "<", "==", ">=", "<=", "!="]If specified in the second format, they are converted to and stored as the first format.
- Parameters:
- Raises:
DataFormatError – If
first_operandis not a valid signal name, ifcomparatoris not a valid operation, or ifsecond_operandis neither a valid signal name nor a constant.