[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
Fast Inserter
Fast Inserter
Posts: 220
Joined: Fri Jun 20, 2014 11:42 am
Contact:

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

Post by DedlySpyder » Mon Apr 23, 2018 12:14 am

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: 9481
Joined: Wed Jun 11, 2014 5:23 am
Contact:

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

Post by Rseding91 » Mon Apr 23, 2018 7:03 am

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
Fast Inserter
Fast Inserter
Posts: 220
Joined: Fri Jun 20, 2014 11:42 am
Contact:

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

Post by DedlySpyder » Mon Apr 23, 2018 10:47 am

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: 1
Joined: Thu Nov 02, 2017 3:50 pm
Contact:

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

Post by whoster » Tue May 15, 2018 4:34 pm

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: 9481
Joined: Wed Jun 11, 2014 5:23 am
Contact:

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

Post by Rseding91 » Tue May 15, 2018 6:33 pm

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”

Who is online

Users browsing this forum: No registered users