If level RideType = 3, no stop once riding/biking

This commit is contained in:
JappaWakka 2023-12-27 17:09:25 +01:00
parent c1cadd3078
commit 168255e1a0
4 changed files with 35 additions and 22 deletions

View File

@ -118,6 +118,9 @@ fieldmove_headbutt_used,used~Headbutt!
fieldmove_waterfall_used,used~Waterfall. fieldmove_waterfall_used,used~Waterfall.
fieldmove_ride_cannot_walk,You cannot walk here!
fieldmove_ride_cannot_ride,You cannot Ride here!
fieldmove_ride_used,used~Ride!
--- ---
GameInteractions: GameInteractions:
game_interaction_interact,Interact game_interaction_interact,Interact
@ -2326,6 +2329,7 @@ item_name_676,Water Memory
Item Use Text: Item Use Text:
item_cannot_use,Now is not the time~to use that. item_cannot_use,Now is not the time~to use that.
item_6_cannot_walk,You cannot walk here!
item_6_missingskin,You can't use this item~without a bicycle skin.*Its name should be the~same as your current one,~but with "_bike" at the end. item_6_missingskin,You can't use this item~without a bicycle skin.*Its name should be the~same as your current one,~but with "_bike" at the end.
item_6_only_custom_gamemodes,This item can't be used~on this GameMode. item_6_only_custom_gamemodes,This item can't be used~on this GameMode.

View File

@ -14,6 +14,9 @@ Namespace Items.KeyItems
Public Overrides Sub Use() Public Overrides Sub Use()
If GameModeManager.ActiveGameMode.IsDefaultGamemode = False AndAlso Core.Player.IsGameJoltSave = False Then If GameModeManager.ActiveGameMode.IsDefaultGamemode = False AndAlso Core.Player.IsGameJoltSave = False Then
If Screen.Level.Riding = True Then If Screen.Level.Riding = True Then
If Screen.Level.RideType = 3 Then
Screen.TextBox.Show(Localization.GetString("item_6_cannot_walk", "You cannot walk here!"), {}, True, False)
Else
Screen.Level.Riding = False Screen.Level.Riding = False
Screen.Level.OwnPlayer.SetTexture(Core.Player.TempRideSkin, True) Screen.Level.OwnPlayer.SetTexture(Core.Player.TempRideSkin, True)
Core.Player.Skin = Core.Player.TempRideSkin Core.Player.Skin = Core.Player.TempRideSkin
@ -26,7 +29,7 @@ Namespace Items.KeyItems
If Screen.Level.IsRadioOn = False OrElse GameJolt.PokegearScreen.StationCanPlay(Screen.Level.SelectedRadioStation) = False Then If Screen.Level.IsRadioOn = False OrElse GameJolt.PokegearScreen.StationCanPlay(Screen.Level.SelectedRadioStation) = False Then
MusicManager.Play(Screen.Level.MusicLoop) MusicManager.Play(Screen.Level.MusicLoop)
End If End If
End If
Else Else
If Screen.Level.Surfing = False AndAlso Screen.Level.Riding = False AndAlso Screen.Camera.IsMoving() = False AndAlso Screen.Camera.Turning = False And Screen.Level.CanRide() = True Then If Screen.Level.Surfing = False AndAlso Screen.Level.Riding = False AndAlso Screen.Camera.IsMoving() = False AndAlso Screen.Camera.Turning = False And Screen.Level.CanRide() = True Then
Dim BikeSkin As String = Core.Player.Skin & "_Bike" Dim BikeSkin As String = Core.Player.Skin & "_Bike"

View File

@ -1014,6 +1014,9 @@ Public Class PartyScreen
Private Sub UseRide() Private Sub UseRide()
If Screen.Level.Riding = True Then If Screen.Level.Riding = True Then
If Screen.Level.RideType = 3 Then
TextBox.Show(Localization.GetString("fieldmove_ride_cannot_walk", "You cannot walk here!"), {}, True, False)
Else
Screen.Level.Riding = False Screen.Level.Riding = False
Screen.Level.OwnPlayer.SetTexture(Core.Player.TempRideSkin, True) Screen.Level.OwnPlayer.SetTexture(Core.Player.TempRideSkin, True)
Core.Player.Skin = Core.Player.TempRideSkin Core.Player.Skin = Core.Player.TempRideSkin
@ -1027,6 +1030,7 @@ Public Class PartyScreen
If Screen.Level.IsRadioOn = False OrElse GameJolt.PokegearScreen.StationCanPlay(Screen.Level.SelectedRadioStation) = False Then If Screen.Level.IsRadioOn = False OrElse GameJolt.PokegearScreen.StationCanPlay(Screen.Level.SelectedRadioStation) = False Then
MusicManager.Play(Level.MusicLoop, True, 0.01F) MusicManager.Play(Level.MusicLoop, True, 0.01F)
End If End If
End If
Else Else
If Screen.Level.Surfing = False And Screen.Camera.IsMoving() = False And Screen.Camera.Turning = False And Level.CanRide() = True Then If Screen.Level.Surfing = False And Screen.Camera.IsMoving() = False And Screen.Camera.Turning = False And Level.CanRide() = True Then
ChooseBox.Showing = False ChooseBox.Showing = False
@ -1057,7 +1061,7 @@ Public Class PartyScreen
MusicManager.Play("ride", True) MusicManager.Play("ride", True)
End If End If
Else Else
TextBox.Show("You cannot Ride here!", {}, True, False) TextBox.Show(Localization.GetString("fieldmove_ride_cannot_ride", "You cannot Ride here!"), {}, True, False)
End If End If
End If End If
End Sub End Sub

View File

@ -324,7 +324,7 @@ Public Class Level
''' <summary> ''' <summary>
''' The type of Ride the player can use on this map. ''' The type of Ride the player can use on this map.
''' </summary> ''' </summary>
''' <remarks>0 = Depends on CanDig and CanFly, 1 = True, 2 = False</remarks> ''' <remarks>0 = Depends on CanDig and CanFly, 1 = True, 2 = False, 3 = Can't stop riding</remarks>
Public Property RideType As Integer Public Property RideType As Integer
Get Get
Return Me._rideType Return Me._rideType
@ -1214,6 +1214,8 @@ Public Class Level
Return True Return True
Case 2 Case 2
Return False Return False
Case 3
Return True
End Select End Select
End If End If
If Screen.Level.CanDig = False And Screen.Level.CanFly = False Then If Screen.Level.CanDig = False And Screen.Level.CanFly = False Then