Skip to content

Commit

Permalink
Launcher Bug Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Sk1ffy authored and Sk1ffy committed Jul 11, 2024
1 parent a4c4b60 commit 465024e
Showing 1 changed file with 36 additions and 4 deletions.
40 changes: 36 additions & 4 deletions RLOrbital/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -656,24 +656,50 @@ private bool ImportGame()

if (outputSTD.Contains("Game is already installed"))
{
MessageBox.Show("Game is ready. Launcher is ready.");
MessageBox.Show("Game is ready to launch.");
return true;
}
else if (outputSTD.Contains("has been imported"))
{
MessageBox.Show("Sucesfully Imported. Launcher is ready.");
MessageBox.Show("Sucesfully Imported. Game is ready to launch.");
return true;
}
else if (outputSTD.Contains("please verify that the path is correct"))
{
MessageBox.Show(@"Invalid directory selected. Make sure the directory ends with \rocketleague and or is the correct directory.");
return false;
}
else if (outputSTD.Contains("No saved credentials"))
{
MessageBox.Show("Please sign into an account before selecting the rocket league directory.");
return false;

}
else if (outputSTD.Contains("Did not find game"))
{
MessageBox.Show("Game not installed on Epic account. Please download and install it.");
return false;
}
return true;

}
private void DeleteDirectory()
{
if (System.IO.File.Exists("rl.txt"))
{
System.IO.File.Delete("rl.txt");
textBox3.Text = "";
}

}
private void button8_Click(object sender, EventArgs e)
{

if (listBox_Usernames.Items.Count == 0) //We cant import a game into legendary without being signed into an active Epic games account.
{
MessageBox.Show("Please sign into an account before trying to select a directory.");
return;
}
if (System.IO.File.Exists("rl.txt") && new FileInfo("rl.txt").Length != 0)
{
DialogResult response = MessageBox.Show("Would you like to use previously found Rocket League Directory",
Expand All @@ -682,7 +708,10 @@ private void button8_Click(object sender, EventArgs e)
{
string directory = System.IO.File.ReadAllText("rl.txt");
textBox3.Text = directory;
ImportGame();
if(ImportGame() == false)
{
DeleteDirectory();
}
return;
}
}
Expand Down Expand Up @@ -710,7 +739,10 @@ private void button8_Click(object sender, EventArgs e)
{
System.IO.File.WriteAllText("rl.txt", folderPath);
}
ImportGame();
if (ImportGame() == false)
{
DeleteDirectory();
}
}

private void UpdateAccounts()
Expand Down

0 comments on commit 465024e

Please sign in to comment.