UNPKG

@z0mt3c/f1-telemetry-client

Version:

[![Node.js CI](https://github.com/z0mt3c/f1-telemetry-client/actions/workflows/node.js.yml/badge.svg)](https://github.com/z0mt3c/f1-telemetry-client/actions/workflows/node.js.yml) [![NPM Release](https://img.shields.io/npm/v/@z0mt3c/f1-telemetry-client.sv

26 lines (25 loc) 914 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.LobbyInfoDataParser = void 0; const F1Parser_1 = require("../F1Parser"); class LobbyInfoDataParser extends F1Parser_1.F1Parser { constructor(packetFormat) { super(); this.uint8('m_aiControlled').uint8('m_teamId').uint8('m_nationality'); if (packetFormat >= 2023) { this.uint8('m_platform'); } const nameLength = packetFormat >= 2025 ? 32 : 48; this.string('m_name', { length: nameLength, stripNull: true }); if (packetFormat >= 2021) { this.uint8('m_carNumber'); } if (packetFormat >= 2024) { this.uint8('m_yourTelemetry'); this.uint8('m_showOnlineNames'); this.uint16le('m_techLevel'); } this.uint8('m_readyStatus'); } } exports.LobbyInfoDataParser = LobbyInfoDataParser;