@@ -135,6 +135,31 @@ private static void LaunchGameViaLegendary()
135
135
legendary . Start ( ) ;
136
136
}
137
137
138
+ private static void LaunchGameViaHeroic ( )
139
+ {
140
+ Process heroic ;
141
+
142
+ if ( RuntimeInformation . IsOSPlatform ( OSPlatform . Linux ) )
143
+ {
144
+ heroic = RunCommandInShell (
145
+ "xdg-open 'heroic://launch?appName=Sugar&runner=legendary&arg=-rlbot&arg=RLBot_ControllerURL%3D127.0.0.1%3A23233&arg=RLBot_PacketSendRate%3D240&arg=-nomovie'"
146
+ ) ;
147
+ }
148
+ else if ( RuntimeInformation . IsOSPlatform ( OSPlatform . Windows ) )
149
+ {
150
+ heroic = RunCommandInShell (
151
+ "start \" \" \" heroic://launch?appName=Sugar&runner=legendary&arg=-rlbot&arg=RLBot_ControllerURL%3D127.0.0.1%3A23233&arg=RLBot_PacketSendRate%3D240&arg=-nomovie\" "
152
+ ) ;
153
+ }
154
+ else
155
+ {
156
+ throw new PlatformNotSupportedException (
157
+ "RLBot is not supported on non-Windows/Linux platforms"
158
+ ) ;
159
+ }
160
+ heroic . Start ( ) ;
161
+ }
162
+
138
163
public static void LaunchBots (
139
164
List < rlbot . flat . PlayerConfigurationT > bots ,
140
165
int rlbotSocketsPort
@@ -324,6 +349,11 @@ int gamePort
324
349
LaunchGameViaLegendary ( ) ;
325
350
return ;
326
351
}
352
+ else if ( extraArg . ToLower ( ) == "heroic" )
353
+ {
354
+ LaunchGameViaHeroic ( ) ;
355
+ return ;
356
+ }
327
357
328
358
throw new NotSupportedException ( $ "Unexpected launcher, \" { extraArg } \" ") ;
329
359
case rlbot . flat . Launcher . NoLaunch :
@@ -355,6 +385,11 @@ int gamePort
355
385
LaunchGameViaLegendary ( ) ;
356
386
return ;
357
387
}
388
+ else if ( extraArg . ToLower ( ) == "heroic" )
389
+ {
390
+ LaunchGameViaHeroic ( ) ;
391
+ return ;
392
+ }
358
393
359
394
throw new NotSupportedException ( $ "Unexpected launcher, \" { extraArg } \" ") ;
360
395
case rlbot . flat . Launcher . NoLaunch :
0 commit comments