From 2c7fbf83647cb37527dde1a831968745d42c95bc Mon Sep 17 00:00:00 2001 From: JappaWakka Date: Thu, 17 Feb 2022 13:46:15 +0100 Subject: [PATCH] DayTime, Level & PlayerSkin improvements * Changed the DayTime enum name to DayTimes for consistency with other enums like Seasons * Changing the EnvironmentType or WeatherType will now not reset back to the default when Reloading a map with the R key (Warping or loading a different map normally does reset those properties) * @level.setdaytime(int) is now @environment.setdaytime(int), which sets the DayTime permanently across maps. Setting the daytime to any other value than 1 2 3 or 4 will reset the daytime to the default one * Added command @player.setskin(name) which will permanently change the player's skin, unlike @player.wearskin(name) which only changes the skin temporarily. --- P3D/Pokemon/Monster/PokemonInteractions.vb | 4 +- P3D/Screens/Inventory/PokegearScreen.vb | 12 +- P3D/Screens/MainMenu/PressStartScreen.vb | 12 +- .../V2/ScriptCommands/DoEnvironment.vb | 10 ++ .../ActionScript/V2/ScriptCommands/DoLevel.vb | 3 - .../V2/ScriptCommands/DoPlayer.vb | 9 ++ P3D/World/ActionScript/V2/ScriptLibrary.vb | 6 +- P3D/World/Level.vb | 24 ++-- P3D/World/LevelLoader.vb | 38 +++--- P3D/World/SkyDome.vb | 16 +-- P3D/World/World.vb | 119 +++++++++--------- 11 files changed, 138 insertions(+), 115 deletions(-) diff --git a/P3D/Pokemon/Monster/PokemonInteractions.vb b/P3D/Pokemon/Monster/PokemonInteractions.vb index bdd5f69ff..784b9e8b3 100644 --- a/P3D/Pokemon/Monster/PokemonInteractions.vb +++ b/P3D/Pokemon/Monster/PokemonInteractions.vb @@ -427,7 +427,7 @@ r = New ReactionContainer(" is looking~up at the sky.", MessageBulb.NotifcationTypes.Waiting) End If Case 27 - If IsOutside() = True And World.GetTime() = World.DayTime.Night And World.GetCurrentRegionWeather() = World.Weathers.Clear Then + If IsOutside() = True And World.GetTime() = World.DayTimes.Night And World.GetCurrentRegionWeather() = World.Weathers.Clear Then r = New ReactionContainer("Your Pokémon is happily~gazing at the beautiful,~starry sky!", MessageBulb.NotifcationTypes.Waiting) End If Case 28 @@ -437,7 +437,7 @@ r = New ReactionContainer(" is looking~up at the ceiling.", MessageBulb.NotifcationTypes.Note) End If Case 30 - If IsOutside() = True And World.GetTime() = World.DayTime.Night Then + If IsOutside() = True And World.GetTime() = World.DayTimes.Night Then r = New ReactionContainer("Your Pokémon is staring~spellbound at the night sky!", MessageBulb.NotifcationTypes.Friendly) End If Case 31 diff --git a/P3D/Screens/Inventory/PokegearScreen.vb b/P3D/Screens/Inventory/PokegearScreen.vb index dac0d0a6e..a70eb50ae 100644 --- a/P3D/Screens/Inventory/PokegearScreen.vb +++ b/P3D/Screens/Inventory/PokegearScreen.vb @@ -209,13 +209,13 @@ Core.SpriteBatch.Draw(TextureManager.GetTexture("GUI\Menus\pokegear"), New Rectangle(CInt(startPos.X + 34 + FontManager.MiniFont.MeasureString(t2).X), CInt(startPos.Y + 8), 16, 16), New Rectangle(112, 112, 16, 16), Color.White) End If Select Case World.GetTime - Case World.DayTime.Night + Case World.DayTimes.Night Core.SpriteBatch.Draw(TextureManager.GetTexture("GUI\Menus\pokegear"), New Rectangle(CInt(startPos.X + width - FontManager.MiniFont.MeasureString(t).X - 34), CInt(startPos.Y + 6), 16, 16), New Rectangle(64, 112, 8, 8), Color.White) - Case World.DayTime.Morning + Case World.DayTimes.Morning Core.SpriteBatch.Draw(TextureManager.GetTexture("GUI\Menus\pokegear"), New Rectangle(CInt(startPos.X + width - FontManager.MiniFont.MeasureString(t).X - 34), CInt(startPos.Y + 6), 16, 16), New Rectangle(72, 112, 8, 8), Color.White) - Case World.DayTime.Day + Case World.DayTimes.Day Core.SpriteBatch.Draw(TextureManager.GetTexture("GUI\Menus\pokegear"), New Rectangle(CInt(startPos.X + width - FontManager.MiniFont.MeasureString(t).X - 34), CInt(startPos.Y + 6), 16, 16), New Rectangle(64, 120, 8, 8), Color.White) - Case World.DayTime.Evening + Case World.DayTimes.Evening Core.SpriteBatch.Draw(TextureManager.GetTexture("GUI\Menus\pokegear"), New Rectangle(CInt(startPos.X + width - FontManager.MiniFont.MeasureString(t).X - 34), CInt(startPos.Y + 6), 16, 16), New Rectangle(72, 120, 8, 8), Color.White) End Select End Sub @@ -1541,7 +1541,7 @@ Public OverwriteMax As Decimal Public Name As String = "" Public Region As String = "" - Public DayTimes As New List(Of World.DayTime) + Public DayTimes As New List(Of World.DayTimes) Public Expansions As New List(Of String) Public Music As String = "" Public Content As String = "" @@ -1576,7 +1576,7 @@ Dim lDayTimes() As String = data(4).Split(CChar(",")) For Each daytime As String In lDayTimes If StringHelper.IsNumeric(daytime) = True Then - DayTimes.Add(CType(CInt(daytime), World.DayTime)) + DayTimes.Add(CType(CInt(daytime), World.DayTimes)) End If Next diff --git a/P3D/Screens/MainMenu/PressStartScreen.vb b/P3D/Screens/MainMenu/PressStartScreen.vb index 5f25b2727..a2b749bf5 100644 --- a/P3D/Screens/MainMenu/PressStartScreen.vb +++ b/P3D/Screens/MainMenu/PressStartScreen.vb @@ -72,25 +72,25 @@ Public Class PressStartScreen Dim dayTime = World.GetTime Select Case dayTime - Case World.DayTime.Morning + Case World.DayTimes.Morning _fromColor = New Color(246, 170, 109) _toColor = New Color(248, 248, 248) _textColor = Color.Black - Case World.DayTime.Day + Case World.DayTimes.Day _fromColor = New Color(120, 160, 248) _toColor = New Color(248, 248, 248) _textColor = Color.Black - Case World.DayTime.Evening + Case World.DayTimes.Evening _fromColor = New Color(32, 64, 168) _toColor = New Color(40, 80, 88) _textColor = Color.White - Case World.DayTime.Night + Case World.DayTimes.Night _fromColor = New Color(32, 64, 168) _toColor = New Color(0, 0, 0) _textColor = Color.White End Select - If dayTime = World.DayTime.Day OrElse dayTime = World.DayTime.Morning Then + If dayTime = World.DayTimes.Day OrElse dayTime = World.DayTimes.Morning Then Dim clouds = New Scene.Clouds() clouds.LoadContent() _entities.Add(clouds) @@ -787,7 +787,7 @@ Public Class NewMainMenuScreen Dim fontColor As Color = Color.White Dim dayTime = World.GetTime - If dayTime = World.DayTime.Day OrElse dayTime = World.DayTime.Morning Then + If dayTime = World.DayTimes.Day OrElse dayTime = World.DayTimes.Morning Then fontColor = Color.Black End If diff --git a/P3D/World/ActionScript/V2/ScriptCommands/DoEnvironment.vb b/P3D/World/ActionScript/V2/ScriptCommands/DoEnvironment.vb index 4b5a45673..4a8bde298 100644 --- a/P3D/World/ActionScript/V2/ScriptCommands/DoEnvironment.vb +++ b/P3D/World/ActionScript/V2/ScriptCommands/DoEnvironment.vb @@ -50,6 +50,16 @@ End Select Case "toggledarkness" Screen.Level.IsDark = Not Screen.Level.IsDark + Case "setdaytime" + Dim daytime As Integer = int(argument) + If daytime > 0 AndAlso daytime <= 4 Then + World.setDaytime = CType(daytime, World.DayTimes) + Screen.Level.DayTime = daytime + Else + World.setDaytime = Nothing + Screen.Level.DayTime = World.GetTime + End If + IsReady = True End Select Screen.Level.World.Initialize(Screen.Level.EnvironmentType, Screen.Level.WeatherType) diff --git a/P3D/World/ActionScript/V2/ScriptCommands/DoLevel.vb b/P3D/World/ActionScript/V2/ScriptCommands/DoLevel.vb index b7cc9292d..f50189335 100644 --- a/P3D/World/ActionScript/V2/ScriptCommands/DoLevel.vb +++ b/P3D/World/ActionScript/V2/ScriptCommands/DoLevel.vb @@ -69,9 +69,6 @@ Case "setsafari" Screen.Level.IsSafariZone = CBool(argument) IsReady = True - Case "setdaytime" - Screen.Level.DayTime = CInt(argument) - IsReady = True End Select End Sub diff --git a/P3D/World/ActionScript/V2/ScriptCommands/DoPlayer.vb b/P3D/World/ActionScript/V2/ScriptCommands/DoPlayer.vb index 52d57c8cc..22c1f5164 100644 --- a/P3D/World/ActionScript/V2/ScriptCommands/DoPlayer.vb +++ b/P3D/World/ActionScript/V2/ScriptCommands/DoPlayer.vb @@ -41,6 +41,15 @@ .UpdateEntity() End With IsReady = True + Case "setskin" + Core.Player.Skin = argument + With Screen.Level.OwnPlayer + Dim TextureID As String = argument + .SetTexture(TextureID, False) + + .UpdateEntity() + End With + IsReady = True Case "move" If Started = False Then Screen.Camera.Move(sng(argument)) diff --git a/P3D/World/ActionScript/V2/ScriptLibrary.vb b/P3D/World/ActionScript/V2/ScriptLibrary.vb index cab8c6162..1c48cce35 100644 --- a/P3D/World/ActionScript/V2/ScriptLibrary.vb +++ b/P3D/World/ActionScript/V2/ScriptLibrary.vb @@ -204,7 +204,6 @@ Namespace ScriptVersion2 r(New ScriptCommand("level", "waitforsave", "Makes the level idle until the current saving of an GameJolt save is done.")) r(New ScriptCommand("level", "reload", "Reloads the current map.")) r(New ScriptCommand("level", "setsafari", {New ScriptArgument("safari", ScriptArgument.ArgumentTypes.Bool)}.ToList(), "Sets if the current map is a Safari Zone (influences battle style).")) - r(New ScriptCommand("level", "setdaytime", {New ScriptArgument("daytime", ScriptArgument.ArgumentTypes.Int)}.ToList(), "Sets the daytime of the current map.")) ' Constructs: r(New ScriptCommand("level", "mapfile", "str", "Returns the mapfile of the currently loaded map.", ",", True)) r(New ScriptCommand("level", "levelfile", "str", "Returns the mapfile of the currently loaded map.", ",", True)) @@ -406,7 +405,7 @@ Namespace ScriptVersion2 r(New ScriptCommand("environment", "setisdark", {New ScriptArgument("isDark", ScriptArgument.ArgumentTypes.Bool)}.ToList(), "Sets the ""IsDark"" parameter of the current map.")) r(New ScriptCommand("environment", "setrenderdistance", {New ScriptArgument("distance", ScriptArgument.ArgumentTypes.Str, {"0-4", "tiny", "small", "normal", "far", "extreme"})}.ToList(), "Sets the render distance.")) r(New ScriptCommand("environment", "toggledarkness", "Toggles the ""IsDark"" parameter of the current map.")) - + r(New ScriptCommand("environment", "setdaytime", {New ScriptArgument("daytime", ScriptArgument.ArgumentTypes.Int)}.ToList(), "Sets the daytime to use for the Outside EnvironmentType (0). Can be 1-4, any other number resets to the default daytime.")) ' Constructs: r(New ScriptCommand("environment", "daytime", "str", "Returns the current DayTime of the game.", ",", True)) r(New ScriptCommand("environment", "daytimeID", "int", "Returns the current DayTimeID of the game.", ",", True)) @@ -440,7 +439,8 @@ Namespace ScriptVersion2 r(New ScriptCommand("player", "receivepokedex", "Makes the Pokédex accessible for the player.")) r(New ScriptCommand("player", "receivepokegear", "Makes the Pokégear accessible for the player.")) r(New ScriptCommand("player", "renamerival", "Opens the rival rename screen.")) - r(New ScriptCommand("player", "wearskin", {New ScriptArgument("skin", ScriptArgument.ArgumentTypes.Str)}.ToList(), "Changes the player skin.")) + r(New ScriptCommand("player", "wearskin", {New ScriptArgument("skin", ScriptArgument.ArgumentTypes.Str)}.ToList(), "Changes the player skin temporarily.")) + r(New ScriptCommand("player", "setskin", {New ScriptArgument("skin", ScriptArgument.ArgumentTypes.Str)}.ToList(), "Changes the player skin permanently.")) r(New ScriptCommand("player", "setonlineskin", {New ScriptArgument("gamejoltID", ScriptArgument.ArgumentTypes.Str)}.ToList(), "Changes the player skin to a skin downloaded for the GameJoltID.")) r(New ScriptCommand("player", "move", {New ScriptArgument("steps", ScriptArgument.ArgumentTypes.Sng)}.ToList(), "Starts the player movement.")) r(New ScriptCommand("player", "moveasync", {New ScriptArgument("steps", ScriptArgument.ArgumentTypes.Str)}.ToList(), "Starts the async player movement.")) diff --git a/P3D/World/Level.vb b/P3D/World/Level.vb index 75163c553..888fc6c74 100644 --- a/P3D/World/Level.vb +++ b/P3D/World/Level.vb @@ -39,7 +39,7 @@ Public Class Level Private _canFly As Boolean = False Private _rideType As Integer = 0 Private _weatherType As Integer = 0 - Public _DayTime As World.DayTime = World.GetTime + Public _DayTime As World.DayTimes = World.GetTime Private _environmentType As Integer = 0 Private _wildPokemonGrass As Boolean = True Private _wildPokemonFloor As Boolean = False @@ -351,13 +351,13 @@ Public Class Level Public Property DayTime As Integer Get Select Case Me._DayTime - Case World.DayTime.Day + Case World.DayTimes.Day Return 1 - Case World.DayTime.Night + Case World.DayTimes.Night Return 2 - Case World.DayTime.Morning + Case World.DayTimes.Morning Return 3 - Case World.DayTime.Evening + Case World.DayTimes.Evening Return 4 Case Else Return World.GetTime @@ -366,13 +366,13 @@ Public Class Level Set(value As Integer) Select Case value Case 1 - Me._DayTime = World.DayTime.Day + Me._DayTime = World.DayTimes.Day Case 2 - Me._DayTime = World.DayTime.Night + Me._DayTime = World.DayTimes.Night Case 3 - Me._DayTime = World.DayTime.Morning + Me._DayTime = World.DayTimes.Morning Case 4 - Me._DayTime = World.DayTime.Evening + Me._DayTime = World.DayTimes.Evening Case Else Me._DayTime = World.GetTime End Select @@ -733,7 +733,7 @@ Public Class Level ''' Loads a level from a levelfile. ''' ''' The path to load the level from. Start with "|" to prevent loading a levelfile. - Public Sub Load(ByVal Levelpath As String) + Public Sub Load(ByVal Levelpath As String, Optional Reload As Boolean = False) ' copy all changed files If GameController.IS_DEBUG_ACTIVE Then @@ -750,7 +750,7 @@ Public Class Level If Levelpath.StartsWith("|") = False Then Me.StopOffsetMapUpdate() Dim levelLoader As New LevelLoader() - levelLoader.LoadLevel(params.ToArray()) + levelLoader.LoadLevel(params.ToArray(), Reload) Else Logger.Debug("Don't attempt to load a levelfile.") End If @@ -829,7 +829,7 @@ Public Class Level If KeyBoardHandler.KeyPressed(Keys.R) = True And Core.CurrentScreen.Identification = Screen.Identifications.OverworldScreen Then Core.OffsetMaps.Clear() Logger.Debug(String.Format("Reload map file: {0}", Me._levelFile)) - Me.Load(LevelFile) + Me.Load(LevelFile, True) End If End If diff --git a/P3D/World/LevelLoader.vb b/P3D/World/LevelLoader.vb index 4f6fb453e..b3dbb50ec 100644 --- a/P3D/World/LevelLoader.vb +++ b/P3D/World/LevelLoader.vb @@ -4,6 +4,7 @@ Public Shared LoadedOffsetMapOffsets As New List(Of Vector3) Public Shared LoadedOffsetMapNames As New List(Of String) + Private _reload As Boolean = False Private Enum TagTypes Entity @@ -46,10 +47,10 @@ ''' Loads the level. ''' ''' Params contruction: String LevelFile, bool IsOffsetMap, Vector3 Offset, int Offsetmaplevel, Str() InstanceLoadedOffsetMaps - Public Sub LoadLevel(ByVal Params As Object()) + Public Sub LoadLevel(ByVal Params As Object(), Optional Reload As Boolean = False) Busy += 1 TempParams = Params - + _reload = Reload If MULTITHREAD = True Then Dim t As New Threading.Thread(AddressOf InternalLoad) t.IsBackground = True @@ -992,23 +993,24 @@ Else Screen.Level.RideType = 0 End If + If _reload = False Then + If TagExists(Tags, "EnvironmentType") = True Then + Screen.Level.EnvironmentType = CInt(GetTag(Tags, "EnvironmentType")) + Else + Screen.Level.EnvironmentType = 0 + End If - If TagExists(Tags, "EnvironmentType") = True Then - Screen.Level.EnvironmentType = CInt(GetTag(Tags, "EnvironmentType")) - Else - Screen.Level.EnvironmentType = 0 - End If + If TagExists(Tags, "Weather") = True Then + Screen.Level.WeatherType = CInt(GetTag(Tags, "Weather")) + Else + Screen.Level.WeatherType = 0 + End If - If TagExists(Tags, "Weather") = True Then - Screen.Level.WeatherType = CInt(GetTag(Tags, "Weather")) - Else - Screen.Level.WeatherType = 0 - End If - - If TagExists(Tags, "DayTime") = True Then - Screen.Level.DayTime = CInt(GetTag(Tags, "DayTime")) - Else - Screen.Level.DayTime = 0 + If TagExists(Tags, "DayTime") = True Then + Screen.Level.DayTime = CInt(GetTag(Tags, "DayTime")) + Else + Screen.Level.DayTime = 0 + End If End If If TagExists(Tags, "Lighting") = True Then @@ -1023,7 +1025,7 @@ Screen.Level.IsDark = False End If - If Screen.Level.DayTime = World.DayTime.Night Then + If Screen.Level.DayTime = World.DayTimes.Night Then If World.IsAurora = False Then Dim chance = Random.Next(0, 250) If chance = 0 Then diff --git a/P3D/World/SkyDome.vb b/P3D/World/SkyDome.vb index ad66bc963..0448823fa 100644 --- a/P3D/World/SkyDome.vb +++ b/P3D/World/SkyDome.vb @@ -246,7 +246,7 @@ End Function Private Function GetCloudsTexture() As Texture2D - Dim time As World.DayTime = World.GetTime + Dim time As World.DayTimes = World.GetTime Select Case Screen.Level.World.CurrentMapWeather Case World.Weathers.Rain, World.Weathers.Blizzard, World.Weathers.Thunderstorm, World.Weathers.Snow @@ -262,11 +262,11 @@ Case 4 Return TextureManager.GetTexture("SkyDomeResource\Clouds_Evening") End Select - If time = World.DayTime.Morning Then + If time = World.DayTimes.Morning Then Return TextureManager.GetTexture("SkyDomeResource\Clouds_Morning") - ElseIf time = World.DayTime.Day Then + ElseIf time = World.DayTimes.Day Then Return TextureManager.GetTexture("SkyDomeResource\Clouds_Day") - ElseIf time = World.DayTime.Evening Then + ElseIf time = World.DayTimes.Evening Then Return TextureManager.GetTexture("SkyDomeResource\Clouds_Evening") Else Return TextureManager.GetTexture("SkyDomeResource\Clouds_Night") @@ -288,14 +288,14 @@ Case 4 Return TextureManager.GetTexture("SkyDomeResource\Sky_Evening") End Select - Dim time As World.DayTime = World.GetTime + Dim time As World.DayTimes = World.GetTime Select Case Screen.Level.World.CurrentMapWeather Case World.Weathers.Clear - If time = World.DayTime.Morning Then + If time = World.DayTimes.Morning Then Return TextureManager.GetTexture("SkyDomeResource\Sky_Morning") - ElseIf time = World.DayTime.Day Then + ElseIf time = World.DayTimes.Day Then Return TextureManager.GetTexture("SkyDomeResource\Sky_Day") - ElseIf time = World.DayTime.Evening Then + ElseIf time = World.DayTimes.Evening Then Return TextureManager.GetTexture("SkyDomeResource\Sky_Evening") Else Return TextureManager.GetTexture("SkyDomeResource\Sky_Night") diff --git a/P3D/World/World.vb b/P3D/World/World.vb index 6f51ac5c6..e680d88bf 100644 --- a/P3D/World/World.vb +++ b/P3D/World/World.vb @@ -5,6 +5,7 @@ Public Class World Private Shared _regionWeather As Weathers = Weathers.Clear Private Shared _regionWeatherSet As Boolean = False Public Shared setSeason As Seasons = Nothing + Public Shared setDaytime As DayTimes = Nothing Public Shared IsMainMenu As Boolean = False Public Shared IsAurora As Boolean = False @@ -38,7 +39,7 @@ Public Class World Forest = 5 End Enum - Public Enum DayTime As Integer + Public Enum DayTimes As Integer Night = 0 Morning = 1 Day = 2 @@ -78,64 +79,68 @@ Public Class World End Get End Property - Public Shared ReadOnly Property GetTime() As DayTime + Public Shared ReadOnly Property GetTime() As DayTimes Get If IsMainMenu Then - Return DayTime.Day + Return DayTimes.Day End If - Dim time As DayTime = DayTime.Day + If setDaytime <> Nothing Then + Return setDaytime + Else + Dim time As DayTimes = DayTimes.Day - Dim Hour As Integer = My.Computer.Clock.LocalTime.Hour - If NeedServerObject() = True Then - Dim data() As String = ServerTimeData.Split(CChar(",")) - Hour = CInt(data(0)) + Dim Hour As Integer = My.Computer.Clock.LocalTime.Hour + If NeedServerObject() = True Then + Dim data() As String = ServerTimeData.Split(CChar(",")) + Hour = CInt(data(0)) + End If + + Select Case CurrentSeason + Case Seasons.Winter + If Hour > 18 Or Hour < 7 Then + time = DayTimes.Night + ElseIf Hour > 6 And Hour < 11 Then + time = DayTimes.Morning + ElseIf Hour > 10 And Hour < 17 Then + time = DayTimes.Day + ElseIf Hour > 16 And Hour < 19 Then + time = DayTimes.Evening + End If + Case Seasons.Spring + If Hour > 19 Or Hour < 5 Then + time = DayTimes.Night + ElseIf Hour > 4 And Hour < 10 Then + time = DayTimes.Morning + ElseIf Hour > 9 And Hour < 17 Then + time = DayTimes.Day + ElseIf Hour > 16 And Hour < 20 Then + time = DayTimes.Evening + End If + Case Seasons.Summer + If Hour > 20 Or Hour < 4 Then + time = DayTimes.Night + ElseIf Hour > 3 And Hour < 9 Then + time = DayTimes.Morning + ElseIf Hour > 8 And Hour < 19 Then + time = DayTimes.Day + ElseIf Hour > 18 And Hour < 21 Then + time = DayTimes.Evening + End If + Case Seasons.Fall + If Hour > 19 Or Hour < 6 Then + time = DayTimes.Night + ElseIf Hour > 5 And Hour < 10 Then + time = DayTimes.Morning + ElseIf Hour > 9 And Hour < 18 Then + time = DayTimes.Day + ElseIf Hour > 17 And Hour < 20 Then + time = DayTimes.Evening + End If + End Select + + Return time End If - - Select Case CurrentSeason - Case Seasons.Winter - If Hour > 18 Or Hour < 7 Then - time = DayTime.Night - ElseIf Hour > 6 And Hour < 11 Then - time = DayTime.Morning - ElseIf Hour > 10 And Hour < 17 Then - time = DayTime.Day - ElseIf Hour > 16 And Hour < 19 Then - time = DayTime.Evening - End If - Case Seasons.Spring - If Hour > 19 Or Hour < 5 Then - time = DayTime.Night - ElseIf Hour > 4 And Hour < 10 Then - time = DayTime.Morning - ElseIf Hour > 9 And Hour < 17 Then - time = DayTime.Day - ElseIf Hour > 16 And Hour < 20 Then - time = DayTime.Evening - End If - Case Seasons.Summer - If Hour > 20 Or Hour < 4 Then - time = DayTime.Night - ElseIf Hour > 3 And Hour < 9 Then - time = DayTime.Morning - ElseIf Hour > 8 And Hour < 19 Then - time = DayTime.Day - ElseIf Hour > 18 And Hour < 21 Then - time = DayTime.Evening - End If - Case Seasons.Fall - If Hour > 19 Or Hour < 6 Then - time = DayTime.Night - ElseIf Hour > 5 And Hour < 10 Then - time = DayTime.Morning - ElseIf Hour > 9 And Hour < 18 Then - time = DayTime.Day - ElseIf Hour > 17 And Hour < 20 Then - time = DayTime.Evening - End If - End Select - - Return time End Get End Property @@ -223,7 +228,7 @@ Public Class World End Select Case EnvironmentTypes.Outside Select Case World.GetTime - Case DayTime.Night + Case DayTimes.Night Select Case Core.GameOptions.RenderDistance Case 0 Screen.Effect.FogStart = -2 @@ -251,7 +256,7 @@ Public Class World Screen.Camera.FarPlane = 100 End Select - Case DayTime.Morning + Case DayTimes.Morning Select Case Core.GameOptions.RenderDistance Case 0 Screen.Effect.FogStart = 16 @@ -279,7 +284,7 @@ Public Class World Screen.Camera.FarPlane = 100 End Select - Case DayTime.Day + Case DayTimes.Day Select Case Core.GameOptions.RenderDistance Case 0 Screen.Effect.FogStart = 16 @@ -307,7 +312,7 @@ Public Class World Screen.Camera.FarPlane = 100 End Select - Case DayTime.Evening + Case DayTimes.Evening Select Case Core.GameOptions.RenderDistance Case 0 Screen.Effect.FogStart = 0