Let's say I don't want water turrets to attack spawners and worms. Currently, I listen to on_entity_damaged; if the damage was dealt by a water turret and if the damaged entity was a spawner or a turret (the prototype worms are based on), I restore the health and set turret.shooting_target = nil. I believe it would be way cheaper UPS-wise if I could just set a property like "turret.blacklist_targets = { "unit-spawner", "turret" } directly in the prototype, so the turret wouldn't even try to attack such entities. (Something to that effect already exists in vanilla, with artillery turrets that automatically targeting spawners/worms only.)
It would be even better if we could make that like a filter:
Code: Select all
turret.blacklist_targets = {
{filter = "type", type = "unit-spawner"},
{filter = "type", type = "turret", mode = "or"},
{filter = "name", name = "small-worm", mode = "and"}
}
Is there any chance to get that implemented?