Allow setting filters for events on the damage done for on_entity_damaged

randomdude
Inserter
Inserter
Posts: 43
Joined: Mon Mar 12, 2018 9:01 am
Contact:

Allow setting filters for events on the damage done for on_entity_damaged

Post by randomdude »

Use cases:

- Biters seem to trigger on_entity_damaged walking around and crashing into each other. However, all these events are always 0 final_damage_amount, and hence, not that useful imo
- Spitters shooting walls trigger it too, and i guess the reduction or something is triggering 0 final_damage_amount also.


Alternatively, would just skipping events that will do 0 final damage have any bad consequence?
Bilka
Factorio Staff
Factorio Staff
Posts: 3310
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Allow setting filters for events on the damage done for on_entity_damaged

Post by Bilka »

Okay, I added "original-damage-amount", "final-damage-amount" and "damage-type" filters to the on_entity_damaged event filters for the next version. Although the damage system is now automatically skipped for damage of 0 (viewtopic.php?p=472758#p472758), it may still be useful in other cases.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
Post Reply

Return to “Implemented mod requests”