UNPKG

node-insim

Version:

An InSim library for NodeJS with TypeScript support

56 lines (55 loc) 1.46 kB
import { __decorate } from "tslib"; import { byte } from '../decorators'; import { Packet } from './base'; import { PacketType } from './enums'; /** * FLaG (yellow or blue flag changed) */ export class IS_FLG extends Packet { constructor() { super(...arguments); this.Size = 8; this.Type = PacketType.ISP_FLG; this.ReqI = 0; /** Player's unique id */ this.PLID = 0; /** 0 = off / 1 = on */ this.OffOn = 0; /** 1 = given blue / 2 = causing yellow */ this.Flag = FlagType.YELLOW; /** Unique id of obstructed player */ this.CarBehind = 0; this.Sp3 = 0; } } __decorate([ byte() ], IS_FLG.prototype, "Size", void 0); __decorate([ byte() ], IS_FLG.prototype, "Type", void 0); __decorate([ byte() ], IS_FLG.prototype, "ReqI", void 0); __decorate([ byte() ], IS_FLG.prototype, "PLID", void 0); __decorate([ byte() ], IS_FLG.prototype, "OffOn", void 0); __decorate([ byte() ], IS_FLG.prototype, "Flag", void 0); __decorate([ byte() ], IS_FLG.prototype, "CarBehind", void 0); __decorate([ byte() ], IS_FLG.prototype, "Sp3", void 0); export var FlagType; (function (FlagType) { /** Blue flag given (car being lapped) */ FlagType[FlagType["BLUE"] = 1] = "BLUE"; /** Yellow flag shown (car is slow or stopped in dangerous place */ FlagType[FlagType["YELLOW"] = 2] = "YELLOW"; })(FlagType || (FlagType = {}));