From 85bcb5278062bd14266aa77a985c1659e0fb06d9 Mon Sep 17 00:00:00 2001 From: JappaWakka Date: Wed, 27 Dec 2023 18:55:48 +0100 Subject: [PATCH] Added @Level.SetRideType(int) command Sets the Ride Type of the current map. Possible values for "int": 0 = Depends on CanDig and CanFly tags, 1 = Can ride, 2 = Can not ride, 3 = Can't stop riding once started --- P3D/World/ActionScript/V2/ScriptCommands/DoLevel.vb | 3 +++ P3D/World/ActionScript/V2/ScriptLibrary.vb | 1 + 2 files changed, 4 insertions(+) diff --git a/P3D/World/ActionScript/V2/ScriptCommands/DoLevel.vb b/P3D/World/ActionScript/V2/ScriptCommands/DoLevel.vb index f50189335..c70e267ca 100644 --- a/P3D/World/ActionScript/V2/ScriptCommands/DoLevel.vb +++ b/P3D/World/ActionScript/V2/ScriptCommands/DoLevel.vb @@ -69,6 +69,9 @@ Case "setsafari" Screen.Level.IsSafariZone = CBool(argument) IsReady = True + Case "setridetype" + Screen.Level.RideType = CInt(argument).Clamp(0, 3) + IsReady = True End Select End Sub diff --git a/P3D/World/ActionScript/V2/ScriptLibrary.vb b/P3D/World/ActionScript/V2/ScriptLibrary.vb index ee23c0cc6..c53a41d8d 100644 --- a/P3D/World/ActionScript/V2/ScriptLibrary.vb +++ b/P3D/World/ActionScript/V2/ScriptLibrary.vb @@ -211,6 +211,7 @@ 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", "setridetype", {New ScriptArgument("rideType", ScriptArgument.ArgumentTypes.Int, {"0-3"})}.ToList(), "Sets the Ride Type of the current map. (0 = Depends on CanDig and CanFly tags, 1 = Can ride, 2 = Can not ride, 3 = Can't stop riding once started)")) ' 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))