mirror of
https://github.com/P3D-Legacy/P3D-Legacy.git
synced 2025-07-28 08:14:29 +02:00
Make it possible to exclude poke file from PokéDex
This commit is contained in:
parent
eaa0c8d2c3
commit
16a88c1c22
@ -179,6 +179,16 @@ Public Class PokedexHabitatScreen
|
|||||||
|
|
||||||
For Each file As String In System.IO.Directory.GetFiles(GameController.GamePath & GameModeManager.ActiveGameMode.PokeFilePath, "*.*", IO.SearchOption.AllDirectories)
|
For Each file As String In System.IO.Directory.GetFiles(GameController.GamePath & GameModeManager.ActiveGameMode.PokeFilePath, "*.*", IO.SearchOption.AllDirectories)
|
||||||
If file.EndsWith(".poke") = True Then
|
If file.EndsWith(".poke") = True Then
|
||||||
|
Dim DexInclude As Boolean = True
|
||||||
|
Dim data() As String = System.IO.File.ReadAllLines(file)
|
||||||
|
For Each line As String In data
|
||||||
|
If line.ToLower().StartsWith("dexinclude=") = True Then
|
||||||
|
DexInclude = CBool(line.Remove(0, 11))
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
If DexInclude = True Then
|
||||||
Dim fileName As String = file.Remove(0, (GameController.GamePath & GameModeManager.ActiveGameMode.PokeFilePath & "\").Length - 1)
|
Dim fileName As String = file.Remove(0, (GameController.GamePath & GameModeManager.ActiveGameMode.PokeFilePath & "\").Length - 1)
|
||||||
Dim newHabitat As New PokedexScreen.Habitat(file)
|
Dim newHabitat As New PokedexScreen.Habitat(file)
|
||||||
Dim exists As Boolean = False
|
Dim exists As Boolean = False
|
||||||
@ -193,6 +203,7 @@ Public Class PokedexHabitatScreen
|
|||||||
HabitatList.Add(New PokedexScreen.Habitat(file))
|
HabitatList.Add(New PokedexScreen.Habitat(file))
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
End If
|
||||||
Next
|
Next
|
||||||
Me.HabitatList = (From h As PokedexScreen.Habitat In Me.HabitatList Order By h.Name Ascending).ToList()
|
Me.HabitatList = (From h As PokedexScreen.Habitat In Me.HabitatList Order By h.Name Ascending).ToList()
|
||||||
End Sub
|
End Sub
|
||||||
|
Loading…
x
Reference in New Issue
Block a user