Fix potential crash when escaping to Nauvis
This commit is contained in:
parent
eb6b0d6384
commit
e4fdd67bdf
1 changed files with 5 additions and 3 deletions
|
@ -73,10 +73,12 @@ local function transit_player(player_index)
|
|||
-- Give the player the content of the rocket
|
||||
if transition.rocket_entry.rocket_content then
|
||||
local inventory = player.get_main_inventory()
|
||||
for _, item in pairs(transition.rocket_entry.rocket_content) do
|
||||
inventory.insert(item)
|
||||
if inventory then
|
||||
for _, item in pairs(transition.rocket_entry.rocket_content) do
|
||||
inventory.insert(item)
|
||||
end
|
||||
inventory.sort_and_merge()
|
||||
end
|
||||
inventory.sort_and_merge()
|
||||
end
|
||||
table.remove(storage.rocket_silos, transition.rocket_entry_index)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue