Improve the optional unit handling in layouts

added the fill property to the layout groups which allows to specify if a optional layout group should be filled with a faction accessible unit if it was not defined by the preset groups. This is usefull to allow more generalized templates which for example may or may not have a Search Radar without adding one to all layouts (example: Rapier and Roland Sites which use the generic SHORAD layout)

this fixes an issue which prevented optional units like logistics to be added to the forcegroup if they were not defined in the preset group yaml
This commit is contained in:
RndName
2022-03-21 20:17:17 +01:00
parent 923549ef69
commit 4ace13c857
9 changed files with 51 additions and 3 deletions

View File

@@ -12,12 +12,14 @@ groups:
- SearchTrackRadar
- name: Track Radar
optional: true # Allow groups without TR
fill: false # Do not fill with faction possible units
unit_count:
- 1
unit_classes:
- TrackRadar
- name: Command Post
optional: true
fill: false # Do not fill with faction possible units
unit_count:
- 1
unit_classes:

View File

@@ -12,17 +12,18 @@ groups:
- SearchTrackRadar
- name: Track Radar
optional: true # Allow groups without TR
fill: false # Do not fill with faction possible units
unit_count:
- 1
unit_classes:
- TrackRadar
- name: Command Post
optional: true
fill: false # Do not fill with faction possible units
unit_count:
- 1
unit_classes:
- CommandPost
- name: Launcher
unit_count:
- 6

View File

@@ -3,8 +3,9 @@ tasks:
- AAA
groups:
- AAA:
- name: Cold War Flak Site Radar
- name: Cold War Flak Site Radar
optional: true # Only available to Late Cold War
fill: false # Do not fill with faction possible units
unit_count:
- 1
unit_classes:

View File

@@ -5,6 +5,7 @@ groups:
- SHORAD:
- name: SHORAD STR
optional: true
fill: false # Do not fill with faction possible units
unit_count:
- 1
unit_classes:
@@ -13,6 +14,7 @@ groups:
- TrackRadar
- name: SHORAD OTR
optional: true
fill: false # Do not fill with faction possible units
unit_count:
- 1
unit_classes: