mirror of
https://github.com/P3D-Legacy/P3D-Legacy.git
synced 2025-11-03 13:04:40 +01:00
Make Credits Optionally Skippable (you still gotta see the 1st 3 pages)
This commit is contained in:
parent
d05d0b571a
commit
1ef1faa07b
@ -24,7 +24,9 @@ version=2
|
||||
@sound.play(Save)
|
||||
@music.play(silence)
|
||||
:if:<pokemon.counthalloffame>=1
|
||||
@screen.credits
|
||||
@screen.credits(Johto,false)
|
||||
:else
|
||||
@screen.credits(Johto,true)
|
||||
:endif
|
||||
@music.play(barktown)
|
||||
@level.update
|
||||
|
||||
@ -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 [<system.button(enter1)>] to skip to the end.
|
||||
credits_continue,Drücken Sie [<system.button(enter1)>] um fortzufahren.
|
||||
---
|
||||
Voltorb Flip:
|
||||
|
||||
@ -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 [<system.button(enter1)>] to skip to the end.
|
||||
credits_continue,Press [<system.button(enter1)>] to continue.
|
||||
---
|
||||
Voltorb Flip:
|
||||
|
||||
@ -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 [<system.button(enter1)>] to skip to the end.
|
||||
credits_continue,Press [<system.button(enter1)>] to continue.
|
||||
---
|
||||
Voltorb Flip:
|
||||
|
||||
@ -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 [<system.button(enter1)>] to skip to the end.
|
||||
credits_continue,Appuie sur [<system.button(enter1)>] pour continuer.
|
||||
---
|
||||
Voltorb Flip:
|
||||
|
||||
@ -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 [<system.button(enter1)>] om tot het einde door te spoelen.
|
||||
credits_continue,Druk op [<system.button(enter1)>] om verder te gaan.
|
||||
---
|
||||
Voltorb Flip:
|
||||
|
||||
@ -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 [<system.button(enter1)>] to skip to the end.
|
||||
credits_continue,Press [<system.button(enter1)>] to continue.
|
||||
---
|
||||
Voltorb Flip:
|
||||
|
||||
@ -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 [<system.button(enter1)>] to skip to the end.
|
||||
credits_continue,aperte [<system.button(enter1)>] para continuar.
|
||||
---
|
||||
Voltorb Flip:
|
||||
|
||||
@ -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 [<system.button(enter1)>] 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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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."))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user