Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions RLBotCS/ManagerTools/ConfigValidator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ public static bool Validate(MatchConfigurationT config)
if (config.Launcher == Launcher.Custom)
{
config.LauncherArg = (config.LauncherArg ?? "").ToLower();
if (config.LauncherArg != "legendary")
if (config.LauncherArg != "legendary" && config.LauncherArg != "heroic")
{
Logger.LogError(
$"Invalid {ctx.ToStringWithEnd(Fields.RlBotLauncherArg)} value \"{config.LauncherArg}\". "
+ $"\"legendary\" is the only Custom launcher supported currently."
+ $"\"legendary\" and \"heroic\" are the only Custom launchers supported currently."
);
valid = false;
}
Expand Down
19 changes: 19 additions & 0 deletions RLBotCS/ManagerTools/LaunchManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,15 @@ private static void LaunchGameViaLegendary()
legendary.Start();
}

private static void LaunchGameViaHeroic()
{
Logger.LogWarning("Launching via Heroic...");
Process heroic = RunCommandInShell(
"xdg-open 'heroic://launch?appName=Sugar&runner=legendary&arg=-rlbot&arg=RLBot_ControllerURL%3D127.0.0.1%3A23233&arg=RLBot_PacketSendRate%3D240&arg=-nomovie'"
);
heroic.Start();
}

public static void LaunchBots(
List<rlbot.flat.PlayerConfigurationT> bots,
int rlbotSocketsPort
Expand Down Expand Up @@ -324,6 +333,11 @@ int gamePort
LaunchGameViaLegendary();
return;
}
else if (extraArg.ToLower() == "heroic")
{
LaunchGameViaHeroic();
return;
}

throw new NotSupportedException($"Unexpected launcher, \"{extraArg}\"");
case rlbot.flat.Launcher.NoLaunch:
Expand Down Expand Up @@ -355,6 +369,11 @@ int gamePort
LaunchGameViaLegendary();
return;
}
else if (extraArg.ToLower() == "heroic")
{
LaunchGameViaHeroic();
return;
}

throw new NotSupportedException($"Unexpected launcher, \"{extraArg}\"");
case rlbot.flat.Launcher.NoLaunch:
Expand Down