@rflafla/f1-udp-parser
Version:
The F1 series of games support the outputting of key game data via a UDP data stream. This data can be interpreted by external apps or connected peripherals for a range of different uses, including providing additional telemetry information, customised HU
28 lines • 985 B
JavaScript
;
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');
}
if (packetFormat >= 2025) {
this.string('m_name', { length: 32, stripNull: true });
}
else {
this.string('m_name', { length: 48, stripNull: true });
}
this.uint8('m_carNumber');
if (packetFormat >= 2024) {
this.uint8('m_yourTelemetry')
.uint8('m_showOnlineNames')
.uint16le('m_techLevel');
}
this.uint8('m_readyStatus');
}
}
exports.LobbyInfoDataParser = LobbyInfoDataParser;
//# sourceMappingURL=LobbyInfoDataParser.js.map