Update Disabled setting + a bonus network check.
This commit is contained in:
parent
779698ba94
commit
c3fe2fda01
|
@ -19,7 +19,7 @@
|
||||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||||
<ApplicationIcon>Pokemon3D.ico</ApplicationIcon>
|
<ApplicationIcon>Pokemon3D.ico</ApplicationIcon>
|
||||||
<OptionExplicit>On</OptionExplicit>
|
<OptionExplicit>On</OptionExplicit>
|
||||||
<OptionCompare>Binary</OptionCompare>
|
<OptionCompare>Text</OptionCompare>
|
||||||
<OptionStrict>Off</OptionStrict>
|
<OptionStrict>Off</OptionStrict>
|
||||||
<OptionInfer>On</OptionInfer>
|
<OptionInfer>On</OptionInfer>
|
||||||
<StartupObject>net.Pokemon3D.Game.Program</StartupObject>
|
<StartupObject>net.Pokemon3D.Game.Program</StartupObject>
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
Public WindowSize As New Vector2(1200, 680)
|
Public WindowSize As New Vector2(1200, 680)
|
||||||
Public ForceMusic As Boolean = False
|
Public ForceMusic As Boolean = False
|
||||||
Public MaxOffsetLevel As Integer = 0
|
Public MaxOffsetLevel As Integer = 0
|
||||||
|
Public UpdateDisabled As Boolean = False
|
||||||
Public Extras As New List(Of String)
|
Public Extras As New List(Of String)
|
||||||
|
|
||||||
Public Sub LoadOptions()
|
Public Sub LoadOptions()
|
||||||
|
@ -106,6 +107,8 @@
|
||||||
If Not String.IsNullOrEmpty(value) Then
|
If Not String.IsNullOrEmpty(value) Then
|
||||||
Me.Extras = value.Split(";"c).ToList()
|
Me.Extras = value.Split(";"c).ToList()
|
||||||
End If
|
End If
|
||||||
|
Case "updatedisabled"
|
||||||
|
UpdateDisabled = CBool(value)
|
||||||
End Select
|
End Select
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
@ -149,9 +152,10 @@
|
||||||
"WindowSize|" & Core.windowSize.Width.ToString() & "," & Core.windowSize.Height.ToString().Replace(GameController.DecSeparator, ".") & vbNewLine &
|
"WindowSize|" & Core.windowSize.Width.ToString() & "," & Core.windowSize.Height.ToString().Replace(GameController.DecSeparator, ".") & vbNewLine &
|
||||||
"ForceMusic|" & Me.ForceMusic.ToNumberString() & vbNewLine &
|
"ForceMusic|" & Me.ForceMusic.ToNumberString() & vbNewLine &
|
||||||
"MaxOffsetLevel|" & Me.MaxOffsetLevel.ToString() & vbNewLine &
|
"MaxOffsetLevel|" & Me.MaxOffsetLevel.ToString() & vbNewLine &
|
||||||
|
"UpdateDisabled|" & Me.UpdateDisabled.ToNumberString() & vbNewLine &
|
||||||
"Extras|" & String.Join(";", Me.Extras)
|
"Extras|" & String.Join(";", Me.Extras)
|
||||||
|
|
||||||
System.IO.File.WriteAllText(GameController.GamePath & "\Save\options.dat", Data)
|
File.WriteAllText(GameController.GamePath & "\Save\options.dat", Data)
|
||||||
KeyBindings.SaveKeys()
|
KeyBindings.SaveKeys()
|
||||||
|
|
||||||
Logger.Debug("---Options saved---")
|
Logger.Debug("---Options saved---")
|
||||||
|
@ -179,6 +183,7 @@
|
||||||
"WindowSize|1200,680" & vbNewLine &
|
"WindowSize|1200,680" & vbNewLine &
|
||||||
"ForceMusic|0" & vbNewLine &
|
"ForceMusic|0" & vbNewLine &
|
||||||
"MaxOffsetLevel|0" & vbNewLine &
|
"MaxOffsetLevel|0" & vbNewLine &
|
||||||
|
"UpdateDisabled|0" & vbNewLine &
|
||||||
"Extras|Backup Save"
|
"Extras|Backup Save"
|
||||||
|
|
||||||
File.WriteAllText(GameController.GamePath & "\Save\options.dat", s)
|
File.WriteAllText(GameController.GamePath & "\Save\options.dat", s)
|
||||||
|
|
|
@ -91,6 +91,7 @@ Public Class MainMenuScreen
|
||||||
If Not GameController.UpdateChecked Then
|
If Not GameController.UpdateChecked Then
|
||||||
Logger.Debug("---Check Version---")
|
Logger.Debug("---Check Version---")
|
||||||
|
|
||||||
|
If Not Core.GameOptions.UpdateDisabled AndAlso My.Computer.Network.IsAvailable Then
|
||||||
Task.Factory.StartNew(Sub()
|
Task.Factory.StartNew(Sub()
|
||||||
Dim Updater As New Process()
|
Dim Updater As New Process()
|
||||||
Updater.StartInfo = New ProcessStartInfo("Updater.exe")
|
Updater.StartInfo = New ProcessStartInfo("Updater.exe")
|
||||||
|
@ -104,6 +105,7 @@ Public Class MainMenuScreen
|
||||||
End If
|
End If
|
||||||
End Sub)
|
End Sub)
|
||||||
End If
|
End If
|
||||||
|
End If
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
End Try
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
|
|
Loading…
Reference in New Issue