Page 1 of 1
[Rseding91] [0.16.36][Modding] LuaPlayer.opened Returns nil Incorrectly
Posted: Mon Apr 23, 2018 12:14 am
by DedlySpyder
LuaPlayer.opened is returning nil when the player has either the main inventory open or an armor's equipment grid open. The main inventory isn't that big of a deal, personally, since we have LuaPlayer.opened_self, but the equipment grid is a problem as there isn't another way to know if it's opened.
Re: [0.16.36][Modding] LuaPlayer.opened Returns nil Incorrectly
Posted: Mon Apr 23, 2018 7:03 am
by Rseding91
You want to use
http://lua-api.factorio.com/latest/LuaC ... d_gui_type to tell what type of GUi is open. I'll fix the not returning the equipment grid when open.
Re: [Rseding91] [0.16.36][Modding] LuaPlayer.opened Returns nil Incorrectly
Posted: Mon Apr 23, 2018 10:47 am
by DedlySpyder
Ok, that's where I was confused I guess, LuaPlayer.opened returns defines.gui_type as well. Does that mean that there is overlap between these two, or is that possibly just outdated information in the lua-api?
Re: [Rseding91] [0.16.36][Modding] LuaPlayer.opened Returns nil Incorrectly
Posted: Tue May 15, 2018 4:34 pm
by whoster
Is this 'fix' the cause of this bug:
https://mods.factorio.com/mod/BlackMark ... 000be70df5
https://mods.factorio.com/mod/BlackMark ... 000a7c7f23
The black market mod hasn't changed in 4 months. I'm having this error and can't progress my current game.
Re: [Rseding91] [0.16.36][Modding] LuaPlayer.opened Returns nil Incorrectly
Posted: Tue May 15, 2018 6:33 pm
by Rseding91
Yes, the mod author will need to fix his mod to account for it.