mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
Set units on the frontline to Hidden On MFD. (#2669)
All groups (friendly and enemy) that are part of the front line are set to `Hidden On MFD`. This is a group level filter, and can not be applied on a per unit basis.
This commit is contained in:
parent
5db82f733f
commit
321de8d4ec
@ -4,6 +4,8 @@ Saves from 6.x are not compatible with 7.0.
|
||||
|
||||
## Features/Improvements
|
||||
|
||||
* **[Mission Generation]** Units on the front line are now hidden on MFDs.
|
||||
|
||||
## Fixes
|
||||
|
||||
# 6.1.0
|
||||
|
||||
@ -215,7 +215,7 @@ class FlotGenerator:
|
||||
u = random.choices(
|
||||
manpads, weights=[m.spawn_weight for m in manpads]
|
||||
)[0]
|
||||
self.mission.vehicle_group(
|
||||
infantry_group = self.mission.vehicle_group(
|
||||
side,
|
||||
namegen.next_infantry_name(side, u),
|
||||
u.dcs_unit_type,
|
||||
@ -224,6 +224,7 @@ class FlotGenerator:
|
||||
heading=forward_heading.degrees,
|
||||
move_formation=PointAction.OffRoad,
|
||||
)
|
||||
infantry_group.hidden_on_mfd = True
|
||||
return
|
||||
|
||||
possible_infantry_units = set(faction.infantry_with_class(UnitClass.INFANTRY))
|
||||
@ -240,7 +241,7 @@ class FlotGenerator:
|
||||
weights=[u.spawn_weight for u in infantry_choices],
|
||||
k=INFANTRY_GROUP_SIZE,
|
||||
)
|
||||
self.mission.vehicle_group(
|
||||
infantry_group = self.mission.vehicle_group(
|
||||
side,
|
||||
namegen.next_infantry_name(side, units[0]),
|
||||
units[0].dcs_unit_type,
|
||||
@ -249,10 +250,11 @@ class FlotGenerator:
|
||||
heading=forward_heading.degrees,
|
||||
move_formation=PointAction.OffRoad,
|
||||
)
|
||||
infantry_group.hidden_on_mfd = True
|
||||
|
||||
for unit in units[1:]:
|
||||
position = infantry_position.random_point_within(55, 5)
|
||||
self.mission.vehicle_group(
|
||||
infantry_group = self.mission.vehicle_group(
|
||||
side,
|
||||
namegen.next_infantry_name(side, unit),
|
||||
unit.dcs_unit_type,
|
||||
@ -261,6 +263,7 @@ class FlotGenerator:
|
||||
heading=forward_heading.degrees,
|
||||
move_formation=PointAction.OffRoad,
|
||||
)
|
||||
infantry_group.hidden_on_mfd = True
|
||||
|
||||
def _set_reform_waypoint(
|
||||
self, dcs_group: VehicleGroup, forward_heading: Heading
|
||||
@ -771,6 +774,7 @@ class FlotGenerator:
|
||||
group_size=count,
|
||||
heading=heading.degrees,
|
||||
)
|
||||
group.hidden_on_mfd = True
|
||||
|
||||
self.unit_map.add_front_line_units(group, cp, unit_type)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user