Skip to content

Commit

Permalink
Merge pull request #698 from Khopa/develop_2_3_x
Browse files Browse the repository at this point in the history
Release 2.3.4
  • Loading branch information
Khopa authored Dec 31, 2020
2 parents 64c424b + 4a483c3 commit 068f9e4
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
5 changes: 5 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion game/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
15 changes: 9 additions & 6 deletions gen/groundobjectsgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.")

Expand Down

0 comments on commit 068f9e4

Please sign in to comment.