UNPKG

node-insim

Version:

An InSim library for NodeJS with TypeScript support

64 lines (63 loc) 1.77 kB
import { Packet } from './base'; import type { Wind } from './enums'; import { PacketType } from './enums'; /** * Race STart */ export declare class IS_RST extends Packet { readonly Size = 28; readonly Type = PacketType.ISP_RST; /** 0 unless this is a reply to an {@link TINY_RST} request */ ReqI: number; readonly Zero = 0; /** 0 if qualifying */ RaceLaps: number; /** 0 if race */ QualMins: number; /** Number of players in race */ NumP: number; /** * Lap timing * * Bits 6 and 7 (Timing & 0xc0): * * - 0x40: standard lap timing is being used * - 0x80: custom timing - user checkpoints have been placed * - 0xc0: no lap timing - e.g. open config with no user checkpoints * * Bits 0 and 1 (Timing & 0x03): number of checkpoints if lap timing is enabled */ Timing: number; /** Short track name */ Track: string; Weather: number; Wind: Wind; /** Race flags (must pit, can reset, etc.) */ Flags: RaceFlags | 0; /** Total number of nodes in the path */ NumNodes: number; /** Node index - finish line */ Finish: number; /** Node index - split 1 */ Split1: number; /** Node index - split 2 */ Split2: number; /** Node index - split 3 */ Split3: number; } export declare enum RaceFlags { /** Vote kick/ban allowed */ HOSTF_CAN_VOTE = 1, /** Guest are allowed to select tracks */ HOSTF_CAN_SELECT = 2, /** Mid-race join allowed */ HOSTF_MID_RACE = 32, /** Pit stop required */ HOSTF_MUST_PIT = 64, /** Car reset allowed */ HOSTF_CAN_RESET = 128, /** Forced cockpit view */ HOSTF_FCV = 256, /** Cruise mode (wrong way allowed) */ HOSTF_CRUISE = 512 }