mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Fix the command-line campaign generator for IADS.
This commit is contained in:
parent
51b9d80488
commit
21199d9a24
@ -231,6 +231,10 @@ def parse_args() -> argparse.Namespace:
|
|||||||
|
|
||||||
new_game.add_argument("--cheats", action="store_true", help="Enable cheats.")
|
new_game.add_argument("--cheats", action="store_true", help="Enable cheats.")
|
||||||
|
|
||||||
|
new_game.add_argument(
|
||||||
|
"--advanced-iads", action="store_true", help="Enable advanced IADS."
|
||||||
|
)
|
||||||
|
|
||||||
lint_weapons = subparsers.add_parser("lint-weapons")
|
lint_weapons = subparsers.add_parser("lint-weapons")
|
||||||
lint_weapons.add_argument("aircraft", help="Name of the aircraft variant to lint.")
|
lint_weapons.add_argument("aircraft", help="Name of the aircraft variant to lint.")
|
||||||
|
|
||||||
@ -247,6 +251,7 @@ def create_game(
|
|||||||
cheats: bool,
|
cheats: bool,
|
||||||
start_date: datetime,
|
start_date: datetime,
|
||||||
restrict_weapons_by_date: bool,
|
restrict_weapons_by_date: bool,
|
||||||
|
advanced_iads: bool,
|
||||||
) -> Game:
|
) -> Game:
|
||||||
first_start = liberation_install.init()
|
first_start = liberation_install.init()
|
||||||
if first_start:
|
if first_start:
|
||||||
@ -264,7 +269,7 @@ def create_game(
|
|||||||
# way.
|
# way.
|
||||||
inject_custom_payloads(Path(persistency.base_path()))
|
inject_custom_payloads(Path(persistency.base_path()))
|
||||||
campaign = Campaign.from_file(campaign_path)
|
campaign = Campaign.from_file(campaign_path)
|
||||||
theater = campaign.load_theater()
|
theater = campaign.load_theater(advanced_iads)
|
||||||
generator = GameGenerator(
|
generator = GameGenerator(
|
||||||
FACTIONS[blue],
|
FACTIONS[blue],
|
||||||
FACTIONS[red],
|
FACTIONS[red],
|
||||||
@ -358,6 +363,7 @@ def main():
|
|||||||
args.cheats,
|
args.cheats,
|
||||||
args.date,
|
args.date,
|
||||||
args.restrict_weapons_by_date,
|
args.restrict_weapons_by_date,
|
||||||
|
args.advanced_iads,
|
||||||
)
|
)
|
||||||
if args.subcommand == "lint-weapons":
|
if args.subcommand == "lint-weapons":
|
||||||
lint_weapon_data_for_aircraft(AircraftType.named(args.aircraft))
|
lint_weapon_data_for_aircraft(AircraftType.named(args.aircraft))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user