Skip to content

Commit

Permalink
YART 0.0.0.2-2901517
Browse files Browse the repository at this point in the history
Fixes:
- Fixed the updater always showing, even when there was no update.
- Fixed the date being incorrect in the 'Play' tab for the launcher version.
- Corrected the 'Full, but no queue' showing up when there actually is a queue.
  • Loading branch information
NarodGaming committed May 29, 2017
1 parent 553f46b commit a5dd0e7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
20 changes: 10 additions & 10 deletions TruckersMP Launcher/TruckersMP Launcher/Form1.vb
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ Public Class Form1
checkversion.Headers.Add("Expries", "-1")
Dim versionresponse As String = checkversion.DownloadString("https://raw.githubusercontent.com/NarodGaming/narodtruckersmplauncher/master/Updates/currentver.txt?t=" + Date.Now.ToLocalTime) ' adds the date to prevent caching

If Not versionresponse = Application.ProductVersion + "-260417" Then ' if out of date
If Not versionresponse = Application.ProductVersion + "-290517" Then ' if out of date
Dim wouldliketoupdate As MsgBoxResult = MsgBox("A new version is available, would you like to download it?", MsgBoxStyle.YesNo, "An update is available!") ' tells the user to update
If wouldliketoupdate = MsgBoxResult.Yes Then
Process.Start("https://github.com/NarodGaming/narodtruckersmplauncher/releases") ' opens download page
Expand All @@ -197,7 +197,7 @@ Public Class Form1
lbl_latest_launcher_ver.Text = "Latest Launcher Version: " + versionresponse
End If

lbl_launcher_ver.Text = "Launcher Version: " + Application.ProductVersion + "-120417.Hotfix" ' sets up product version
lbl_launcher_ver.Text = "Launcher Version: " + Application.ProductVersion + "-290517" ' sets up product version

Try
Dim version As String = "https://api.truckersmp.com/v2/version" ' gets TruckersMP version
Expand Down Expand Up @@ -380,7 +380,7 @@ Public Class Form1
Try
Dim spbar As Decimal = players / maxplayers * 100
t1_Total.Value = spbar
If t1_Total.Value = 100 And q1_Name.Visible = False Then
If t1_Total.Value = 100 And queue = "0" Then
q1_Name.Visible = True
q1_Name.Text = "Full, but no queue"
End If
Expand Down Expand Up @@ -413,7 +413,7 @@ Public Class Form1
Try
Dim spbar As Decimal = players / maxplayers * 100
t2_Total.Value = spbar
If t2_Total.Value = 100 And q2_Name.Visible = False Then
If t2_Total.Value = 100 And queue = "0" Then
q2_Name.Visible = True
q2_Name.Text = "Full, but no queue"
End If
Expand Down Expand Up @@ -446,7 +446,7 @@ Public Class Form1
Try
Dim spbar As Decimal = players / maxplayers * 100
t3_Total.Value = spbar
If t3_Total.Value = 100 And q3_Name.Visible = False Then
If t3_Total.Value = 100 And queue = "0" Then
q3_Name.Visible = True
q3_Name.Text = "Full, but no queue"
End If
Expand Down Expand Up @@ -479,7 +479,7 @@ Public Class Form1
Try
Dim spbar As Decimal = players / maxplayers * 100
t4_Total.Value = spbar
If t4_Total.Value = 100 And q4_Name.Visible = False Then
If t4_Total.Value = 100 And queue = "0" Then
q4_Name.Visible = True
q4_Name.Text = "Full, but no queue"
End If
Expand Down Expand Up @@ -512,7 +512,7 @@ Public Class Form1
Try
Dim spbar As Decimal = players / maxplayers * 100
t5_Total.Value = spbar
If t5_Total.Value = 100 And q5_Name.Visible = False Then
If t5_Total.Value = 100 And queue = "0" Then
q5_Name.Visible = True
q5_Name.Text = "Full, but no queue"
End If
Expand Down Expand Up @@ -545,7 +545,7 @@ Public Class Form1
Try
Dim spbar As Decimal = players / maxplayers * 100
t6_Total.Value = spbar
If t6_Total.Value = 100 And q6_Name.Visible = False Then
If t6_Total.Value = 100 And queue = "0" Then
q6_Name.Visible = True
q6_Name.Text = "Full, but no queue"
End If
Expand Down Expand Up @@ -578,7 +578,7 @@ Public Class Form1
Try
Dim spbar As Decimal = players / maxplayers * 100
t7_Total.Value = spbar
If t7_Total.Value = 100 And q7_Name.Visible = False Then
If t7_Total.Value = 100 And queue = "0" Then
q7_Name.Visible = True
q7_Name.Text = "Full, but no queue"
End If
Expand Down Expand Up @@ -611,7 +611,7 @@ Public Class Form1
Try
Dim spbar As Decimal = players / maxplayers * 100
t8_Total.Value = spbar
If t8_Total.Value = 100 And q8_Name.Visible = False Then
If t8_Total.Value = 100 And queue = "0" Then
q8_Name.Visible = True
q8_Name.Text = "Full, but no queue"
End If
Expand Down
Binary file not shown.
2 changes: 1 addition & 1 deletion Updates/currentver.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.0.2-260417
0.0.0.2-290517

0 comments on commit a5dd0e7

Please sign in to comment.