mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Add option to limit squadron sizes and begin full.
Adding temporarily as an option to make sure it's not a terrible idea, but the old mode will probably go away. Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1583. Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2808.
This commit is contained in:
@@ -238,6 +238,15 @@ def parse_args() -> argparse.Namespace:
|
||||
"--auto-procurement", action="store_true", help="Automate bluefor procurement."
|
||||
)
|
||||
|
||||
new_game.add_argument(
|
||||
"--use-new-squadron-rules",
|
||||
action="store_true",
|
||||
help=(
|
||||
"Limit the number of aircraft per squadron and begin the campaign with "
|
||||
"them at full strength."
|
||||
),
|
||||
)
|
||||
|
||||
new_game.add_argument(
|
||||
"--inverted", action="store_true", help="Invert the campaign."
|
||||
)
|
||||
@@ -280,6 +289,7 @@ def create_game(
|
||||
start_date: datetime,
|
||||
restrict_weapons_by_date: bool,
|
||||
advanced_iads: bool,
|
||||
use_new_squadron_rules: bool,
|
||||
) -> Game:
|
||||
first_start = liberation_install.init()
|
||||
if first_start:
|
||||
@@ -312,6 +322,7 @@ def create_game(
|
||||
enable_base_capture_cheat=cheats,
|
||||
enable_transfer_cheat=cheats,
|
||||
restrict_weapons_by_date=restrict_weapons_by_date,
|
||||
enable_squadron_aircraft_limits=use_new_squadron_rules,
|
||||
),
|
||||
GeneratorSettings(
|
||||
start_date=start_date,
|
||||
@@ -346,7 +357,7 @@ def create_game(
|
||||
),
|
||||
)
|
||||
game = generator.generate()
|
||||
game.begin_turn_0()
|
||||
game.begin_turn_0(squadrons_start_full=use_new_squadron_rules)
|
||||
return game
|
||||
|
||||
|
||||
@@ -438,6 +449,7 @@ def main():
|
||||
args.date,
|
||||
args.restrict_weapons_by_date,
|
||||
args.advanced_iads,
|
||||
args.use_new_squadron_rules,
|
||||
)
|
||||
if args.subcommand == "lint-weapons":
|
||||
lint_weapon_data_for_aircraft(AircraftType.named(args.aircraft))
|
||||
|
||||
Reference in New Issue
Block a user