Can't set player.opened to vehicle equipment grid?

Place to get help with not working mods / modding interface.
Jtmzac
Manual Inserter
Manual Inserter
Posts: 1
Joined: Fri Nov 15, 2024 7:02 am
Contact:

Can't set player.opened to vehicle equipment grid?

Post by Jtmzac »

I'm swapping out a vehicle entity based on equipment placed in its grid, and if a player is the one to place the equipment then they will have the equipment grid GUI of the old vehicle open.
Destroying the old vehicle closes this GUI so to make it more invisible to the player I thought I could open the new vehicles equipment grid automatically.

However setting:

Code: Select all

player.opened = vehicle.grid
doesn't work at all. It doesn't close any existing GUI's and doesn't open the expected equipment grid.
I tested with a tank from the base game instead of my custom prototype and it doesn't work for that either.

Meanwhile

Code: Select all

player.opened = vehicle
works just fine for opening the general vehicle inventory.

Am I doing something wrong? Are vehicle equipment grids not supported? Or is this a bug?
Post Reply

Return to “Modding help”