Пример #1
0
def launch_challenge_with_config(challenge_id, pickedTeammates):
    print(f"In launch_challenge {challenge_id}")

    story_id = CURRENT_STATE.story_config
    challenge = get_challenges_by_id(story_id)[challenge_id]
    all_bots = get_bots_configs(story_id)

    match_config = configure_challenge(challenge, CURRENT_STATE,
                                       pickedTeammates, all_bots)
    launcher_settings_map = load_launcher_settings()
    launcher_prefs = launcher_preferences_from_map(launcher_settings_map)
    completed, results = run_challenge(match_config, challenge,
                                       CURRENT_STATE.upgrades, launcher_prefs)
    CURRENT_STATE.add_match_result(challenge_id, completed, results)

    flush_save_state()
Пример #2
0
def start_match(bot_list, match_settings):
    launcher_preference_map = load_launcher_settings()
    launcher_prefs = launcher_preferences_from_map(launcher_preference_map)

    # Show popup in GUI if rocket league is not started with -rlbot flag
    try:
        testSetupManager = SetupManager()
        temp, port = gateway_util.find_existing_process()
        del temp
        testSetupManager.is_rocket_league_running(port)
    except Exception:
        eel.noRLBotFlagPopup()
        print(
            "Error starting match. This is probably due to Rocket League not being started under the -rlbot flag."
        )
    else:
        eel.spawn(start_match_helper, bot_list, match_settings, launcher_prefs)
Пример #3
0
def start_match(bot_list, match_settings):
    launcher_preference_map = load_launcher_settings()
    launcher_prefs = launcher_preferences_from_map(launcher_preference_map)

    # Show popup in GUI if rocket league is not started with -rlbot flag
    try:
        testSetupManager = SetupManager()
        temp, port = gateway_util.find_existing_process()
        if port is None:
            # RLBot.exe is not running, but Rocket League might be. That's a situation we can recover from, RLBot.exe
            # will be booted up using the ideal port later, so assume that port.
            port = gateway_util.IDEAL_RLBOT_PORT
        del temp
        # It's fine if rocket league is not running, this would just return false and we'd proceed. What we're checking
        # for is an exception thrown when rocket league IS running but without the necessary flags or a mismatched port.
        testSetupManager.is_rocket_league_running(port)
    except Exception as e:
        eel.noRLBotFlagPopup()
        print(
            f"Error starting match. This is probably due to Rocket League not being started under the -rlbot flag. {e}"
        )
    else:
        eel.spawn(start_match_helper, bot_list, match_settings, launcher_prefs)
Пример #4
0
def get_launcher_settings():
    return load_launcher_settings()
Пример #5
0
def start_match(bot_list, match_settings):
    launcher_preference_map = load_launcher_settings()
    launcher_prefs = launcher_preferences_from_map(launcher_preference_map)
    eel.spawn(start_match_helper, bot_list, match_settings, launcher_prefs)