mirror of
https://github.com/P3D-Legacy/P3D-Legacy.git
synced 2025-07-27 15:54:25 +02:00
Added "DisableMenus" map tag
When set to 1, prevents the player from opening the start menu or accessing the PokéGear.
This commit is contained in:
parent
ee05af333c
commit
1a7e08d361
@ -227,7 +227,7 @@ Public Class OverworldScreen
|
|||||||
|
|
||||||
'Open the MenuScreen:
|
'Open the MenuScreen:
|
||||||
If KeyBoardHandler.KeyPressed(KeyBindings.OpenInventoryKey) = True Or ControllerHandler.ButtonPressed(Buttons.X) = True Then
|
If KeyBoardHandler.KeyPressed(KeyBindings.OpenInventoryKey) = True Or ControllerHandler.ButtonPressed(Buttons.X) = True Then
|
||||||
If Screen.Camera.IsMoving() = False And ActionScript.IsReady = True Then
|
If Screen.Camera.IsMoving() = False And ActionScript.IsReady = True AndAlso Screen.Level.DisableMenus = False Then
|
||||||
Level.RouteSign.Hide()
|
Level.RouteSign.Hide()
|
||||||
SoundManager.PlaySound("menu_open")
|
SoundManager.PlaySound("menu_open")
|
||||||
Core.SetScreen(New NewMenuScreen(Me))
|
Core.SetScreen(New NewMenuScreen(Me))
|
||||||
@ -240,7 +240,7 @@ Public Class OverworldScreen
|
|||||||
NotificationPopupList(0).Dismiss()
|
NotificationPopupList(0).Dismiss()
|
||||||
Else
|
Else
|
||||||
If Core.Player.HasPokegear = True Or GameController.IS_DEBUG_ACTIVE = True Or Core.Player.SandBoxMode = True Then
|
If Core.Player.HasPokegear = True Or GameController.IS_DEBUG_ACTIVE = True Or Core.Player.SandBoxMode = True Then
|
||||||
If Screen.Camera.IsMoving() = False And ActionScript.IsReady = True AndAlso Screen.Level.SaveOnly = False AndAlso Screen.Level.IsBugCatchingContest = False Then
|
If Screen.Camera.IsMoving() = False And ActionScript.IsReady = True AndAlso Screen.Level.SaveOnly = False AndAlso Screen.Level.DisableMenus = False AndAlso Screen.Level.IsBugCatchingContest = False Then
|
||||||
Core.SetScreen(New GameJolt.PokegearScreen(Me, GameJolt.PokegearScreen.EntryModes.MainMenu, {}))
|
Core.SetScreen(New GameJolt.PokegearScreen(Me, GameJolt.PokegearScreen.EntryModes.MainMenu, {}))
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
@ -42,6 +42,7 @@ Public Class Level
|
|||||||
Public _DayTime As World.DayTimes = World.GetTime
|
Public _DayTime As World.DayTimes = World.GetTime
|
||||||
Private _environmentType As Integer = 0
|
Private _environmentType As Integer = 0
|
||||||
Private _saveonly As Boolean = False
|
Private _saveonly As Boolean = False
|
||||||
|
Private _disableMenus As Boolean = False
|
||||||
Private _wildPokemonGrass As Boolean = True
|
Private _wildPokemonGrass As Boolean = True
|
||||||
Private _wildPokemonFloor As Boolean = False
|
Private _wildPokemonFloor As Boolean = False
|
||||||
Private _wildPokemonWater As Boolean = True
|
Private _wildPokemonWater As Boolean = True
|
||||||
@ -394,6 +395,18 @@ Public Class Level
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' If the player should be prevented from opening the start menu or accessing the PokéGear..
|
||||||
|
''' </summary>
|
||||||
|
Public Property DisableMenus As Boolean
|
||||||
|
Get
|
||||||
|
Return Me._disableMenus
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
Me._disableMenus = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
''' <summary>
|
''' <summary>
|
||||||
''' The environment type for this map.
|
''' The environment type for this map.
|
||||||
''' </summary>
|
''' </summary>
|
||||||
|
@ -1021,6 +1021,11 @@
|
|||||||
Else
|
Else
|
||||||
Screen.Level.SaveOnly = False
|
Screen.Level.SaveOnly = False
|
||||||
End If
|
End If
|
||||||
|
If TagExists(Tags, "DisableMenus") = True Then
|
||||||
|
Screen.Level.DisableMenus = CBool(GetTag(Tags, "DisableMenus"))
|
||||||
|
Else
|
||||||
|
Screen.Level.DisableMenus = False
|
||||||
|
End If
|
||||||
If _reload = False Then
|
If _reload = False Then
|
||||||
If TagExists(Tags, "EnvironmentType") = True Then
|
If TagExists(Tags, "EnvironmentType") = True Then
|
||||||
Screen.Level.EnvironmentType = CInt(GetTag(Tags, "EnvironmentType"))
|
Screen.Level.EnvironmentType = CInt(GetTag(Tags, "EnvironmentType"))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user