mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Add new performance option: Maximum frontline unit supply per CP
This commit is contained in:
parent
b74291f82a
commit
d08adc2842
@ -28,6 +28,7 @@ Saves from 5.x are not compatible with 6.0.
|
||||
* **[Campaign]** Allow campaign designers to define default values for the economy settings (starting budget and multiplier).
|
||||
* **[Plugins]** Allow full support of the SkynetIADS plugin with all advanced features (connection nodes, power sources, command centers) if campaign supports it.
|
||||
* **[Plugins]** Added support for the CTLD script by ciribob with many possible customization options and updated the JTAC Autolase to the CTLD included script.
|
||||
* **[Performance]** Added performance option: Maximum front-line unit supply per control point.
|
||||
|
||||
## Fixes
|
||||
|
||||
|
||||
@ -443,6 +443,27 @@ 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_frontline_units_max_supply: int = bounded_int_option(
|
||||
"Maximum frontline unit supply per control point",
|
||||
page=MISSION_GENERATOR_PAGE,
|
||||
section=PERFORMANCE_SECTION,
|
||||
default=60,
|
||||
min=10,
|
||||
max=300,
|
||||
causes_expensive_game_update=True,
|
||||
)
|
||||
perf_infantry: bool = boolean_option(
|
||||
"Generate infantry squads alongside vehicles",
|
||||
page=MISSION_GENERATOR_PAGE,
|
||||
|
||||
@ -976,11 +976,13 @@ class ControlPoint(MissionTarget, SidcDescribable, ABC):
|
||||
self.front_line_capacity_with(ammo_depot_count), self.base.total_armor
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def front_line_capacity_with(cls, ammo_depot_count: int) -> int:
|
||||
return (
|
||||
FREE_FRONTLINE_UNIT_SUPPLY
|
||||
+ ammo_depot_count * AMMO_DEPOT_FRONTLINE_UNIT_CONTRIBUTION
|
||||
def front_line_capacity_with(self, ammo_depot_count: int) -> int:
|
||||
return min(
|
||||
self.coalition.game.settings.perf_frontline_units_max_supply,
|
||||
(
|
||||
FREE_FRONTLINE_UNIT_SUPPLY
|
||||
+ ammo_depot_count * AMMO_DEPOT_FRONTLINE_UNIT_CONTRIBUTION
|
||||
),
|
||||
)
|
||||
|
||||
@property
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user