[Rseding91] Error when trying to open GUI by defines.gui_type
Posted: Fri Oct 25, 2024 8:28 am
According to LuaControl::opened, defines.gui_type is an allowed type for writing. In Factorio 1.1, we could use
to open the player/character GUI, or
to open – you've guessed it! – the blueprint library.
In the latest version, setting LuaControl::opened to defines.gui_type.none will close any opened GUI correctly, but setting it to any other type will result in an error like this:
I know that it doesn't make sense to use all types in defines.gui_type with LuaControl::opened, but it definitely does make sense for the following:
Please fix this so that setting LuaControl::opened to a numeric value defined in defines.gui_type will open the corresponding GUI – and I'd be extremely happy if you added 'tutorials' and 'factoriopedia' to defines.gui_type!
Code: Select all
/c game.player.opened = defines.gui_type.controller
Code: Select all
/c game.player.opened = defines.gui_type.blueprint_library
In the latest version, setting LuaControl::opened to defines.gui_type.none will close any opened GUI correctly, but setting it to any other type will result in an error like this:
Code: Select all
Cannot execute command. Error: Invalid type: 3
- achievement
- blueprint_library
- bonus
- controller
- global_electric_network
- logistic
- production
- trains
- none
Please fix this so that setting LuaControl::opened to a numeric value defined in defines.gui_type will open the corresponding GUI – and I'd be extremely happy if you added 'tutorials' and 'factoriopedia' to defines.gui_type!