diff --git a/changelog.md b/changelog.md index 616f2aabd..1d45037d1 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,8 @@ +# 2.3.4 + +## Fixes: +* **[Mission Generator]** Mission generator would crash when generating fire missions for destroyed SCUD sites - fixed + # 2.3.3 ## Features/Improvements diff --git a/game/version.py b/game/version.py index 0a4d2acb5..c09b6e153 100644 --- a/game/version.py +++ b/game/version.py @@ -2,7 +2,7 @@ def _build_version_string() -> str: - components = ["2.3.3"] + components = ["2.3.4"] build_number_path = Path("resources/buildnumber") if build_number_path.exists(): with build_number_path.open("r") as build_number_file: diff --git a/gen/groundobjectsgen.py b/gen/groundobjectsgen.py index 57a5544e1..672f7c1df 100644 --- a/gen/groundobjectsgen.py +++ b/gen/groundobjectsgen.py @@ -121,12 +121,15 @@ def generate(self) -> None: # TODO : Add delay to task to spread fire task over mission duration ? for group in self.ground_object.groups: vg = self.m.find_group(group.name) - targets = self.possible_missile_targets(vg) - if vg is not None and targets: - target = random.choice(targets) - real_target = target.point_from_heading(random.randint(0, 360), random.randint(0, 2500)) - vg.points[0].add_task(FireAtPoint(real_target)) - logging.info("Set up fire task for missile group.") + if vg is not None: + targets = self.possible_missile_targets(vg) + if targets: + target = random.choice(targets) + real_target = target.point_from_heading(random.randint(0, 360), random.randint(0, 2500)) + vg.points[0].add_task(FireAtPoint(real_target)) + logging.info("Set up fire task for missile group.") + else: + logging.info("Couldn't setup missile site to fire, no valid target in range.") else: logging.info("Couldn't setup missile site to fire, group was not generated.")