[Rseding91] [0.16.36][Modding] LuaPlayer.opened Returns nil Incorrectly

This subforum contains all the issues which we already resolved.
Post Reply
User avatar
DedlySpyder
Filter Inserter
Filter Inserter
Posts: 253
Joined: Fri Jun 20, 2014 11:42 am
Contact:

[Rseding91] [0.16.36][Modding] LuaPlayer.opened Returns nil Incorrectly

Post 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.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13928
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.16.36][Modding] LuaPlayer.opened Returns nil Incorrectly

Post 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.
If you want to get ahold of me I'm almost always on Discord.

User avatar
DedlySpyder
Filter Inserter
Filter Inserter
Posts: 253
Joined: Fri Jun 20, 2014 11:42 am
Contact:

Re: [Rseding91] [0.16.36][Modding] LuaPlayer.opened Returns nil Incorrectly

Post 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?

whoster
Manual Inserter
Manual Inserter
Posts: 2
Joined: Thu Nov 02, 2017 3:50 pm
Contact:

Re: [Rseding91] [0.16.36][Modding] LuaPlayer.opened Returns nil Incorrectly

Post 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.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13928
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [Rseding91] [0.16.36][Modding] LuaPlayer.opened Returns nil Incorrectly

Post by Rseding91 »

whoster wrote: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.
Yes, the mod author will need to fix his mod to account for it.
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Resolved Problems and Bugs”