UNPKG

node-insim

Version:

An InSim library for NodeJS with TypeScript support

29 lines (28 loc) 1.26 kB
import { SendablePacket } from './base'; import { PacketType } from './enums'; import { PlayerHCap } from './structs'; import type { PacketData } from './types'; /** * PLayer Handicaps - variable size * * These handicaps will remain until the player spectates or rejoins after returning from pits or garage (an {@link IS_NPL} will be sent in that case). * * An output IS_PLH is sent to all InSim clients after an IS_PLH is received. The output IS_PLH contains an entry for all valid players that had handicaps updated. An IS_PLH is also output when a handicap is set by a text command /h_mass username X or /h_tres username X */ export declare class IS_PLH extends SendablePacket { static readonly PLH_MAX_PLAYERS = 48; /** 4 + NumP * 4 */ Size: number; readonly Type = PacketType.ISP_PLH; /** 0 unless this is a reply to a {@link TINY_PLH} request */ ReqI: number; /** Number of players in this packet */ NumP: number; /** 0 to {@link IS_PLH.PLH_MAX_PLAYERS} ({@link NumP}) */ HCaps: PlayerHCap[]; private readonly handicapsOffset; constructor(data?: IS_PLH_Data); unpack(buffer: Uint8Array<ArrayBuffer>): this; pack(): Uint8Array<ArrayBuffer>; } export type IS_PLH_Data = PacketData<IS_PLH>;