mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Fix #1966 : Naming; replaced female_pilot_ratio by female_pilot_percentage
This commit is contained in:
@@ -33,7 +33,7 @@ class Squadron:
|
||||
livery: Optional[str]
|
||||
mission_types: tuple[FlightType, ...]
|
||||
operating_bases: OperatingBases
|
||||
female_pilot_ratio: int
|
||||
female_pilot_percentage: int
|
||||
|
||||
#: The pool of pilots that have not yet been assigned to the squadron. This only
|
||||
#: happens when a preset squadron defines more preset pilots than the squadron limit
|
||||
@@ -162,7 +162,7 @@ class Squadron:
|
||||
self.pilot_pool = self.pilot_pool[count:]
|
||||
count -= len(new_pilots)
|
||||
for _ in range(count):
|
||||
if random.randint(1, 100) > self.female_pilot_ratio:
|
||||
if random.randint(1, 100) > self.female_pilot_percentage:
|
||||
new_pilots.append(Pilot(self.faker.name_male()))
|
||||
else:
|
||||
new_pilots.append(Pilot(self.faker.name_female()))
|
||||
@@ -434,7 +434,7 @@ class Squadron:
|
||||
squadron_def.livery,
|
||||
squadron_def.mission_types,
|
||||
squadron_def.operating_bases,
|
||||
squadron_def.female_pilot_ratio,
|
||||
squadron_def.female_pilot_percentage,
|
||||
squadron_def.pilot_pool,
|
||||
coalition,
|
||||
game.settings,
|
||||
|
||||
@@ -27,7 +27,7 @@ class SquadronDef:
|
||||
livery: Optional[str]
|
||||
mission_types: tuple[FlightType, ...]
|
||||
operating_bases: OperatingBases
|
||||
female_pilot_ratio: int
|
||||
female_pilot_percentage: int
|
||||
pilot_pool: list[Pilot]
|
||||
claimed: bool = False
|
||||
|
||||
@@ -76,7 +76,7 @@ class SquadronDef:
|
||||
|
||||
pilots = [Pilot(n, player=False) for n in data.get("pilots", [])]
|
||||
pilots.extend([Pilot(n, player=True) for n in data.get("players", [])])
|
||||
female_pilot_ratio = data.get("female_pilot_ratio", 6)
|
||||
female_pilot_percentage = data.get("female_pilot_percentage", 6)
|
||||
|
||||
mission_types = [FlightType.from_name(n) for n in data["mission_types"]]
|
||||
tasks = tasks_for_aircraft(unit_type)
|
||||
@@ -97,6 +97,6 @@ class SquadronDef:
|
||||
livery=data.get("livery"),
|
||||
mission_types=tuple(mission_types),
|
||||
operating_bases=OperatingBases.from_yaml(unit_type, data.get("bases", {})),
|
||||
female_pilot_ratio=female_pilot_ratio,
|
||||
female_pilot_percentage=female_pilot_percentage,
|
||||
pilot_pool=pilots,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user