Added "@environment.resetregionweather" command

Resets the weather to be based on the current season.
This commit is contained in:
JappaWakka 2022-05-31 21:00:56 +02:00
parent 5177d6c3f9
commit c2c7033ece
3 changed files with 4 additions and 1 deletions

View File

@ -15,6 +15,8 @@
Screen.Level.WeatherType = int(argument) Screen.Level.WeatherType = int(argument)
Case "setregionweather" Case "setregionweather"
World.RegionWeather = CType(int(argument), World.Weathers) World.RegionWeather = CType(int(argument), World.Weathers)
Case "resetregionweather"
World.RegionWeather = World.GetRegionWeather(World.CurrentSeason)
Case "setseason" Case "setseason"
If int(argument) = -1 Then If int(argument) = -1 Then
World.setSeason = Nothing World.setSeason = Nothing

View File

@ -397,6 +397,7 @@ Namespace ScriptVersion2
' Commands: ' Commands:
r(New ScriptCommand("environment", "setweather", {New ScriptArgument("weatherType", ScriptArgument.ArgumentTypes.Int)}.ToList(), "Changes the weather type of the current map.")) r(New ScriptCommand("environment", "setweather", {New ScriptArgument("weatherType", ScriptArgument.ArgumentTypes.Int)}.ToList(), "Changes the weather type of the current map."))
r(New ScriptCommand("environment", "setregionweather", {New ScriptArgument("weatherID", ScriptArgument.ArgumentTypes.Int)}.ToList(), "Changes the weather of the current region.")) r(New ScriptCommand("environment", "setregionweather", {New ScriptArgument("weatherID", ScriptArgument.ArgumentTypes.Int)}.ToList(), "Changes the weather of the current region."))
r(New ScriptCommand("environment", "resetregionweather", "Resets the weather to be based on the current season."))
r(New ScriptCommand("environment", "setseason", {New ScriptArgument("seasonID", ScriptArgument.ArgumentTypes.Int)}.ToList(), "Changes the season. Use -1 as the argument to change back to the default season.")) r(New ScriptCommand("environment", "setseason", {New ScriptArgument("seasonID", ScriptArgument.ArgumentTypes.Int)}.ToList(), "Changes the season. Use -1 as the argument to change back to the default season."))
r(New ScriptCommand("environment", "setcanfly", {New ScriptArgument("canfly", ScriptArgument.ArgumentTypes.Bool)}.ToList(), "Sets the ""CanFly"" parameter of the current map.")) r(New ScriptCommand("environment", "setcanfly", {New ScriptArgument("canfly", ScriptArgument.ArgumentTypes.Bool)}.ToList(), "Sets the ""CanFly"" parameter of the current map."))
r(New ScriptCommand("environment", "setcandig", {New ScriptArgument("candig", ScriptArgument.ArgumentTypes.Bool)}.ToList(), "Sets the ""CanDig"" parameter of the current map.")) r(New ScriptCommand("environment", "setcandig", {New ScriptArgument("candig", ScriptArgument.ArgumentTypes.Bool)}.ToList(), "Sets the ""CanDig"" parameter of the current map."))

View File

@ -382,7 +382,7 @@ endsub:
Screen.Camera.CreateNewProjection(Screen.Camera.FOV) Screen.Camera.CreateNewProjection(Screen.Camera.FOV)
End Sub End Sub
Private Shared Function GetRegionWeather(ByVal Season As Seasons) As Weathers Public Shared Function GetRegionWeather(ByVal Season As Seasons) As Weathers
If IsMainMenu Then If IsMainMenu Then
Return Weathers.Clear Return Weathers.Clear
End If End If