Code: Select all
data.raw[WT.turret_type][WT.extinguisher_turret_name].attack_target_mask = {
WT.trigger_target_dummy,
}
entity.trigger_target_mask = {WT.trigger_target_dummy}
(Just an idea: The target entities are based on simple-entity-with-force, so once they've been placed, they won't move. Could it be that turrets react when they notice that an entity or unit is moving into their attack distance?)
Something else: How does attack_parameters.fire_penalty work? The wiki has this:
Code: Select all
fire_penalty
Type: Types/float
Default: 0
Used when searching for the nearest enemy, when this is > 0, enemies that aren't burning are preferred over burning enemies. Definition of "burning" for this: Entity has sticker attached to it, and the sticker has a spread_fire_entity set.
Code: Select all
A higher penalty will discourage turrets from targeting units with higher health. A negative penalty will encourage turrets to target units with higher health.