mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
More options for better control over procurement
This commit is contained in:
parent
a4f5c290b5
commit
602f88dab9
@ -16,8 +16,6 @@ if TYPE_CHECKING:
|
|||||||
from game.factions.faction import Faction
|
from game.factions.faction import Faction
|
||||||
from game.squadrons import Squadron
|
from game.squadrons import Squadron
|
||||||
|
|
||||||
FRONTLINE_RESERVES_FACTOR = 1.3
|
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
@dataclass(frozen=True)
|
||||||
class AircraftProcurementRequest:
|
class AircraftProcurementRequest:
|
||||||
@ -258,7 +256,8 @@ class ProcurementAi:
|
|||||||
# No source of ground units, so can't buy anything.
|
# No source of ground units, so can't buy anything.
|
||||||
continue
|
continue
|
||||||
|
|
||||||
purchase_target = cp.frontline_unit_count_limit * FRONTLINE_RESERVES_FACTOR
|
fr_factor = self.game.settings.frontline_reserves_factor / 100.0
|
||||||
|
purchase_target = cp.frontline_unit_count_limit * fr_factor
|
||||||
allocated = cp.allocated_ground_units(
|
allocated = cp.allocated_ground_units(
|
||||||
self.game.coalition_for(self.is_player).transfers
|
self.game.coalition_for(self.is_player).transfers
|
||||||
)
|
)
|
||||||
|
|||||||
@ -286,7 +286,29 @@ class Settings:
|
|||||||
"spend its budget."
|
"spend its budget."
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
reserves_procurement_target: int = 10
|
frontline_reserves_factor: int = bounded_int_option(
|
||||||
|
"AI ground unit front-line reserves factor (%)",
|
||||||
|
CAMPAIGN_MANAGEMENT_PAGE,
|
||||||
|
HQ_AUTOMATION_SECTION,
|
||||||
|
min=0,
|
||||||
|
max=1000,
|
||||||
|
default=130,
|
||||||
|
detail=(
|
||||||
|
"Factor to be multiplied with the control point's unit count limit "
|
||||||
|
"to calculate the procurement target for reserve troops at front-lines."
|
||||||
|
),
|
||||||
|
)
|
||||||
|
reserves_procurement_target: int = bounded_int_option(
|
||||||
|
"AI ground unit reserves procurement target",
|
||||||
|
CAMPAIGN_MANAGEMENT_PAGE,
|
||||||
|
HQ_AUTOMATION_SECTION,
|
||||||
|
min=0,
|
||||||
|
max=1000,
|
||||||
|
default=10,
|
||||||
|
detail=(
|
||||||
|
"The number of units that will be bought as reserves for applicable control points"
|
||||||
|
),
|
||||||
|
)
|
||||||
|
|
||||||
# Mission Generator
|
# Mission Generator
|
||||||
# Gameplay
|
# Gameplay
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user