Rival rename texture bug fix
This commit is contained in:
parent
e60877d880
commit
0bf30358da
|
@ -184,7 +184,7 @@
|
|||
|
||||
@player.setot(<system.random(0,65255)>)
|
||||
@player.addmoney(3000)
|
||||
|
||||
@player.setrivalskin(4)
|
||||
|
||||
@system.endnewgame(yourroom.dat,1,0.1,3,1)
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
|
||||
Canvas.DrawImageBorder(TextureManager.GetTexture("GUI\Menus\Menu", New Rectangle(0, 0, 48, 48), ""), 2, New Rectangle(CInt(p.X), CInt(p.Y), 320, 320))
|
||||
|
||||
Core.SpriteBatch.Draw(Me.Texture, New Rectangle(CInt(p.X) - 15, CInt(p.Y) - 90, 384, 384), Color.White)
|
||||
Core.SpriteBatch.Draw(Me.Texture, New Rectangle(CInt(p.X + 48), CInt(p.Y + 48), 256, 256), Color.White)
|
||||
|
||||
If Me.Delay = 0.0F Then
|
||||
Core.SpriteBatch.Draw(TextureManager.GetTexture("GUI\Overworld\TextBox"), New Rectangle(CInt(p.X) + 144 + 160, CInt(p.Y) + 144 + 160 + 32, 16, 16), New Rectangle(0, 48, 16, 16), Color.White)
|
||||
|
|
|
@ -869,7 +869,7 @@ Namespace GameJolt
|
|||
"MapFile|yourroom.dat" & Environment.NewLine &
|
||||
"Rotation|1.570796" & Environment.NewLine &
|
||||
"RivalName|???" & Environment.NewLine &
|
||||
"RivalSkin|Silver" & Environment.NewLine &
|
||||
"RivalSkin|4" & Environment.NewLine &
|
||||
"Money|3000" & Environment.NewLine &
|
||||
"Badges|0" & Environment.NewLine &
|
||||
"Gender|Male" & Environment.NewLine &
|
||||
|
|
|
@ -17,8 +17,19 @@
|
|||
PreScreen = currentScreen
|
||||
CanBePaused = False
|
||||
UpdateFadeOut = True
|
||||
For Each s As String In Core.GameOptions.ContentPackNames
|
||||
ContentPackManager.Load(GameController.GamePath & "\ContentPacks\" & s & "\exceptions.dat")
|
||||
Next
|
||||
|
||||
BattleSystem.GameModeAttackLoader.Load()
|
||||
|
||||
SmashRock.Load()
|
||||
Badge.Load()
|
||||
Pokedex.Load()
|
||||
BattleSystem.BattleScreen.ResetVars()
|
||||
LevelLoader.ClearTempStructures()
|
||||
PokemonForms.Initialize()
|
||||
|
||||
'Set up 3D environment variables (Effect, Camera, SkyDome and Level):
|
||||
Effect = New BasicEffect(GraphicsDevice)
|
||||
Effect.FogEnabled = True
|
||||
|
@ -119,6 +130,7 @@
|
|||
End Sub
|
||||
|
||||
Public Shared Sub EndNewGame(ByVal map As String, ByVal x As Single, ByVal y As Single, ByVal z As Single, ByVal rot As Integer)
|
||||
|
||||
Dim folderPath As String = Core.Player.Name.Replace("\", "_").Replace("/", "_").Replace(":", "_").Replace("*", "_").Replace("?", "_").Replace("""", "_").Replace("<", "_").Replace(">", "_").Replace("|", "_").Replace(",", "_").Replace(".", "_")
|
||||
Dim folderPrefix As Integer = 0
|
||||
|
||||
|
@ -128,7 +140,7 @@
|
|||
|
||||
Dim savePath As String = GameController.GamePath & "\Save\"
|
||||
|
||||
While IO.Directory.Exists(savePath & folderPath) = True
|
||||
While System.IO.Directory.Exists(savePath & folderPath) = True
|
||||
If folderPath <> Core.Player.Name Then
|
||||
folderPath = folderPath.Remove(folderPath.Length - folderPrefix.ToString().Length, folderPrefix.ToString().Length)
|
||||
End If
|
||||
|
@ -138,11 +150,11 @@
|
|||
folderPrefix += 1
|
||||
End While
|
||||
|
||||
If IO.Directory.Exists(GameController.GamePath & "\Save") = False Then
|
||||
IO.Directory.CreateDirectory(GameController.GamePath & "\Save")
|
||||
If System.IO.Directory.Exists(GameController.GamePath & "\Save") = False Then
|
||||
System.IO.Directory.CreateDirectory(GameController.GamePath & "\Save")
|
||||
End If
|
||||
|
||||
'IO.Directory.CreateDirectory(savePath & folderPath)
|
||||
System.IO.Directory.CreateDirectory(savePath & folderPath)
|
||||
|
||||
Core.Player.filePrefix = folderPath
|
||||
Core.Player.GameStart = Date.Now
|
||||
|
@ -158,7 +170,7 @@
|
|||
Core.Player.startRotation = CSng(MathHelper.Pi * (rot / 2))
|
||||
|
||||
Core.Player.BerryData = CreateBerryData()
|
||||
Core.Player.AddVisitedMap("yourroom.dat")
|
||||
Core.Player.AddVisitedMap(map)
|
||||
Core.Player.SaveCreated = GameController.GAMEDEVELOPMENTSTAGE & " " & GameController.GAMEVERSION
|
||||
|
||||
Dim ot As String = Core.Random.Next(0, 999999).ToString()
|
||||
|
@ -166,8 +178,38 @@
|
|||
ot = "0" & ot
|
||||
End While
|
||||
Core.Player.OT = ot
|
||||
End Sub
|
||||
|
||||
System.IO.File.WriteAllText(savePath & folderPath & "\Player.dat", Core.Player.GetPlayerData(False))
|
||||
System.IO.File.WriteAllText(savePath & folderPath & "\Pokedex.dat", "")
|
||||
System.IO.File.WriteAllText(savePath & folderPath & "\Items.dat", "")
|
||||
System.IO.File.WriteAllText(savePath & folderPath & "\Register.dat", "")
|
||||
System.IO.File.WriteAllText(savePath & folderPath & "\Berries.dat", Core.Player.BerryData)
|
||||
System.IO.File.WriteAllText(savePath & folderPath & "\Apricorns.dat", "")
|
||||
System.IO.File.WriteAllText(savePath & folderPath & "\Daycare.dat", "")
|
||||
System.IO.File.WriteAllText(savePath & folderPath & "\Party.dat", "")
|
||||
System.IO.File.WriteAllText(savePath & folderPath & "\ItemData.dat", "")
|
||||
System.IO.File.WriteAllText(savePath & folderPath & "\Options.dat", CreateOptionsData())
|
||||
System.IO.File.WriteAllText(savePath & folderPath & "\Box.dat", "")
|
||||
System.IO.File.WriteAllText(savePath & folderPath & "\NPC.dat", "")
|
||||
System.IO.File.WriteAllText(savePath & folderPath & "\HallOfFame.dat", "")
|
||||
System.IO.File.WriteAllText(savePath & folderPath & "\SecretBase.dat", "")
|
||||
System.IO.File.WriteAllText(savePath & folderPath & "\RoamingPokemon.dat", "")
|
||||
System.IO.File.WriteAllText(savePath & folderPath & "\Statistics.dat", "")
|
||||
|
||||
Core.Player.IsGameJoltSave = False
|
||||
Core.Player.LoadGame(folderPath)
|
||||
|
||||
|
||||
'IO.Directory.CreateDirectory(savePath & folderPath)
|
||||
|
||||
End Sub
|
||||
Public Shared Function CreateOptionsData() As String
|
||||
Dim s As String = "FOV|" & Core.Player.startFOV & Environment.NewLine &
|
||||
"TextSpeed|2" & Environment.NewLine &
|
||||
"MouseSpeed|" & Core.Player.startRotationSpeed
|
||||
|
||||
Return s
|
||||
End Function
|
||||
Private Shared Function CreateBerryData() As String
|
||||
Dim s As String = "{route29.dat|13,0,5|6|2|0|2012,9,21,4,0,0|1}" & Environment.NewLine &
|
||||
"{route29.dat|14,0,5|6|2|0|2012,9,21,4,0,0|1}" & Environment.NewLine &
|
||||
|
|
|
@ -51,10 +51,6 @@
|
|||
|
||||
BattleSystem.GameModeAttackLoader.Load()
|
||||
|
||||
If GameModeManager.ActiveGameMode.IsDefaultGamemode = False Then
|
||||
'MusicManager.LoadMusic(True)
|
||||
'SoundManager.LoadSounds(True)
|
||||
End If
|
||||
SmashRock.Load()
|
||||
Badge.Load()
|
||||
Pokedex.Load()
|
||||
|
@ -397,7 +393,7 @@
|
|||
"MapFile|" & Me.startMap & Environment.NewLine &
|
||||
"Rotation|" & Me.startYaw.ToString() & Environment.NewLine &
|
||||
"RivalName|???" & Environment.NewLine &
|
||||
"RivalSkin|Silver" & Environment.NewLine &
|
||||
"RivalSkin|4" & Environment.NewLine &
|
||||
"Money|3000" & Environment.NewLine &
|
||||
"Badges|0" & Environment.NewLine &
|
||||
"Gender|Male" & Environment.NewLine &
|
||||
|
@ -411,6 +407,7 @@
|
|||
"skin|" & skinFiles(SkinIndex) & Environment.NewLine &
|
||||
"location|" & Me.startLocation & Environment.NewLine &
|
||||
"battleAnimations|1" & Environment.NewLine &
|
||||
"RunMode|1" & Environment.NewLine &
|
||||
"BoxAmount|5" & Environment.NewLine &
|
||||
"LastRestPlace|" & startMap & Environment.NewLine &
|
||||
"LastRestPlacePosition|" & Me.startPosition.X.ToString().Replace(GameController.DecSeparator, ".") & "," & Me.startPosition.Y.ToString().Replace(GameController.DecSeparator, ".") & "," & Me.startPosition.Z.ToString().Replace(GameController.DecSeparator, ".") & Environment.NewLine &
|
||||
|
@ -419,7 +416,7 @@
|
|||
"LastSavePlace|" & startMap & Environment.NewLine &
|
||||
"LastSavePlacePosition|" & Me.startPosition.X.ToString().Replace(GameController.DecSeparator, ".") & "," & Me.startPosition.Y.ToString().Replace(GameController.DecSeparator, ".") & "," & Me.startPosition.Z.ToString().Replace(GameController.DecSeparator, ".") & Environment.NewLine &
|
||||
"Difficulty|" & GameModeManager.GetGameRuleValue("Difficulty", "0") & Environment.NewLine &
|
||||
"BattleStyle|0" & Environment.NewLine &
|
||||
"BattleStyle|1" & Environment.NewLine &
|
||||
"saveCreated|" & GameController.GAMEDEVELOPMENTSTAGE & " " & GameController.GAMEVERSION & Environment.NewLine &
|
||||
"LastPokemonPosition|999,999,999" & Environment.NewLine &
|
||||
"DaycareSteps|0" & Environment.NewLine &
|
||||
|
@ -430,13 +427,14 @@
|
|||
"Surfing|0" & Environment.NewLine &
|
||||
"ShowModels|1" & Environment.NewLine &
|
||||
"GTSStars|4" & Environment.NewLine &
|
||||
"SandBoxMode|0"
|
||||
"SandBoxMode|0" & Environment.NewLine &
|
||||
"EarnedAchievements|"
|
||||
|
||||
Return s
|
||||
End Function
|
||||
|
||||
Public Shared Function GetOptionsData() As String
|
||||
Dim s As String = "FOV|50" & Environment.NewLine &
|
||||
Dim s As String = "FOV|60" & Environment.NewLine &
|
||||
"TextSpeed|2" & Environment.NewLine &
|
||||
"MouseSpeed|12"
|
||||
|
||||
|
|
|
@ -25,7 +25,13 @@
|
|||
Core.Player.HasPokegear = True
|
||||
IsReady = True
|
||||
Case "renamerival"
|
||||
Dim RivalTexture2D As Texture2D = TextureManager.GetTexture(GameModeManager.ActiveGameMode.ContentPath & "Textures\NPC\" & Core.Player.RivalSkin)
|
||||
If GameModeManager.ActiveGameMode.IsDefaultGamemode = True AndAlso Core.Player.RivalSkin <> "4" Then
|
||||
Core.Player.RivalSkin = "4"
|
||||
End If
|
||||
If Core.Player.RivalSkin = "" Then
|
||||
Core.Player.RivalSkin = "4"
|
||||
End If
|
||||
Dim RivalTexture2D As Texture2D = TextureManager.GetTexture("Textures\NPC\" & Core.Player.RivalSkin)
|
||||
Dim RivalFrameSize As Size
|
||||
If RivalTexture2D.Width = RivalTexture2D.Height / 2 Then
|
||||
RivalFrameSize = New Size(CInt(RivalTexture2D.Width / 2), CInt(RivalTexture2D.Height / 4))
|
||||
|
|
Loading…
Reference in New Issue