refactor(resource/vehicleProperties): type fixes

This commit is contained in:
Linden
2022-09-18 11:33:17 +10:00
parent d08101c545
commit 0e1dfc78ba
2 changed files with 16 additions and 14 deletions

View File

@@ -6,9 +6,10 @@ interface VehicleProperties {
engineHealth: number;
tankHealth: number;
fuelLevel: number;
oilLevel: number;
dirtLevel: number;
color1: number;
color2: number;
color1: number | [number, number, number];
color2: number | [number, number, number];
pearlescentColor: number;
interiorColor: number;
dashboardColor: number;
@@ -40,15 +41,15 @@ interface VehicleProperties {
modSuspension: number;
modArmor: number;
modNitrous: number;
modTurbo: number;
modSubwoofer: number;
modSmokeEnabled: number;
modHydraulics: number;
modXenon: number;
modTurbo: boolean;
modSubwoofer: boolean;
modSmokeEnabled: boolean;
modHydraulics: boolean;
modXenon: boolean;
modFrontWheels: number;
modBackWheels: number;
modCustomTiresF: number;
modCustomTiresR: number;
modCustomTiresF: boolean;
modCustomTiresR: boolean;
modPlateHolder: number;
modVanityPlate: number;
modTrimA: number;
@@ -84,7 +85,8 @@ interface VehicleProperties {
rearBumper: boolean;
}
export const getVehicleProperties = (vehicle: number): VehicleProperties => exports.ox_lib.getVehicleProperties(vehicle);
export const getVehicleProperties = (vehicle: number): VehicleProperties =>
exports.ox_lib.getVehicleProperties(vehicle);
export const setVehicleProperties = (vehicle: number, props: Partial<VehicleProperties>): boolean =>
exports.ox_lib.setVehicleProperties(vehicle, props);