Closed mspielberg closed 4 years ago
I'd like to see all system events replaced by script_raised.
Event filtering only works for events raised by Factorio itself. Raising events like on_robot_built_entity in mods won't filter properly. Having just one mod raising system events requires all other mods to have additional filtering and validity checks in place.
Some thoughts on this. I do not plan on switching to script_raised in Nanobots. Mining currently uses player.mine events so for consistency the build events will use on_built events. (switched to player built in the latest release) Event filtering was introduced to reduce the overall amount of events you get. Just like checking for .valid you should still check that the event applies to you.
Klonan's Construction Drones uses the
script_raised_revive
event newly added in 0.17, by passingraise_event = true
to LuaEntity::revive. It would be nice to consolidate on this new event to simplify handling for other mods.