Added command to change the EnvironmentType
@Environment.SetEnvironmentType(ID) This command temporarily sets the "EnvironmentType" parameter of the current map until a map change, which also changes the sky texture and sometimes adds particles. Value can be 0-5. 0 = Outside 1 = Inside 2 = Cave 3 = Dark (also makes all entities darker) 4 = Underwater (adds air bubble particles) 5= Forest
This commit is contained in:
parent
b3b719e5c0
commit
7dcc423480
|
@ -62,6 +62,11 @@
|
|||
Screen.Level.DayTime = World.GetTime + 1
|
||||
End If
|
||||
IsReady = True
|
||||
Case "setenvironmenttype"
|
||||
Dim newtype As Integer = int(argument)
|
||||
If newtype >= 0 AndAlso newtype <= 5 Then
|
||||
Screen.Level.EnvironmentType = newtype
|
||||
End If
|
||||
End Select
|
||||
|
||||
Screen.Level.World.Initialize(Screen.Level.EnvironmentType, Screen.Level.WeatherType)
|
||||
|
|
|
@ -427,6 +427,7 @@ Namespace ScriptVersion2
|
|||
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."))
|
||||
r(New ScriptCommand("environment", "setenvironmenttype", {New ScriptArgument("environmenttype", ScriptArgument.ArgumentTypes.Int)}.ToList(), "Sets the ""EnvironmentType"" parameter of the map, which also changes the sky texture and sometimes adds particles. Value can be 0-5."))
|
||||
' 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))
|
||||
|
|
Loading…
Reference in New Issue