File tree Expand file tree Collapse file tree 2 files changed +21
-2
lines changed Expand file tree Collapse file tree 2 files changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -29,11 +29,11 @@ public static bool Validate(MatchConfigurationT config)
2929 if ( config . Launcher == Launcher . Custom )
3030 {
3131 config . LauncherArg = ( config . LauncherArg ?? "" ) . ToLower ( ) ;
32- if ( config . LauncherArg != "legendary" )
32+ if ( config . LauncherArg != "legendary" && config . LauncherArg != "heroic" )
3333 {
3434 Logger . LogError (
3535 $ "Invalid { ctx . ToStringWithEnd ( Fields . RlBotLauncherArg ) } value \" { config . LauncherArg } \" . "
36- + $ "\" legendary\" is the only Custom launcher supported currently."
36+ + $ "\" legendary\" and \" heroic \" are the only Custom launchers supported currently."
3737 ) ;
3838 valid = false ;
3939 }
Original file line number Diff line number Diff line change @@ -135,6 +135,15 @@ private static void LaunchGameViaLegendary()
135135 legendary . Start ( ) ;
136136 }
137137
138+ private static void LaunchGameViaHeroic ( )
139+ {
140+ Logger . LogWarning ( "Launching via Heroic..." ) ;
141+ Process heroic = RunCommandInShell (
142+ "xdg-open 'heroic://launch?appName=Sugar&runner=legendary&arg=-rlbot&arg=RLBot_ControllerURL%3D127.0.0.1%3A23233&arg=RLBot_PacketSendRate%3D240&arg=-nomovie'"
143+ ) ;
144+ heroic . Start ( ) ;
145+ }
146+
138147 public static void LaunchBots (
139148 List < rlbot . flat . PlayerConfigurationT > bots ,
140149 int rlbotSocketsPort
@@ -324,6 +333,11 @@ int gamePort
324333 LaunchGameViaLegendary ( ) ;
325334 return ;
326335 }
336+ else if ( extraArg . ToLower ( ) == "heroic" )
337+ {
338+ LaunchGameViaHeroic ( ) ;
339+ return ;
340+ }
327341
328342 throw new NotSupportedException ( $ "Unexpected launcher, \" { extraArg } \" ") ;
329343 case rlbot . flat . Launcher . NoLaunch :
@@ -355,6 +369,11 @@ int gamePort
355369 LaunchGameViaLegendary ( ) ;
356370 return ;
357371 }
372+ else if ( extraArg . ToLower ( ) == "heroic" )
373+ {
374+ LaunchGameViaHeroic ( ) ;
375+ return ;
376+ }
358377
359378 throw new NotSupportedException ( $ "Unexpected launcher, \" { extraArg } \" ") ;
360379 case rlbot . flat . Launcher . NoLaunch :
You can’t perform that action at this time.
0 commit comments