From 480039ca50c6787bad5480f46d232879a2026373 Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Mon, 19 Apr 2021 17:22:31 -0700 Subject: [PATCH] Add `--cheats` to the CLI mission generator. Doesn't enable the red ATO display because that's a lot of clutter, but enables the commonly needed for debugging things. --- qt_ui/main.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/qt_ui/main.py b/qt_ui/main.py index 08967914..5acfba73 100644 --- a/qt_ui/main.py +++ b/qt_ui/main.py @@ -158,6 +158,8 @@ def parse_args() -> argparse.Namespace: "--inverted", action="store_true", help="Invert the campaign." ) + new_game.add_argument("--cheats", action="store_true", help="Enable cheats.") + return parser.parse_args() @@ -168,6 +170,7 @@ def create_game( supercarrier: bool, auto_procurement: bool, inverted: bool, + cheats: bool, ) -> Game: campaign = Campaign.from_json(campaign_path) generator = GameGenerator( @@ -180,6 +183,8 @@ def create_game( automate_front_line_reinforcements=auto_procurement, automate_aircraft_reinforcements=auto_procurement, enable_new_ground_unit_recruitment=True, + enable_frontline_cheats=cheats, + enable_base_capture_cheat=cheats, ), GeneratorSettings( start_date=datetime.today(), @@ -227,6 +232,7 @@ def main(): args.supercarrier, args.auto_procurement, args.inverted, + args.cheats, ) run_ui(game)