mirror of
https://github.com/P3D-Legacy/P3D-Legacy.git
synced 2025-04-08 18:35:09 +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
P3D
@ -227,7 +227,7 @@ Public Class OverworldScreen
|
||||
|
||||
'Open the MenuScreen:
|
||||
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()
|
||||
SoundManager.PlaySound("menu_open")
|
||||
Core.SetScreen(New NewMenuScreen(Me))
|
||||
@ -240,7 +240,7 @@ Public Class OverworldScreen
|
||||
NotificationPopupList(0).Dismiss()
|
||||
Else
|
||||
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, {}))
|
||||
End If
|
||||
End If
|
||||
|
@ -42,6 +42,7 @@ Public Class Level
|
||||
Public _DayTime As World.DayTimes = World.GetTime
|
||||
Private _environmentType As Integer = 0
|
||||
Private _saveonly As Boolean = False
|
||||
Private _disableMenus As Boolean = False
|
||||
Private _wildPokemonGrass As Boolean = True
|
||||
Private _wildPokemonFloor As Boolean = False
|
||||
Private _wildPokemonWater As Boolean = True
|
||||
@ -394,6 +395,18 @@ Public Class Level
|
||||
End Set
|
||||
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>
|
||||
''' The environment type for this map.
|
||||
''' </summary>
|
||||
|
@ -1021,6 +1021,11 @@
|
||||
Else
|
||||
Screen.Level.SaveOnly = False
|
||||
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 TagExists(Tags, "EnvironmentType") = True Then
|
||||
Screen.Level.EnvironmentType = CInt(GetTag(Tags, "EnvironmentType"))
|
||||
|
Loading…
x
Reference in New Issue
Block a user