Compare commits
2 commits
6ddb7d2e27
...
dc79de6e97
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dc79de6e97 | ||
|
|
e7197e23b7 |
1 changed files with 6 additions and 2 deletions
|
|
@ -77,19 +77,23 @@ end
|
||||||
-- Watch Nauvis being visited for the first time
|
-- Watch Nauvis being visited for the first time
|
||||||
Init.events[defines.events.on_player_changed_surface] = function(event)
|
Init.events[defines.events.on_player_changed_surface] = function(event)
|
||||||
local player = game.get_player(event.player_index)
|
local player = game.get_player(event.player_index)
|
||||||
|
local first_visit = storage.nauvis_visited == false
|
||||||
|
|
||||||
if player.controller_type ~= defines.controllers.character then return end
|
if player.controller_type ~= defines.controllers.character then return end
|
||||||
|
|
||||||
if player and player.surface.name == storage.target_planet then
|
if player and player.physical_surface.name == storage.target_planet then
|
||||||
storage.nauvis_visited = true
|
storage.nauvis_visited = true
|
||||||
end
|
end
|
||||||
|
|
||||||
if player and player.surface.name ~= "lignumis" and player.force then
|
if player and player.physical_surface.name ~= "lignumis" and player.force then
|
||||||
local automation = player.force.technologies["automation-science-pack"]
|
local automation = player.force.technologies["automation-science-pack"]
|
||||||
if not automation.researched then
|
if not automation.researched then
|
||||||
automation.enabled = true
|
automation.enabled = true
|
||||||
automation.researched = true
|
automation.researched = true
|
||||||
end
|
end
|
||||||
|
if first_visit then
|
||||||
|
game.forces.enemy.set_evolution_factor(0.0, storage.target_planet)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue