allow white space before trainer scripts for insight detection

This commit is contained in:
darkfire006 2022-08-23 00:08:55 -05:00
parent d4ad4e2e45
commit 0e32b45b6c
1 changed files with 5 additions and 4 deletions
P3D/Entites/Other

View File

@ -359,16 +359,17 @@
Dim trainerContent() As String = System.IO.File.ReadAllLines(trainerFilePath)
For Each line As String In trainerContent
If line.StartsWith("@Trainer:") = True Then
Dim trainerID As String = line.GetSplit(1, ":")
Dim l As String = line.Trim().ToLower()
If l.StartsWith("@trainer:") = True Then
Dim trainerID As String = l.GetSplit(1, ":")
If Trainer.IsBeaten(trainerID) = True Then
Exit Sub
Else
Dim t As New Trainer(trainerID)
InSightMusic = t.GetInSightMusic()
End If
ElseIf line.ToLower().StartsWith("@battle.starttrainer(") = True Then
Dim trainerID As String = line.Remove(line.Length - 1, 1).Remove(0, "@battle.starttrainer(".Length)
ElseIf l.StartsWith("@battle.starttrainer(") = True Then
Dim trainerID As String = l.Remove(l.Length - 1, 1).Remove(0, "@battle.starttrainer(".Length)
If Trainer.IsBeaten(trainerID) = True Then
Exit Sub
Else