node-insim
Version:
An InSim library for NodeJS with TypeScript support
56 lines (55 loc) • 1.41 kB
JavaScript
import { __decorate } from "tslib";
import { byte, unsigned } from '../decorators';
import { SendablePacket } from './base';
import { PacketType } from './enums';
/**
* PLayer Cars
*
* You can send a packet to limit the cars that can be used by a given connection.
* The resulting set of selectable cars is a subset of the cars set to be available
* on the host (by the /cars command or {@link SMALL_ALC}).
*/
export class IS_PLC extends SendablePacket {
constructor(data) {
super();
this.Size = 12;
this.Type = PacketType.ISP_PLC;
this.ReqI = 0;
this.Zero = 0;
/** Connection's unique id (0 = host / 255 = all) */
this.UCID = 0;
this.Sp1 = 0;
this.Sp2 = 0;
this.Sp3 = 0;
/** Allowed cars */
this.Cars = 0;
this.initialize(data);
}
}
__decorate([
byte()
], IS_PLC.prototype, "Size", void 0);
__decorate([
byte()
], IS_PLC.prototype, "Type", void 0);
__decorate([
byte()
], IS_PLC.prototype, "ReqI", void 0);
__decorate([
byte()
], IS_PLC.prototype, "Zero", void 0);
__decorate([
byte()
], IS_PLC.prototype, "UCID", void 0);
__decorate([
byte()
], IS_PLC.prototype, "Sp1", void 0);
__decorate([
byte()
], IS_PLC.prototype, "Sp2", void 0);
__decorate([
byte()
], IS_PLC.prototype, "Sp3", void 0);
__decorate([
unsigned()
], IS_PLC.prototype, "Cars", void 0);