Testing some v0.54.1 features

This commit is contained in:
jianmingyong 2017-02-13 20:59:11 +08:00
parent 5ed0d9dd23
commit e311d7b378
4 changed files with 25 additions and 6 deletions

View File

@ -42,7 +42,7 @@
<ItemGroup>
<Content Include="Pokemon3D.ico" />
<Content Include="Pokemon\Items\_itemList.txt" />
<None Include="UpdateHash.dat" />
<None Include="CurrentVersion.dat" />
<Reference Include="OpenTK">
<HintPath>$(MSBuildProgramFiles32)\MonoGame\v3.0\Assemblies\DesktopGL\OpenTK.dll</HintPath>
</Reference>

View File

@ -1,4 +1,7 @@
Public Class MainMenuScreen
Imports System.Net
Imports System.Net.Cache
Public Class MainMenuScreen
Inherits Screen
@ -78,6 +81,21 @@
GameJolt.Emblem.ClearOnlineSpriteCache()
Screen.Level.World.Initialize(Screen.Level.EnvironmentType, Screen.Level.WeatherType)
Try
Logger.Debug("---Check Version---")
Dim client As New WebClient
client.CachePolicy = New RequestCachePolicy(RequestCacheLevel.BypassCache)
Dim version As String = client.DownloadString("https://raw.githubusercontent.com/P3D-Legacy/P3D-Legacy/master/2.5DHero/2.5DHero/CurrentVersion.dat")
If version <> "0.54.2" Then
If MsgBox("New version detected." & vbNewLine & "Current Version: Indev 0.54.1" & vbNewLine & "Newest Version: Indev " & version & vbNewLine & vbNewLine & "Would you like to update the game?", MsgBoxStyle.YesNo, "Game Update") = MsgBoxResult.Yes Then
Process.Start("https://p3d-legacy.github.io/P3D-Legacy-Launcher/latestRelease")
Core.GameInstance.Exit()
End If
End If
Catch ex As Exception
End Try
End Sub
Private Sub GetPacks(Optional ByVal reload As Boolean = False)
@ -703,7 +721,7 @@
If MouseHandler.ButtonPressed(MouseHandler.MouseButtons.LeftButton) = True Then
Select Case loadMenuIndex(1)
Case 0
Core.Player.IsGamejoltSave = False
Core.Player.IsGameJoltSave = False
Core.Player.LoadGame(System.IO.Path.GetFileName(Saves(loadMenuIndex(0))))
Core.SetScreen(New JoinServerScreen(Me))
@ -743,7 +761,7 @@
If Controls.Accept(False, True) = True Then
Select Case loadMenuIndex(1)
Case 0
Core.Player.IsGamejoltSave = False
Core.Player.IsGameJoltSave = False
Core.Player.LoadGame(System.IO.Path.GetFileName(Saves(loadMenuIndex(0))))
Core.SetScreen(New JoinServerScreen(Me))

View File

@ -1,4 +1,6 @@
Imports System.Threading
Imports System.Net
Imports System.Net.Cache
Imports System.Threading
Friend Class SplashScreen
@ -72,7 +74,6 @@ Friend Class SplashScreen
Private Sub LoadContent()
Logger.Debug("---Start loading content---")
Core.LoadContent()
End Sub