Called when the player opens a GUI.
player_index: uint32 — The player closing the GUI.gui_type: defines.gui_type — The type of GUI that was opened.tile_position?: TilePosition — The position of the tile whose GUI was opened.equipment?: LuaEquipment — The equipment whose GUI was opened.entity?: LuaEntity — The entity or entity grid whose GUI was opened.item?: LuaItemStack — The item whose GUI was opened.other_player?: LuaPlayer — The other player whose GUI was opened.element?: LuaGuiElement — The custom GUI element that was opened.surface_index?: uint32 — The surface index of the global electric network whose GUI was opened.inventory?: LuaInventory — The script inventory whose GUI was opened.name: defines.events — Identifier of the eventtick: uint32 — Tick the event was generated.