New performance option: disable convoys

Co-Authored-By: MetalStormGhost <89945461+MetalStormGhost@users.noreply.github.com>
This commit is contained in:
Raffson 2022-09-25 20:12:37 +02:00
parent cb36163bee
commit a81b4ffd05
No known key found for this signature in database
GPG Key ID: B0402B2C9B764D99
3 changed files with 11 additions and 9 deletions

View File

@ -7,6 +7,7 @@
* **[Modding]** Support for Su-30 mod version 2.01B
* **[UI]** Add livery selector to Air Wing Configurator's squadrons.
* **[Performance]** Added performance option: Maximum front-line unit supply per control point.
* **[Performance]** Added performance option: Disable convoys.
# Liberation:

View File

@ -27,9 +27,10 @@ class ConvoyGenerator:
def generate(self) -> None:
# Reset the count to make generation deterministic.
for coalition in self.game.coalitions:
for convoy in coalition.transfers.convoys:
self.generate_convoy(convoy)
if not self.game.settings.perf_disable_convoys:
for coalition in self.game.coalitions:
for convoy in coalition.transfers.convoys:
self.generate_convoy(convoy)
def generate_convoy(self, convoy: Convoy) -> VehicleGroup:
group = self._create_mixed_unit_group(

View File

@ -443,18 +443,18 @@ class Settings:
section=PERFORMANCE_SECTION,
default=True,
)
# perf_disable_convoys: bool = boolean_option(
# "Disable convoys",
# page=MISSION_GENERATOR_PAGE,
# section=PERFORMANCE_SECTION,
# default=False,
# )
# perf_frontline_units_prefer_roads: bool = boolean_option(
# "Front line troops prefer roads",
# page=MISSION_GENERATOR_PAGE,
# section=PERFORMANCE_SECTION,
# default=False,
# )
perf_disable_convoys: bool = boolean_option(
"Disable convoys",
page=MISSION_GENERATOR_PAGE,
section=PERFORMANCE_SECTION,
default=False,
)
perf_frontline_units_max_supply: int = bounded_int_option(
"Maximum frontline unit supply per control point",
page=MISSION_GENERATOR_PAGE,