[Rseding91] [2.0.23] Cannot set LuaPlayer opened to equipment grid

This subforum contains all the issues which we already resolved.
haih_ys
Manual Inserter
Manual Inserter
Posts: 4
Joined: Thu Aug 01, 2019 1:13 pm
Contact:

[Rseding91] [2.0.23] Cannot set LuaPlayer opened to equipment grid

Post by haih_ys »

It seems you cannot set LuaPlayer member opened to a vehicle's equipment grid.

To reproduce, place this in control.lua. Confirm that when entering a tank the tank's GUI is automatically opened.

Code: Select all

script.on_event(defines.events.on_tick, function(e)
    for index, player in pairs(game.connected_players) do
        if player and player.driving and player.vehicle then
            player.opened = player.vehicle
        end
    end
end)
Now place this in control.lua. Confirm that when entering a tank no GUI is opened

Code: Select all

script.on_event(defines.events.on_tick, function(e)
    for index, player in pairs(game.connected_players) do
        if player and player.driving and player.vehicle then
            assert(player.vehicle.grid)
            player.opened = player.vehicle.grid
        end
    end
end)
Attachments
factorio-current.log
(6.21 KiB) Downloaded 9 times
Rseding91
Factorio Staff
Factorio Staff
Posts: 14594
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [Rseding91] [2.0.23] Cannot set LuaPlayer opened to equipment grid

Post by Rseding91 »

Thanks for the report. This is now fixed for the next release.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Resolved Problems and Bugs”