Fix some possible errors with the wooden rocket silo
This commit is contained in:
parent
829e32acd4
commit
6ddb7d2e27
1 changed files with 3 additions and 2 deletions
|
|
@ -87,16 +87,17 @@ local function launch(event)
|
|||
if event.element.name ~= "provisional-rocket-silo-launch-button" then return end
|
||||
local player = game.get_player(event.player_index)
|
||||
local fake_silo = storage.rocket_silo_guis[player.index].fake_silo
|
||||
if not fake_silo.valid then return end
|
||||
rocket_content = fake_silo.get_inventory(defines.inventory.chest).get_contents()
|
||||
for _, entry in pairs(storage.rocket_silos) do
|
||||
if entry.fake_silo == fake_silo then
|
||||
if entry.fake_silo == fake_silo and entry.real_silo.valid and entry.real_silo.rocket.valid then
|
||||
entry.player = event.player_index
|
||||
entry.rocket_content = rocket_content
|
||||
entry.cargo_pod = entry.real_silo.rocket.attached_cargo_pod
|
||||
fake_silo.destroy()
|
||||
entry.real_silo.launch_rocket()
|
||||
entry.cargo_pod.set_passenger(player)
|
||||
break
|
||||
return
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue