From b31c09c4ff72b15009b69876e1581b1cfd651d7c Mon Sep 17 00:00:00 2001 From: RndName Date: Sun, 8 Aug 2021 13:16:39 +0200 Subject: [PATCH] Fix AAA Flak generator using wrong index - Fixes #1519 as the Opel Blitz unit generator was using the index without incrementing it --- changelog.md | 1 + gen/sam/aaa_flak.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/changelog.md b/changelog.md index bc23f7b6..85bb4d12 100644 --- a/changelog.md +++ b/changelog.md @@ -61,6 +61,7 @@ Saves from 4.0.0 are compatible with 4.1.0. * **[Mission Generation]** Prevent the creation of a transfer order with 0 units for a rare situtation when a point was captured. * **[Mission Generation]** Planned transfers which will be impossible after a base capture will no longer prevent the mission result submit. * **[Mission Generation]** Fix occasional KeyError preventing mission generation when all units of the same type in a convoy were killed. +* **[Mission Generation]** Fix for AAA Flak generator using Opel Blitz preventing the mission from being generated because duplicate unit names were used. * **[Mission Generation]** Fixed a potential bug with laser code generation where it would generate invalid codes. * **[UI]** Statistics window tick marks are now always integers. * **[UI]** Statistics window now shows the correct info for the turn diff --git a/gen/sam/aaa_flak.py b/gen/sam/aaa_flak.py index 0e27a8d2..72f6fb2e 100644 --- a/gen/sam/aaa_flak.py +++ b/gen/sam/aaa_flak.py @@ -82,8 +82,10 @@ class FlakGenerator(AirDefenseGroupGenerator): ) # Some Opel Blitz trucks + index = 0 for i in range(int(max(1, 2))): for j in range(int(max(1, 2))): + index += 1 self.add_unit( Unarmed.Blitz_36_6700A, "BLITZ#" + str(index),