Page 1 of 1

[0.18.14] on_gui_closed and player.opened = gui issue

Posted: Wed Mar 18, 2020 11:12 pm
by bobingabout
It seems that the recent update to 0.18.14 has broken the way assigning a custom GUI to player.opened works.
Even though I have specific conditions on on_gui_closed to look for my GUI and only close it if it's an appropriate time to do so, it's instantly closing anyway when I assign it to player.opened, causing my inserters mod to crash.
Definitely works fine in 0.18.12, 0.18.13 unconfirmed, but since people are reporting specifically that my mod broke in 0.18.14, I suspect it works in 0.18.13.

To cause these issues, use my inserters mod: https://mods.factorio.com/mod/bobinserters
Point to an inserter, press SHIFT+E, or CTRL+E to open the "Screen" GUI. (It also opens on the left when you click an inserter to open the inserter GUI, but that one isn't crashing because it's not using player.opened = gui)

Re: [0.18.14] on_gui_closed and player.opened = gui issue

Posted: Wed Mar 18, 2020 11:18 pm
by bobingabout
After looking at other bugs, it may be an issue with defines.gui_type.custom, which I initially didn't see because it's in the "resolved for next release" section.

Please could you confirm my mod works with the fix before marking it as duplicate.

Re: [0.18.14] on_gui_closed and player.opened = gui issue

Posted: Thu Mar 19, 2020 7:30 pm
by Rseding91
Confirmed it works correctly in the next release.

Re: [0.18.14] on_gui_closed and player.opened = gui issue

Posted: Fri Mar 20, 2020 12:28 am
by bobingabout
Thank you.