From 4c92f343d7ec1ed5aa5a716d70f19d98e376d211 Mon Sep 17 00:00:00 2001 From: JappaWakka Date: Sat, 10 Sep 2022 16:17:55 +0200 Subject: [PATCH] Hopefully this'll fix some issues (description) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pokémon without a CatchMethod or CatchLocation get defaulted to "Somehow obtained at" and "an unknown place" respectively. --- P3D/Pokemon/Monster/Pokemon.vb | 4 ++-- P3D/Screens/Pokemon/EvolutionScreen.vb | 6 ++++++ P3D/Screens/Pokemon/SummaryScreen.vb | 10 +++++++++- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/P3D/Pokemon/Monster/Pokemon.vb b/P3D/Pokemon/Monster/Pokemon.vb index 12449c29f..30bae424f 100644 --- a/P3D/Pokemon/Monster/Pokemon.vb +++ b/P3D/Pokemon/Monster/Pokemon.vb @@ -906,9 +906,9 @@ Public Class Pokemon Private _OT As String = "00000" Private _status As StatusProblems = StatusProblems.None Private _nature As Natures - Private _catchLocation As String = "at unknown place" + Private _catchLocation As String = "an unknown place" Private _catchTrainerName As String = "???" - Private _catchMethod As String = "somehow obtained" + Private _catchMethod As String = "Somehow obtained at" Private _friendship As Integer Private _isShiny As Boolean Private _individualValue As String = "" diff --git a/P3D/Screens/Pokemon/EvolutionScreen.vb b/P3D/Screens/Pokemon/EvolutionScreen.vb index 72b1f80e7..639340fe3 100644 --- a/P3D/Screens/Pokemon/EvolutionScreen.vb +++ b/P3D/Screens/Pokemon/EvolutionScreen.vb @@ -402,6 +402,12 @@ evolvedPokemon.Item = currentPokemon.Item evolvedPokemon.CatchBall = currentPokemon.CatchBall + If currentPokemon.CatchMethod = "" Then + currentPokemon.CatchMethod = "Somehow obtained at" + End If + If currentPokemon.CatchLocation = "" Then + currentPokemon.CatchLocation = "an unknown place" + End If evolvedPokemon.CatchLocation = currentPokemon.CatchLocation evolvedPokemon.CatchMethod = currentPokemon.CatchMethod evolvedPokemon.CatchTrainerName = currentPokemon.CatchTrainerName diff --git a/P3D/Screens/Pokemon/SummaryScreen.vb b/P3D/Screens/Pokemon/SummaryScreen.vb index 81adb15ec..e23a3c692 100644 --- a/P3D/Screens/Pokemon/SummaryScreen.vb +++ b/P3D/Screens/Pokemon/SummaryScreen.vb @@ -400,7 +400,15 @@ SpriteBatch.DrawString(FontManager.MainFont, "Catch Method", New Vector2(DeltaX + 360, DeltaY + 366 + 64), New Color(255, 255, 255, CInt(220 * _interfaceFade * _pageFade))) - Dim text As String = .CatchMethod.Replace(.CatchMethod(0), Char.ToUpper(.CatchMethod(0))) & " " & .CatchLocation + If .CatchMethod = "" Then + .CatchMethod = "Somehow obtained at" + End If + If .CatchLocation = "" Then + .CatchLocation = "an unknown place" + End If + + Dim text As String = .CatchMethod.Replace(.CatchMethod(0), Char.ToUpper(.CatchMethod(0))) & " " & .CatchLocation & "." + SpriteBatch.DrawString(FontManager.MainFont, text.CropStringToWidth(FontManager.MainFont, 1.0F, 300), New Vector2(DeltaX + 358, DeltaY + 336 + 128), New Color(255, 255, 255, CInt(220 * _fadeIn * _pageFade))) 'EV/IV values