Generate unit_id for helipads

fixes mission scripting error (1748)
This commit is contained in:
RndName 2021-11-21 15:18:39 +01:00
parent 9e92c87351
commit 676a25631b
No known key found for this signature in database
GPG Key ID: 5EF516FD9537F7C0
2 changed files with 2 additions and 1 deletions

View File

@ -11,6 +11,7 @@ Saves from 5.x are not compatible with 6.0.
## Fixes ## Fixes
* **[Mission Generator]** Fixed incorrect radio specification for the AN/ARC-222. * **[Mission Generator]** Fixed incorrect radio specification for the AN/ARC-222.
* **[Mission Generator]** Fixed mission scripting error when using a dedicated server.
# 5.0.0 # 5.0.0

View File

@ -600,7 +600,7 @@ class HelipadGenerator:
for i, helipad in enumerate(self.cp.helipads): for i, helipad in enumerate(self.cp.helipads):
name = self.cp.name + "_helipad_" + str(i) name = self.cp.name + "_helipad_" + str(i)
logging.info("Generating helipad static : " + name) logging.info("Generating helipad static : " + name)
pad = InvisibleFARP(name=name) pad = InvisibleFARP(unit_id=self.m.next_unit_id(), name=name)
pad.position = Point(helipad.x, helipad.y) pad.position = Point(helipad.x, helipad.y)
pad.heading = helipad.heading.degrees pad.heading = helipad.heading.degrees
sg = unitgroup.StaticGroup(self.m.next_group_id(), name) sg = unitgroup.StaticGroup(self.m.next_group_id(), name)