From a78e3a5886874a0749ecce8be0ae9fe67964bc18 Mon Sep 17 00:00:00 2001 From: Simon Brodtmann Date: Fri, 22 Aug 2025 16:28:27 +0200 Subject: [PATCH] Fix possible crash when transitioning to Nauvis --- lignumis/prototypes/content/wooden-rocket-silo.lua | 13 ++++++++++++- lignumis/scripts/to-nauvis.lua | 6 ++++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/lignumis/prototypes/content/wooden-rocket-silo.lua b/lignumis/prototypes/content/wooden-rocket-silo.lua index 4bfb828..9cfa7c3 100644 --- a/lignumis/prototypes/content/wooden-rocket-silo.lua +++ b/lignumis/prototypes/content/wooden-rocket-silo.lua @@ -115,7 +115,18 @@ local silo_ready = { inventory_type = "normal", quality_affects_inventory_size = false, 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 = { { property = "pressure", diff --git a/lignumis/scripts/to-nauvis.lua b/lignumis/scripts/to-nauvis.lua index 27cffdd..5d3d432 100644 --- a/lignumis/scripts/to-nauvis.lua +++ b/lignumis/scripts/to-nauvis.lua @@ -61,8 +61,10 @@ local function transit_player(player_index) local player = game.get_player(player_index) local transition = storage.transitions[player_index] - transition.rocket_entry.cargo_pod.set_passenger(nil) - transition.rocket_entry.cargo_pod.destroy() + if transition.rocket_entry.cargo_pod then + transition.rocket_entry.cargo_pod.set_passenger(nil) + transition.rocket_entry.cargo_pod.destroy() + end init_nauvis() teleport_player(player)