UNPKG

node-insim

Version:

An InSim library for NodeJS with TypeScript support

42 lines (41 loc) 1.25 kB
import { Packet } from './base'; import type { PenaltyValue } from './enums'; import { PacketType } from './enums'; /** * PENalty (given or cleared) * * On false start or wrong route / restricted area, an IS_PEN packet is sent: * * - False start: OldPen = 0 / NewPen = {@link PENALTY_30} / Reason = {@link PENR_FALSE_START} * - Wrong route: OldPen = 0 / NewPen = {@link PENALTY_45} / Reason = {@link PENR_WRONG_WAY} */ export declare class IS_PEN extends Packet { readonly Size = 8; readonly Type = PacketType.ISP_PEN; readonly ReqI = 0; /** Player's unique id */ PLID: number; /** Old penalty value */ OldPen: PenaltyValue; /** New penalty value */ NewPen: PenaltyValue; /** Penalty reason */ Reason: PenaltyReason; private readonly Sp3; } export declare enum PenaltyReason { /** Unknown or cleared penalty */ PENR_UNKNOWN = 0, /** Penalty given by admin */ PENR_ADMIN = 1, /** Wrong way driving */ PENR_WRONG_WAY = 2, /** Starting before green light */ PENR_FALSE_START = 3, /** Speeding in pit lane */ PENR_SPEEDING = 4, /** Stop-go pit stop too short */ PENR_STOP_SHORT = 5, /** Compulsory stop is too late */ PENR_STOP_LATE = 6 }