target_priorities¶
- class TargetPrioritiesMixin(
- priority_list=
NOTHING, - ignore_unprioritized: bool =
False, - set_priority_list: bool =
False, - set_ignore_unprioritized: bool =
False, - ignore_unlisted_targets_condition: Any =
NOTHING, - *,
- extra_keys: dict[str, Any] | None =
None, Enables the entity to prioritize specific targets either statically or dynamically via the circuit network.
- ignore_unlisted_targets_condition : Condition¶
Serialized
This attribute is imported/exported from blueprint strings.
The condition to use when determining whether or not to ignore unprioritized targets dynamically via the circuit network.
Added in version 3.0.0: (Factorio 2.0)
- ignore_unprioritized : bool¶
Serialized
This attribute is imported/exported from blueprint strings.
Whether or not to entirely ignore enemies not present in it’s
priority_list. This value is overridden by the circuit network ifset_ignore_prioritizedisTrue.Added in version 3.0.0: (Factorio 2.0)
- priority_list : list[TargetID]¶
Serialized
This attribute is imported/exported from blueprint strings.
A (static) list of entities to prefer targeting. Overwritten by values given by the circuit network if
set_priority_listisTrue.Added in version 3.0.0: (Factorio 2.0)
- set_ignore_unprioritized : bool¶
Serialized
This attribute is imported/exported from blueprint strings.
If this value is
True, the turret will only ignore unprioritized targets if the conditionignore_unlisted_targets_conditionpasses.Added in version 3.0.0: (Factorio 2.0)
- set_priority_list : bool¶
Serialized
This attribute is imported/exported from blueprint strings.
Whether or not priority filters should be set via the circuit network.
Added in version 3.0.0: (Factorio 2.0)
- set_ignore_unlisted_targets_condition(
- first_operand: SignalID | None =
None, - comparator: '>' | '<' | '=' | '==' | '≥' | '>=' | '≤' | '<=' | '≠' | '!=' =
'<', - second_operand: SignalID | int =
0, Sets the condition under which non-prioritized targets should be ignored.
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.