Skip to content

Game.UI.InGame.VehiclePassengerLocaleKey

Assembly:
Assembly-CSharp (game code / main assembly)

Namespace:
Game.UI.InGame

Type:
enum

Base:
System.Enum (underlying type: System.Int32)

Summary:
Represents the localization key type used for vehicle passenger-related UI labels. This enum is used to indicate which localized label should be shown for a vehicle's occupant(s) — e.g., no label, a generic passenger label, or a prisoner label. The default (0) is None.


Fields

  • None
    Represents no passenger label. Default value (0). Use this when no passenger-related locale text should be shown.

  • Passenger
    Represents a generic passenger label. Use this when the vehicle is carrying ordinary passengers.

  • Prisoner
    Represents a prisoner label. Use this when the vehicle is carrying prisoners (e.g., police/penal transport).

Properties

  • (None declared)
    This enum declares no properties. Standard System.Enum behavior applies.

Constructors

  • (None declared)
    Enums do not define explicit constructors in source. The underlying type is System.Int32 and the default value is None (0).

Methods

  • (No enum-specific methods declared)
    There are no methods declared on this enum. Standard System.Enum methods are available (ToString, HasFlag, GetValues, etc.). In-game code typically maps these enum values to specific localization keys/strings via a switch, dictionary, or helper method.

Usage Example

// Map the enum to a localization key and retrieve the localized string.
// Replace 'Localization.Get' with the actual localization API used by the game.
string GetVehiclePassengerLabel(VehiclePassengerLocaleKey key)
{
    string localeKey = key switch
    {
        VehiclePassengerLocaleKey.Passenger => "VEHICLE_PASSENGER_LABEL",
        VehiclePassengerLocaleKey.Prisoner => "VEHICLE_PRISONER_LABEL",
        _ => string.Empty,
    };

    if (string.IsNullOrEmpty(localeKey))
        return string.Empty;

    // Example: use the game's localization system to get the displayed text.
    // Replace 'Localization.Get' with the real method (e.g., Locale.Get or similar).
    return Localization.Get(localeKey);
}

// Example usage in UI code:
var label = GetVehiclePassengerLabel(VehiclePassengerLocaleKey.Passenger);
// label now contains the localized text for a passenger.