mirror of
https://github.com/P3D-Legacy/P3D-Legacy.git
synced 2025-07-07 14:04:51 +02:00
Map Property "Lightning" renamed to "Lighting" (bulk replaced all occurences in the maps) Map Property "EnviromentType" renamed to "EnvironmentType" (bulk replaced all occurences in the maps) Replaced the skydomes, sun, moon and stars and updated the lighting to be less dark at times of day other than day itself.
80 lines
3.2 KiB
VB.net
80 lines
3.2 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
|
|
Case "setdaytime"
|
|
Screen.Level.DayTime = CInt(argument)
|
|
IsReady = True
|
|
End Select
|
|
End Sub
|
|
|
|
End Class
|
|
|
|
End Namespace |