Fix possible crash when transitioning to Nauvis

This commit is contained in:
Simon Brodtmann 2025-08-22 16:28:27 +02:00
parent dd22ecb954
commit a78e3a5886
2 changed files with 16 additions and 3 deletions

View file

@ -115,7 +115,18 @@ local silo_ready = {
inventory_type = "normal", inventory_type = "normal",
quality_affects_inventory_size = false, quality_affects_inventory_size = false,
placeable_by = { item = "provisional-rocket-silo", count = 1 }, placeable_by = { item = "provisional-rocket-silo", count = 1 },
health = 1000, max_health = 1000,
resistances = {
{
type = "fire",
percent = 100
},
{
type = "explosion",
percent = 100
}
},
create_ghost_on_death = false,
surface_conditions = { surface_conditions = {
{ {
property = "pressure", property = "pressure",

View file

@ -61,8 +61,10 @@ local function transit_player(player_index)
local player = game.get_player(player_index) local player = game.get_player(player_index)
local transition = storage.transitions[player_index] local transition = storage.transitions[player_index]
transition.rocket_entry.cargo_pod.set_passenger(nil) if transition.rocket_entry.cargo_pod then
transition.rocket_entry.cargo_pod.destroy() transition.rocket_entry.cargo_pod.set_passenger(nil)
transition.rocket_entry.cargo_pod.destroy()
end
init_nauvis() init_nauvis()
teleport_player(player) teleport_player(player)