message: Made launch code generic using getGameArguments call
diff: @@ -27,15 +27,11 @@ export default class GameRunnerProviderImpl extends GameRunnerProvider {
  async startModded(game: Game): Promise<void | R2Error> {
  LoggerProvider.instance.Log(LogSeverity.INFO, 'Launching modded');
  // BepInEx Standard
  - try {
  - const corePath = path.join(Profile.getActiveProfile().getPathOfProfile(), "BepInEx", "core");
  - const preloaderPath = path.join(corePath,
  - (await FsProvider.instance.readdir(corePath))
  - .filter((x: string) => ["BepInEx.Preloader.dll", "BepInEx.IL2CPP.dll"].includes(x))[0]);
  - return this.start(game, `--doorstop-enable true --doorstop-target "${preloaderPath}"`);
  - } catch (e) {
  - const err: Error = e;
  - return new R2Error("Failed to start modded", err.message, "BepInEx may not installed correctly. Further help may be required.");
  + const target = await this.getGameArguments(game, Profile.getActiveProfile());
  + if (target instanceof R2Error) {
  + return target;
  + } else {
  + return this.start(game, target);
  }
  }
  