[0.16.45] on_gui_closed event not fired
[0.16.45] on_gui_closed event not fired
To reproduce: Build and open the gui of an assembler(1, 2 or 3), quick replace assembler to another level (3, 1, 2). gui will close but the event on_gui_closed will not be called. I have a mod https://mods.factorio.com/mod/Actual_Craft_Time that relies on this event. I expect either the gui to remain open or the event to be called. This also is true for stone and steel furnaces. As the event is not fired, a gui in my mod doesn't close and causes the game to crash when a new gui tries to be created as both will have the same name. I'll need to add a check if this is to be not fixed.
- Attachments
-
- factorio-current.log
- The log doesn't show anything about event calls, just the mod causing a crash which isn't useful.
- (14.41 KiB) Downloaded 84 times
Re: [0.16.45] on_gui_closed event not fired
Thanks for the report however this is working correctly. It's even documented on the event: http://lua-api.factorio.com/latest/even ... gui_closed
This is a limitation of how the game works when it comes to GUIs. The same behavior happens if you kill or call destroy() on the open entity.Note: This is only called if the player explicitly closed the GUI.
If you want to get ahold of me I'm almost always on Discord.
Re: [0.16.45] on_gui_closed event not fired
Very well, I'll make changes to my mod.