From a170a05bc975f1df3bfbb5132cacd75794ac66f4 Mon Sep 17 00:00:00 2001 From: danielmartin0 Date: Thu, 2 Jun 2022 15:32:27 +0100 Subject: [PATCH] fix: all silos should die, not just one --- maps/pirates/api_events.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/maps/pirates/api_events.lua b/maps/pirates/api_events.lua index 58c187f6..70256e68 100644 --- a/maps/pirates/api_events.lua +++ b/maps/pirates/api_events.lua @@ -1626,8 +1626,13 @@ local function event_on_rocket_launched(event) Quest.try_resolve_quest() end - if destination.dynamic_data.rocketsilos and destination.dynamic_data.rocketsilos[1] and destination.dynamic_data.rocketsilos[1].valid then - destination.dynamic_data.rocketsilos[1].die() + if destination.dynamic_data.rocketsilos then + for i = 1, #destination.dynamic_data.rocketsilos do + local s = destination.dynamic_data.rocketsilos[i] + if s and s.valid then + s.die() + end + end destination.dynamic_data.rocketsilos = nil end end