Add removed LuaEquipment instance to events

Things that we aren't going to implement
Post Reply
SWeini
Inserter
Inserter
Posts: 39
Joined: Mon Apr 04, 2022 6:43 am
Contact:

Add removed LuaEquipment instance to events

Post by SWeini »

For my mod I'm currently missing a way to recover the fuel's burnt_result when a player removes a burner-powered equipment from an equipment grid. There are on_player_removed_equipment and on_equipment_removed events, but they only contain the prototype of the removed equipment (and count), not the instance(s) containing the relevant burner instance.

And yes, there are mods using burner-powered equipment which is even spitting out fuel containers.

User avatar
raiguard
Factorio Staff
Factorio Staff
Posts: 565
Joined: Wed Dec 13, 2017 8:29 pm
Contact:

Re: Add removed LuaEquipment instance to events

Post by raiguard »

The reason that these events don't have LuaEquipment instances is that by the time these events are raised, the equipments no longer exist in the game. So there is nothing to bind the LuaEquipment to.
Don't forget, you're here forever.

Post Reply

Return to “Won't implement”