Compare commits

..

2 commits

Author SHA1 Message Date
Simon Brodtmann
74eb162d9a Remove enemies from starting area when leaving Lignumis 2025-09-28 11:36:00 +02:00
Simon Brodtmann
429e8a3a41 Readme 2025-09-28 11:35:25 +02:00
2 changed files with 18 additions and 0 deletions

View file

@ -74,6 +74,8 @@ Alternatives: [Burner Leech Fork](https://mods.factorio.com/mod/Burner-Leech-For
- [Wooden Fulgora: Coralmium Agriculture](https://mods.factorio.com/mod/fulgora-coralmium-agriculture)
- [Wooden Aquilo: Seabloom Algaculture](https://mods.factorio.com/mod/aquilo-seabloom-algaculture)
- [Wooden Cerys: Lunaponics](https://mods.factorio.com/mod/cerys-lunaponics)
- [Wooden Moshine: Solaponics](https://mods.factorio.com/mod/moshine-solaponics)
#### [Any Planet Start](https://mods.factorio.com/mod/any-planet-start)

View file

@ -25,6 +25,21 @@ local function init_nauvis()
end
-- Removes enemies around the crash site to not mess with the player start
local function clear_enemies()
local nauvis = game.planets[storage.target_planet].surface
local enemies = nauvis.find_entities_filtered({
position = { 0, 0 },
radius = 200,
force = "enemy"
})
for _, enemy in pairs(enemies) do
enemy.destroy()
end
end
-- Teleport player to Nauvis and show welcome message
local function teleport_player(player)
local nauvis = game.planets[storage.target_planet].surface
@ -67,6 +82,7 @@ local function transit_player(player_index)
end
init_nauvis()
clear_enemies()
teleport_player(player)
init_freeplay()