diff --git a/P3D/Content/Data/Scripts/league/halloffame.dat b/P3D/Content/Data/Scripts/league/halloffame.dat index 772981ddd..7e1f49205 100644 --- a/P3D/Content/Data/Scripts/league/halloffame.dat +++ b/P3D/Content/Data/Scripts/league/halloffame.dat @@ -24,7 +24,9 @@ version=2 @sound.play(Save) @music.play(silence) :if:=1 - @screen.credits + @screen.credits(Johto,false) +:else + @screen.credits(Johto,true) :endif @music.play(barktown) @level.update diff --git a/P3D/Content/Localization/Tokens_de.dat b/P3D/Content/Localization/Tokens_de.dat index d76a80549..fe4201d1d 100644 --- a/P3D/Content/Localization/Tokens_de.dat +++ b/P3D/Content/Localization/Tokens_de.dat @@ -493,6 +493,7 @@ black_out_screen_line4,to prevent further injury black_out_screen_line5,to your Pokémon. --- Credits Screen: +credits_skip,Press [] to skip to the end. credits_continue,Drücken Sie [] um fortzufahren. --- Voltorb Flip: diff --git a/P3D/Content/Localization/Tokens_en.dat b/P3D/Content/Localization/Tokens_en.dat index 45e0de368..d705fda14 100644 --- a/P3D/Content/Localization/Tokens_en.dat +++ b/P3D/Content/Localization/Tokens_en.dat @@ -581,6 +581,7 @@ black_out_screen_line4,to prevent further injury black_out_screen_line5,to your Pokémon. --- Credits Screen: +credits_skip,Press [] to skip to the end. credits_continue,Press [] to continue. --- Voltorb Flip: diff --git a/P3D/Content/Localization/Tokens_es.dat b/P3D/Content/Localization/Tokens_es.dat index 3ebe2590a..7853f494e 100644 --- a/P3D/Content/Localization/Tokens_es.dat +++ b/P3D/Content/Localization/Tokens_es.dat @@ -495,6 +495,7 @@ black_out_screen_line4,para evitar más lesiones black_out_screen_line5,a tu Pokémon. --- Credits Screen: +credits_skip,Press [] to skip to the end. credits_continue,Press [] to continue. --- Voltorb Flip: diff --git a/P3D/Content/Localization/Tokens_fr.dat b/P3D/Content/Localization/Tokens_fr.dat index 79dbc96c5..872de6bc5 100644 --- a/P3D/Content/Localization/Tokens_fr.dat +++ b/P3D/Content/Localization/Tokens_fr.dat @@ -491,6 +491,7 @@ black_out_screen_line4,pour soigner les blessures black_out_screen_line5,de tes POKéMON. --- Credits Screen: +credits_skip,Press [] to skip to the end. credits_continue,Appuie sur [] pour continuer. --- Voltorb Flip: diff --git a/P3D/Content/Localization/Tokens_nl.dat b/P3D/Content/Localization/Tokens_nl.dat index 255018b71..d314ed2e4 100644 --- a/P3D/Content/Localization/Tokens_nl.dat +++ b/P3D/Content/Localization/Tokens_nl.dat @@ -480,6 +480,7 @@ black_out_screen_line4, om verdere schade aan je black_out_screen_line5,Pokémon te voorkomen. --- Credits Screen: +credits_skip,Druk op [] om tot het einde door te spoelen. credits_continue,Druk op [] om verder te gaan. --- Voltorb Flip: diff --git a/P3D/Content/Localization/Tokens_pl.dat b/P3D/Content/Localization/Tokens_pl.dat index 8d6c24ff1..1d184eddd 100644 --- a/P3D/Content/Localization/Tokens_pl.dat +++ b/P3D/Content/Localization/Tokens_pl.dat @@ -493,6 +493,7 @@ black_out_screen_line4,to prevent further injury black_out_screen_line5,to your Pokémon. --- Credits Screen: +credits_skip,Press [] to skip to the end. credits_continue,Press [] to continue. --- Voltorb Flip: diff --git a/P3D/Content/Localization/Tokens_ptbr.dat b/P3D/Content/Localization/Tokens_ptbr.dat index 5b1e275b8..32e7cfe65 100644 --- a/P3D/Content/Localization/Tokens_ptbr.dat +++ b/P3D/Content/Localization/Tokens_ptbr.dat @@ -492,6 +492,7 @@ black_out_screen_line4,para previnir mais danos black_out_screen_line5,a seus Pokémons. --- Credits Screen: +credits_skip,Press [] to skip to the end. credits_continue,aperte [] para continuar. --- Voltorb Flip: diff --git a/P3D/Screens/Credits/CreditsScreen.vb b/P3D/Screens/Credits/CreditsScreen.vb index 102305e6f..2e1cabca9 100644 --- a/P3D/Screens/Credits/CreditsScreen.vb +++ b/P3D/Screens/Credits/CreditsScreen.vb @@ -10,6 +10,7 @@ Public Class CreditsScreen Dim CameraLevels As New List(Of CameraLevel) Dim CurrentCameraLevelIndex As Integer = 0 Dim ExecutedCameraLevel As Boolean = False + Dim CanBeSkipped As Boolean = False Dim TheEnd As Boolean = False Dim FadeAlpha As Integer = 0 @@ -21,7 +22,7 @@ Public Class CreditsScreen SavedOverworld.SetToCurrentEnvironment() End Sub - Public Sub InitializeScreen(ByVal ending As String) + Public Sub InitializeScreen(ByVal ending As String, Optional ByVal CanBeSkipped As Boolean = False) Me.Identification = Identifications.CreditsScreen Me.CanBePaused = False Me.MouseVisible = False @@ -29,6 +30,7 @@ Public Class CreditsScreen Me.CanDrawDebug = True Me.CanMuteAudio = True Me.CanTakeScreenshot = True + Me.CanBeSkipped = CanBeSkipped Screen.TextBox.Showing = False Screen.PokemonImageView.Showing = False @@ -175,6 +177,19 @@ Public Class CreditsScreen CreditsPages(CreditsPages.Count - 1).Draw() Else + If Me.CanBeSkipped = True AndAlso CurrentPageIndex > 2 Then + If FadeAlpha < 255 Then + FadeAlpha += 5 + If FadeAlpha >= 255 Then + FadeAlpha = 255 + End If + End If + + Dim SkipString As String = Localization.GetString("credits_skip", "Press [] to skip to the end.") + Core.SpriteBatch.DrawString(FontManager.InGameFont, SkipString, New Vector2(CInt(windowSize.Width / 2 - FontManager.InGameFont.MeasureString(SkipString).X / 2 + 2), CInt(windowSize.Height - 128 + 2)), New Color(Color.Black, FadeAlpha)) + Core.SpriteBatch.DrawString(FontManager.InGameFont, SkipString, New Vector2(CInt(windowSize.Width / 2 - FontManager.InGameFont.MeasureString(SkipString).X / 2), CInt(windowSize.Height - 128)), New Color(Color.White, FadeAlpha)) + + End If CreditsPages(CurrentPageIndex).Draw() End If End Sub @@ -187,8 +202,16 @@ Public Class CreditsScreen CreditsPages(CurrentPageIndex).Update() + Dim NextPageIndex = CurrentPageIndex + 1 + If Me.CanBeSkipped = True AndAlso CurrentPageIndex > 2 Then + If Controls.Accept(True, True) = True Then + SoundManager.PlaySound("select") + NextPageIndex = CreditsPages.Count - 1 + End If + End If + If CreditsPages(CurrentPageIndex).IsReady = True And TheEnd = False Then - CurrentPageIndex += 1 + CurrentPageIndex = NextPageIndex If CurrentPageIndex = CreditsPages.Count - 1 Then TheEnd = True End If diff --git a/P3D/World/ActionScript/V2/ScriptCommands/DoScreen.vb b/P3D/World/ActionScript/V2/ScriptCommands/DoScreen.vb index 43b92d518..755c260f1 100644 --- a/P3D/World/ActionScript/V2/ScriptCommands/DoScreen.vb +++ b/P3D/World/ActionScript/V2/ScriptCommands/DoScreen.vb @@ -166,13 +166,19 @@ CanContinue = False Case "credits" - Dim ending As String = "Johto" + Dim Ending As String = "Johto" + Dim CanBeSkipped As Boolean = False If argument <> "" Then - ending = argument + If argument.Split(",").Count > 1 Then + CanBeSkipped = CBool(argument.GetSplit(1)) + End If + If argument.GetSplit(0) <> "" Then + Ending = argument.GetSplit(0) + End If End If Core.SetScreen(New CreditsScreen(Core.CurrentScreen)) - CType(Core.CurrentScreen, CreditsScreen).InitializeScreen(ending) + CType(Core.CurrentScreen, CreditsScreen).InitializeScreen(Ending, CanBeSkipped) IsReady = True CanContinue = False diff --git a/P3D/World/ActionScript/V2/ScriptLibrary.vb b/P3D/World/ActionScript/V2/ScriptLibrary.vb index e40636727..1b2d488a6 100644 --- a/P3D/World/ActionScript/V2/ScriptLibrary.vb +++ b/P3D/World/ActionScript/V2/ScriptLibrary.vb @@ -334,7 +334,7 @@ Namespace ScriptVersion2 r(New ScriptCommand("screen", "fadeout", {New ScriptArgument("fadeSpeed", ScriptArgument.ArgumentTypes.Int, True, "5")}.ToList(), "Fades the screen to black.")) r(New ScriptCommand("screen", "fadeoutcolor", {New ScriptArgument("color", ScriptArgument.ArgumentTypes.IntArr, {"0-255"}, True, "0,0,0")}.ToList(), "Sets the color of the screen fade.")) r(New ScriptCommand("screen", "setfade", {New ScriptArgument("alpha", ScriptArgument.ArgumentTypes.Int, {"0-255"})}.ToList(), "Sets the alpha value of the screen fade.")) - r(New ScriptCommand("screen", "credits", {New ScriptArgument("ending", ScriptArgument.ArgumentTypes.Str, True, "Johto")}.ToList(), "Displays the credits scene.")) + r(New ScriptCommand("screen", "Credits", {New ScriptArgument("Ending", ScriptArgument.ArgumentTypes.Str, True, "Johto"), New ScriptArgument("CanBeSkipped", ScriptArgument.ArgumentTypes.Bool, True, "false")}.ToList(), "Displays the credits scene (optionally for a different set of maps/credits, and optionally skippable).")) r(New ScriptCommand("screen", "halloffame", {New ScriptArgument("displayEntryIndex", ScriptArgument.ArgumentTypes.Int, True, "")}.ToList(), "Displays the Hall of Fame. If the argument ""displayEntryIndex"" is not empty, it displays only that entry.")) r(New ScriptCommand("screen", "teachmoves", {New ScriptArgument("pokemonIndex", ScriptArgument.ArgumentTypes.Int), New ScriptArgument("moveIDs", ScriptArgument.ArgumentTypes.IntArr, True, "")}.ToList(), "Displays a move learn screen. If the argument ""moveIDs"" is left empty, it defaults to the Pokémon's tutor moves."))