Table of Contents

Class VehicleColorCatalog

Namespace
S1API.Vehicles
Assembly
S1API.dll

Provides read-only access to the base game's vehicle color metadata.

public static class VehicleColorCatalog
Inheritance
VehicleColorCatalog
Inherited Members

Properties

Colors

Gets a read-only snapshot of the available vehicle color metadata in native library order. Returns an empty list before the base game's vehicle color library is ready.

public static IReadOnlyList<VehicleColorMetadata> Colors { get; }

Property Value

IReadOnlyList<VehicleColorMetadata>

Methods

GetColor(VehicleColor)

Gets metadata for a vehicle color.

public static VehicleColorMetadata? GetColor(VehicleColor color)

Parameters

color VehicleColor

The vehicle color to look up.

Returns

VehicleColorMetadata

The color metadata, or null when the color is unavailable or the base game's vehicle color library is not ready.

TryGetColor(VehicleColor, out VehicleColorMetadata?)

Tries to get metadata for a vehicle color.

public static bool TryGetColor(VehicleColor color, out VehicleColorMetadata? metadata)

Parameters

color VehicleColor

The vehicle color to look up.

metadata VehicleColorMetadata

The resolved metadata when available.

Returns

bool

true when metadata was found.