Don't trigger changing surface trigger for non player controllers
This commit is contained in:
parent
fb2b9f8b1f
commit
376052c38a
1 changed files with 3 additions and 0 deletions
|
@ -88,6 +88,9 @@ end
|
|||
-- Watch Nauvis being visited for the first time
|
||||
Init.events[defines.events.on_player_changed_surface] = function(event)
|
||||
local player = game.get_player(event.player_index)
|
||||
|
||||
if player.controller_type ~= defines.controllers.character then return end
|
||||
|
||||
if player and player.surface.name == "nauvis" then
|
||||
storage.nauvis_visited = true
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue