Add source entity argument to entity.damage
Posted: Wed Jan 15, 2020 3:03 am
https://lua-api.factorio.com/latest/Lua ... ity.damage
entity.damage() takes the arguments damage, force, and type, but does not allow you to specify a source. If I recall correctly, on_entity_damaged and on_entity_died events will then fire off with a nil source. I was working on a series of events that would be greatly simplified if I could just pass a source entity in entity.damage()
entity.damage() takes the arguments damage, force, and type, but does not allow you to specify a source. If I recall correctly, on_entity_damaged and on_entity_died events will then fire off with a nil source. I was working on a series of events that would be greatly simplified if I could just pass a source entity in entity.damage()