Example #1
0
        private static String GetDisplayName(Game.VehicleData vehicle)
        {
            String vehicleProto = vehicle.proto;

            try
            {
                if (TryParsePobedaName(vehicleProto, out var name))
                {
                    return(name);
                }

                UnityEngine.Debug.LogError($"[ExtendedBarterHUD] Idk name of this vehicle: \"{vehicleProto}\"");
                return(vehicleProto);
            }
            catch (Exception ex)
            {
                UnityEngine.Debug.LogError($"[ExtendedBarterHUD] Failed to get name of this vehicle: \"{vehicleProto}\". Error: {ex}");
                return(vehicleProto);
            }
        }
Example #2
0
 public VehicleInventory(Game.VehicleData vehicle)
 {
     _vehicle    = vehicle;
     DisplayName = GetDisplayName(_vehicle);
 }