Allow multiple Places/EnvironmentTypes

This commit is contained in:
JappaWakka 2023-12-04 17:07:07 +01:00
parent 34a856e1a3
commit bd36bbfad0
1 changed files with 12 additions and 2 deletions

View File

@ -241,7 +241,15 @@ Public Class EvolutionCondition
canEvolve = False canEvolve = False
End If End If
Case ConditionTypes.Place Case ConditionTypes.Place
If Screen.Level.MapName.ToLower() <> c.Argument.ToLower() Then Dim places As List(Of String) = c.Argument.Split(CChar(";")).ToList()
Dim PlaceMatch As Boolean = False
For i = 0 To places.Count - 1
If places(i).ToLower = Screen.Level.MapName.ToLower() Then
PlaceMatch = True
Exit For
End If
Next
If PlaceMatch = False Then
canEvolve = False canEvolve = False
End If End If
Case ConditionTypes.Trade Case ConditionTypes.Trade
@ -295,7 +303,9 @@ Public Class EvolutionCondition
canEvolve = False canEvolve = False
End If End If
Case ConditionTypes.EnvironmentType Case ConditionTypes.EnvironmentType
If Screen.Level.EnvironmentType <> CInt(c.Argument) Then Dim environments As List(Of String) = c.Argument.Split(CChar(";")).ToList()
If environments.Contains(CStr(Screen.Level.EnvironmentType)) = False Then
canEvolve = False canEvolve = False
End If End If
End Select End Select