Make it all actually work

This commit is contained in:
JappaWakka 2024-02-19 20:42:39 +01:00
parent af0b31b567
commit 67b2d55e85
1 changed files with 47 additions and 30 deletions

View File

@ -156,7 +156,7 @@
End If
Dim Visible As Integer = VisibleMode.Always
If Tags.ContainsKey("visible") = True Then
Select Case Tags("visible")
Select Case Tags("visible").ToLower()
Case "0", "always"
Visible = VisibleMode.Always
Case "1", "temporary"
@ -167,12 +167,16 @@
Visible = VisibleMode.Register
End Select
End If
Dim Register As String = ""
If Tags.ContainsKey("register") = True Then
Register = Tags("register")
End If
If Tags.ContainsKey("flyto") = True Then
Dim FlyTo As New List(Of String)
FlyTo = Tags("flyto").Split(CChar(",")).ToList()
cities.Add(New City(Name, MapFiles, CInt(PositionList(0)), CInt(PositionList(1)), CitySize, FlyTo(0), New Vector3(CSng(FlyTo(1)), CSng(FlyTo(2)), CSng(FlyTo(3))), CInt(PlayerPositionList(0)), CInt(PlayerPositionList(1)), Visible))
cities.Add(New City(Name, MapFiles, CInt(PositionList(0)), CInt(PositionList(1)), CitySize, FlyTo(0), New Vector3(CSng(FlyTo(1)), CSng(FlyTo(2)), CSng(FlyTo(3))), CInt(PlayerPositionList(0)), CInt(PlayerPositionList(1)), Visible, Register))
Else
cities.Add(New City(Name, MapFiles, CInt(PositionList(0)), CInt(PositionList(1)), CitySize, "", Nothing, CInt(PlayerPositionList(0)), CInt(PlayerPositionList(1)), Visible))
cities.Add(New City(Name, MapFiles, CInt(PositionList(0)), CInt(PositionList(1)), CitySize, "", Nothing, CInt(PlayerPositionList(0)), CInt(PlayerPositionList(1)), Visible, Register))
End If
Case "route"
Dim Name As String = Tags("name")
@ -228,9 +232,10 @@
If Tags.ContainsKey("playerposition") = True Then
PlayerPositionList = Tags("playerposition").Split(CChar(",")).ToList()
End If
Dim Visible As Integer = VisibleMode.Always
If Tags.ContainsKey("visible") = True Then
Select Case Tags("visible")
Select Case Tags("visible").ToLower()
Case "0", "always"
Visible = VisibleMode.Always
Case "1", "temporary"
@ -241,12 +246,17 @@
Visible = VisibleMode.Register
End Select
End If
Dim Register As String = ""
If Tags.ContainsKey("register") = True Then
Register = Tags("register")
End If
If Tags.ContainsKey("flyto") = True Then
Dim FlyTo As New List(Of String)
FlyTo = Tags("flyto").Split(CChar(",")).ToList()
routes.Add(New Route(Name, MapFiles, CInt(PositionList(0)), CInt(PositionList(1)), RouteDirection, RouteType, FlyTo(0), New Vector3(CSng(FlyTo(1)), CSng(FlyTo(2)), CSng(FlyTo(3))), CInt(PlayerPositionList(0)), CInt(PlayerPositionList(1)), Visible))
routes.Add(New Route(Name, MapFiles, CInt(PositionList(0)), CInt(PositionList(1)), RouteDirection, RouteType, FlyTo(0), New Vector3(CSng(FlyTo(1)), CSng(FlyTo(2)), CSng(FlyTo(3))), CInt(PlayerPositionList(0)), CInt(PlayerPositionList(1)), Visible, Register))
Else
routes.Add(New Route(Name, MapFiles, CInt(PositionList(0)), CInt(PositionList(1)), RouteDirection, RouteType, "", Nothing, CInt(PlayerPositionList(0)), CInt(PlayerPositionList(1)), Visible))
routes.Add(New Route(Name, MapFiles, CInt(PositionList(0)), CInt(PositionList(1)), RouteDirection, RouteType, "", Nothing, CInt(PlayerPositionList(0)), CInt(PlayerPositionList(1)), Visible, Register))
End If
Case "place"
Dim Name As String = Tags("name")
@ -274,9 +284,10 @@
If Tags.ContainsKey("playerposition") = True Then
PlayerPositionList = Tags("playerposition").Split(CChar(",")).ToList()
End If
Dim Visible As Integer = VisibleMode.Always
If Tags.ContainsKey("visible") = True Then
Select Case Tags("visible")
Select Case Tags("visible").ToLower()
Case "0", "always"
Visible = VisibleMode.Always
Case "1", "temporary"
@ -287,12 +298,18 @@
Visible = VisibleMode.Register
End Select
End If
Dim Register As String = ""
If Tags.ContainsKey("register") = True Then
Register = Tags("register")
End If
If Tags.ContainsKey("flyto") = True Then
Dim FlyTo As New List(Of String)
FlyTo = Tags("flyto").Split(CChar(",")).ToList()
places.Add(New Place(Name, MapFiles, CInt(PositionList(0)), CInt(PositionList(1)), PlaceSize, FlyTo(0), New Vector3(CSng(FlyTo(1)), CSng(FlyTo(2)), CSng(FlyTo(3))), CInt(PlayerPositionList(0)), CInt(PlayerPositionList(1)), Visible))
places.Add(New Place(Name, MapFiles, CInt(PositionList(0)), CInt(PositionList(1)), PlaceSize, FlyTo(0), New Vector3(CSng(FlyTo(1)), CSng(FlyTo(2)), CSng(FlyTo(3))), CInt(PlayerPositionList(0)), CInt(PlayerPositionList(1)), Visible, Register))
Else
places.Add(New Place(Name, MapFiles, CInt(PositionList(0)), CInt(PositionList(1)), PlaceSize, "", Nothing, CInt(PlayerPositionList(0)), CInt(PlayerPositionList(1)), Visible))
places.Add(New Place(Name, MapFiles, CInt(PositionList(0)), CInt(PositionList(1)), PlaceSize, "", Nothing, CInt(PlayerPositionList(0)), CInt(PlayerPositionList(1)), Visible, Register))
End If
End Select
@ -397,10 +414,10 @@
If Core.Player.VisitedMaps.ToLower().Split(CChar(",")).Contains(p.ToLower()) = True Then
DoUpdate = True
End If
Exit For
Next
Exit For
ElseIf Place.Visible = VisibleMode.Register Then
If ActionScript.IsRegistered(Place.RegisterName) = True Then
If ActionScript.IsRegistered(Place.Register) = True Then
DoUpdate = True
End If
End If
@ -425,10 +442,10 @@
If Core.Player.VisitedMaps.ToLower().Split(CChar(",")).Contains(p.ToLower()) = True Then
DoUpdate = True
End If
Exit For
Next
Exit For
ElseIf City.Visible = VisibleMode.Register Then
If ActionScript.IsRegistered(City.RegisterName) = True Then
If ActionScript.IsRegistered(City.Register) = True Then
DoUpdate = True
End If
End If
@ -453,10 +470,10 @@
If Core.Player.VisitedMaps.ToLower().Split(CChar(",")).Contains(p.ToLower()) = True Then
DoUpdate = True
End If
Exit For
Next
Exit For
ElseIf Route.Visible = VisibleMode.Register Then
If ActionScript.IsRegistered(Route.RegisterName) = True Then
If ActionScript.IsRegistered(Route.Register) = True Then
DoUpdate = True
End If
End If
@ -555,10 +572,10 @@
If Core.Player.VisitedMaps.ToLower().Split(CChar(",")).Contains(p.ToLower()) = True Then
DoDraw = True
End If
Exit For
Next
Exit For
ElseIf Route.Visible = VisibleMode.Register Then
If ActionScript.IsRegistered(Route.RegisterName) = True Then
If ActionScript.IsRegistered(Route.Register) = True Then
DoDraw = True
End If
End If
@ -588,10 +605,10 @@
If Core.Player.VisitedMaps.ToLower().Split(CChar(",")).Contains(p.ToLower()) = True Then
DoDraw = True
End If
Exit For
Next
Exit For
ElseIf City.Visible = VisibleMode.Register Then
If ActionScript.IsRegistered(City.RegisterName) = True Then
If ActionScript.IsRegistered(City.Register) = True Then
DoDraw = True
End If
End If
@ -621,10 +638,10 @@
If Core.Player.VisitedMaps.ToLower().Split(CChar(",")).Contains(p.ToLower()) = True Then
DoDraw = True
End If
Exit For
Next
Exit For
ElseIf Place.Visible = VisibleMode.Register Then
If ActionScript.IsRegistered(Place.RegisterName) = True Then
If ActionScript.IsRegistered(Place.Register) = True Then
DoDraw = True
End If
End If
@ -888,11 +905,11 @@
Public FlyToPosition As Vector3 = New Vector3(0)
Public Size As CitySize = CitySize.Small
Public Visible As Integer = VisibleMode.Always
Public RegisterName As String = ""
Public Register As String = ""
Dim T As Texture2D = Nothing
Public Sub New(ByVal Name As String, ByVal ContainFiles() As String, ByVal PositionX As Integer, ByVal PositionY As Integer, ByVal Size As CitySize, Optional ByVal FlyToFile As String = "", Optional ByVal FlyToPosition As Vector3 = Nothing, Optional PlayerPositionX As Integer = -1, Optional PlayerPositionY As Integer = -1, Optional Visible As Integer = VisibleMode.Always, Optional RegisterName As String = "")
Public Sub New(ByVal Name As String, ByVal ContainFiles() As String, ByVal PositionX As Integer, ByVal PositionY As Integer, ByVal Size As CitySize, Optional ByVal FlyToFile As String = "", Optional ByVal FlyToPosition As Vector3 = Nothing, Optional PlayerPositionX As Integer = -1, Optional PlayerPositionY As Integer = -1, Optional Visible As Integer = VisibleMode.Always, Optional Register As String = "")
Me.Name = Name
For Each file As String In ContainFiles
@ -916,7 +933,7 @@
Me.FlyToFile = FlyToFile
Me.FlyToPosition = FlyToPosition
Me.Visible = Visible
Me.RegisterName = RegisterName
Me.Register = Register
End Sub
Public Function getPosition() As Vector2
@ -1047,11 +1064,11 @@
Public RouteDirection As RouteDirections = RouteDirections.Horizontal
Public RouteType As RouteTypes = RouteTypes.Land
Public Visible As Integer = VisibleMode.Always
Public RegisterName As String = ""
Public Register As String = ""
Dim T As Texture2D = Nothing
Public Sub New(ByVal Name As String, ByVal ContainFiles() As String, ByVal PositionX As Integer, ByVal PositionY As Integer, ByVal RouteDirection As RouteDirections, ByVal RouteType As RouteTypes, Optional ByVal FlyToFile As String = "", Optional ByVal FlyToPosition As Vector3 = Nothing, Optional PlayerPositionX As Integer = -1, Optional PlayerPositionY As Integer = -1, Optional Visible As Integer = VisibleMode.Always, Optional RegisterName As String = "")
Public Sub New(ByVal Name As String, ByVal ContainFiles() As String, ByVal PositionX As Integer, ByVal PositionY As Integer, ByVal RouteDirection As RouteDirections, ByVal RouteType As RouteTypes, Optional ByVal FlyToFile As String = "", Optional ByVal FlyToPosition As Vector3 = Nothing, Optional PlayerPositionX As Integer = -1, Optional PlayerPositionY As Integer = -1, Optional Visible As Integer = VisibleMode.Always, Optional Register As String = "")
Me.Name = Name
Me.PositionX = PositionX
Me.PositionY = PositionY
@ -1075,7 +1092,7 @@
Me.FlyToPosition = FlyToPosition
Me.Visible = Visible
Me.RegisterName = RegisterName
Me.Register = Register
End Sub
Public Function getPosition() As Vector2
@ -1216,14 +1233,14 @@
Public PlayerPositionY As Integer = -1
Public PlaceSize As PlaceSizes
Public Visible As Integer = VisibleMode.Always
Public RegisterName As String = ""
Public Register As String = ""
Public FlyToFile As String = ""
Public FlyToPosition As Vector3 = New Vector3(0)
Dim T As Texture2D = Nothing
Public Sub New(ByVal Name As String, ByVal ContainFiles() As String, ByVal PositionX As Integer, ByVal PositionY As Integer, ByVal PlaceSize As PlaceSizes, Optional ByVal FlyToFile As String = "", Optional ByVal FlyToPosition As Vector3 = Nothing, Optional PlayerPositionX As Integer = -1, Optional PlayerPositionY As Integer = -1, Optional Visible As Integer = VisibleMode.Always, Optional RegisterName As String = "")
Public Sub New(ByVal Name As String, ByVal ContainFiles() As String, ByVal PositionX As Integer, ByVal PositionY As Integer, ByVal PlaceSize As PlaceSizes, Optional ByVal FlyToFile As String = "", Optional ByVal FlyToPosition As Vector3 = Nothing, Optional PlayerPositionX As Integer = -1, Optional PlayerPositionY As Integer = -1, Optional Visible As Integer = VisibleMode.Always, Optional Register As String = "")
Me.Name = Name
Me.PositionX = PositionX
Me.PositionY = PositionY
@ -1246,7 +1263,7 @@
Me.FlyToFile = FlyToFile
Me.FlyToPosition = FlyToPosition
Me.Visible = Visible
Me.RegisterName = RegisterName
Me.Register = Register
End Sub
Public Function getPosition() As Vector2