forked from cacklingfiend/lignumis
Don't show launch GUI when the player is not a character
This commit is contained in:
parent
30be519be9
commit
cbfb816ac6
1 changed files with 1 additions and 0 deletions
|
@ -59,6 +59,7 @@ local function on_gui_opened(event)
|
||||||
if not entity or not entity.valid then return end
|
if not entity or not entity.valid then return end
|
||||||
if entity.name ~= "provisional-rocket-silo-ready" then return end
|
if entity.name ~= "provisional-rocket-silo-ready" then return end
|
||||||
local player = game.get_player(event.player_index)
|
local player = game.get_player(event.player_index)
|
||||||
|
if player.controller_type ~= defines.controllers.character then return end
|
||||||
|
|
||||||
if player.gui.relative["provisional-rocket-silo-relative-frame"] then
|
if player.gui.relative["provisional-rocket-silo-relative-frame"] then
|
||||||
player.gui.relative["provisional-rocket-silo-relative-frame"].destroy()
|
player.gui.relative["provisional-rocket-silo-relative-frame"].destroy()
|
||||||
|
|
Loading…
Add table
Reference in a new issue