mirror of
https://github.com/P3D-Legacy/P3D-Legacy.git
synced 2025-07-02 19:44:49 +02:00
* 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.
77 lines
3.1 KiB
VB.net
77 lines
3.1 KiB
VB.net
Namespace ScriptVersion2
|
|
|
|
Partial Class ScriptCommander
|
|
|
|
' --------------------------------------------------------------------------------------------------------------------------
|
|
' Contains the @level commands.
|
|
' --------------------------------------------------------------------------------------------------------------------------
|
|
|
|
Private Shared Sub DoLevel(ByVal subClass As String)
|
|
Dim command As String = ScriptComparer.GetSubClassArgumentPair(subClass).Command
|
|
Dim argument As String = ScriptComparer.GetSubClassArgumentPair(subClass).Argument
|
|
|
|
Select Case command.ToLower()
|
|
Case "wait"
|
|
If StringHelper.IsNumeric(Value) = False Then
|
|
Value = argument
|
|
End If
|
|
If int(Value) > 0 Then
|
|
Value = CStr(int(Value) - 1)
|
|
Else
|
|
Value = ""
|
|
IsReady = True
|
|
End If
|
|
Case "waitforsave"
|
|
Dim doWait As Boolean = False
|
|
|
|
If Core.Player.IsGameJoltSave = True Then
|
|
If SaveGameHelpers.GameJoltSaveDone() = False Then
|
|
doWait = True
|
|
Else
|
|
SaveGameHelpers.ResetSaveCounter()
|
|
End If
|
|
End If
|
|
|
|
If doWait = False Then
|
|
IsReady = True
|
|
End If
|
|
Case "update"
|
|
Screen.Level.Update()
|
|
Screen.Level.UpdateEntities()
|
|
Screen.Camera.Update()
|
|
|
|
IsReady = True
|
|
Case "waitforevents"
|
|
Dim doWait As Boolean = False
|
|
For Each e As Entity In Screen.Level.Entities
|
|
If e.EntityID = "NPC" Then
|
|
If CType(e, NPC).MoveAsync = True And CType(e, NPC).Moved <> 0.0F Then
|
|
doWait = True
|
|
Exit For
|
|
End If
|
|
End If
|
|
Next
|
|
|
|
If doWait = False Then
|
|
IsReady = True
|
|
End If
|
|
Case "load"
|
|
Screen.Level = New Level()
|
|
Screen.Level.Load(argument)
|
|
IsReady = True
|
|
Case "reload"
|
|
Screen.Level.WarpData.WarpDestination = Screen.Level.LevelFile
|
|
Screen.Level.WarpData.WarpPosition = Screen.Camera.Position
|
|
Screen.Level.WarpData.WarpRotations = 0
|
|
Screen.Level.WarpData.DoWarpInNextTick = True
|
|
Screen.Level.WarpData.CorrectCameraYaw = Screen.Camera.Yaw
|
|
IsReady = True
|
|
Case "setsafari"
|
|
Screen.Level.IsSafariZone = CBool(argument)
|
|
IsReady = True
|
|
End Select
|
|
End Sub
|
|
|
|
End Class
|
|
|
|
End Namespace |