Exemple #1
0
def spawn_car_for_viewing(looks: dict, team: int, showcase_type: str,
                          map_name: str):
    looks_config = convert_to_looks_config(looks)
    loadout_config = load_bot_appearance(looks_config, team)
    launcher_settings_map = get_launcher_settings()
    launcher_prefs = launcher_preferences_from_map(launcher_settings_map)
    spawn_car_in_showroom(loadout_config, team, showcase_type, map_name,
                          launcher_prefs)
Exemple #2
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()
Exemple #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()
        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)
Exemple #4
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)
Exemple #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)