From b6f6f26e216186bc5c8eb11efa733c8ed9b6d618 Mon Sep 17 00:00:00 2001 From: doxoh Date: Tue, 27 Dec 2022 13:17:46 +0100 Subject: [PATCH] Rename RoofState to IsRoofClosed --- api/AltV.Net.Async/AltAsync.Vehicle.cs | 8 ++++---- api/AltV.Net.Async/Elements/Entities/AsyncVehicle.cs | 6 +++--- api/AltV.Net.Async/Elements/Entities/VehicleBuilder.cs | 2 +- api/AltV.Net.Async/IVehicleBuilder.cs | 2 +- api/AltV.Net/Elements/Entities/IVehicle.cs | 4 ++-- api/AltV.Net/Elements/Entities/Vehicle.cs | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/api/AltV.Net.Async/AltAsync.Vehicle.cs b/api/AltV.Net.Async/AltAsync.Vehicle.cs index 46acb445f..e920cf664 100644 --- a/api/AltV.Net.Async/AltAsync.Vehicle.cs +++ b/api/AltV.Net.Async/AltAsync.Vehicle.cs @@ -273,12 +273,12 @@ public static Task SetStateAsync(this IVehicle vehicle, string state) => AltVAsync.Schedule(() => vehicle.State = state); [Obsolete("Use async entities instead")] - public static Task GetRoofStateAsync(this IVehicle vehicle) => - AltVAsync.Schedule(() => vehicle.RoofState); + public static Task IsRoofClosedAsync(this IVehicle vehicle) => + AltVAsync.Schedule(() => vehicle.IsRoofClosed); [Obsolete("Use async entities instead")] - public static Task SetRoofStateAsync(this IVehicle vehicle, bool roofState) => - AltVAsync.Schedule(() => vehicle.RoofState = roofState); + public static Task SetRoofClosedAsync(this IVehicle vehicle, bool roofState) => + AltVAsync.Schedule(() => vehicle.IsRoofClosed = roofState); [Obsolete("Use async entities instead")] public static Task GetDoorStateAsync(this IVehicle vehicle, byte doorId) => diff --git a/api/AltV.Net.Async/Elements/Entities/AsyncVehicle.cs b/api/AltV.Net.Async/Elements/Entities/AsyncVehicle.cs index a699ce834..39502f8da 100644 --- a/api/AltV.Net.Async/Elements/Entities/AsyncVehicle.cs +++ b/api/AltV.Net.Async/Elements/Entities/AsyncVehicle.cs @@ -877,14 +877,14 @@ public bool IsNightlightOn } } - public bool RoofState + public bool IsRoofClosed { get { lock (Vehicle) { if (!AsyncContext.CheckIfExistsOrCachedNullable(Vehicle)) return default; - return Vehicle.RoofState; + return Vehicle.IsRoofClosed; } } set @@ -892,7 +892,7 @@ public bool RoofState lock (Vehicle) { if (!AsyncContext.CheckIfExistsNullable(Vehicle)) return; - Vehicle.RoofState = value; + Vehicle.IsRoofClosed = value; } } } diff --git a/api/AltV.Net.Async/Elements/Entities/VehicleBuilder.cs b/api/AltV.Net.Async/Elements/Entities/VehicleBuilder.cs index 484c1f8f9..d4cb44546 100644 --- a/api/AltV.Net.Async/Elements/Entities/VehicleBuilder.cs +++ b/api/AltV.Net.Async/Elements/Entities/VehicleBuilder.cs @@ -284,7 +284,7 @@ public IVehicleBuilder LockState(VehicleLockState value) return this; } - public IVehicleBuilder RoofState(bool state) + public IVehicleBuilder IsRoofClosed(bool state) { Add(ptr => { diff --git a/api/AltV.Net.Async/IVehicleBuilder.cs b/api/AltV.Net.Async/IVehicleBuilder.cs index efe739d8f..00878d331 100644 --- a/api/AltV.Net.Async/IVehicleBuilder.cs +++ b/api/AltV.Net.Async/IVehicleBuilder.cs @@ -29,7 +29,7 @@ public interface IVehicleBuilder : IDisposable IVehicleBuilder HeadlightColor(byte value); IVehicleBuilder SirenActive(bool value); IVehicleBuilder LockState(VehicleLockState value); - IVehicleBuilder RoofState(bool state); + IVehicleBuilder IsRoofClosed(bool state); IVehicleBuilder State(string value); IVehicleBuilder EngineHealth(int value); IVehicleBuilder PetrolTankHealth(int value); diff --git a/api/AltV.Net/Elements/Entities/IVehicle.cs b/api/AltV.Net/Elements/Entities/IVehicle.cs index 88b3c4c0e..6055acd99 100644 --- a/api/AltV.Net/Elements/Entities/IVehicle.cs +++ b/api/AltV.Net/Elements/Entities/IVehicle.cs @@ -304,9 +304,9 @@ public interface IVehicle : ISharedVehicle, IEntity bool IsNightlightOn { get; } /// - /// Sets the Roof state (false = open, true = closed) + /// Sets the Roof closed /// - bool RoofState { get; set; } + bool IsRoofClosed { get; set; } /// /// If the flamethrower is active diff --git a/api/AltV.Net/Elements/Entities/Vehicle.cs b/api/AltV.Net/Elements/Entities/Vehicle.cs index f74fb49e0..fc1ade504 100644 --- a/api/AltV.Net/Elements/Entities/Vehicle.cs +++ b/api/AltV.Net/Elements/Entities/Vehicle.cs @@ -794,7 +794,7 @@ public bool IsNightlightOn } } - public bool RoofState + public bool IsRoofClosed { get {