- class CircuitConditionMixin
Allows the Entity to have an circuit enable condition, such as when the value of some signal exceeds some constant.
- remove_circuit_condition() None
Removes the circuit condition of the Entity. Does nothing if the Entity has no circuit condition to remove.
- set_circuit_condition(a: str | None = None, cmp: str = '<', b: str | int = 0) None
Sets the circuit condition of the Entity.
cmpcan 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.
a – The string name of the first signal.
cmp – The operation to use, as specified above.
b – The string name of the second signal, or some 32-bit constant.
DataFormatError – If
ais not a valid signal name, if
cmpis not a valid operation, or if
bis neither a valid signal name nor a constant.