From b7c0c6697adfe75b329642d7462901ebe10422fe Mon Sep 17 00:00:00 2001 From: danielmartin0 Date: Thu, 2 Jun 2022 13:36:44 +0100 Subject: [PATCH] rocket now blows up after you launch it --- maps/pirates/api_events.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/maps/pirates/api_events.lua b/maps/pirates/api_events.lua index e9e7ca24..4e6d1e49 100644 --- a/maps/pirates/api_events.lua +++ b/maps/pirates/api_events.lua @@ -1610,7 +1610,6 @@ local function event_on_rocket_launched(event) local a = Balance.rocket_launch_coin_reward Common.give_items_to_crew({{name = 'coin', count = a}}) memory.playtesting_stats.coins_gained_by_rocket_launches = memory.playtesting_stats.coins_gained_by_rocket_launches + a - end local force = memory.force @@ -1626,6 +1625,11 @@ local function event_on_rocket_launched(event) destination.dynamic_data.quest_progress = destination.dynamic_data.rocketsilohp 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() + destination.dynamic_data.rocketsilos = nil + end end