node-insim
Version:
An InSim library for NodeJS with TypeScript support
45 lines (44 loc) • 1.25 kB
JavaScript
import { __decorate } from "tslib";
import { byte, carName } from '../decorators';
import { Packet } from './base';
import { PacketType } from './enums';
/**
* SeLected Car - sent when a connection selects a car (empty if no car)
*
* NOTE: If a new guest joins and does have a car selected then an {@link IS_SLC} will
* be sent.
*/
export class IS_SLC extends Packet {
constructor() {
super(...arguments);
this.Size = 8;
this.Type = PacketType.ISP_SLC;
/** 0 unless this is a reply to a {@link TINY_SLC} request */
this.ReqI = 0;
/** Connection's unique id (0 = host) */
this.UCID = 0;
/**
* Car name
*
* The value can be one of these:
* - a 3-character abbreviation of an official LFS car (e.g. XRT)
* - a hexadecimal string representation of a car mod's SkinID (e.g. 5882E6)
*/
this.CName = '';
}
}
__decorate([
byte()
], IS_SLC.prototype, "Size", void 0);
__decorate([
byte()
], IS_SLC.prototype, "Type", void 0);
__decorate([
byte()
], IS_SLC.prototype, "ReqI", void 0);
__decorate([
byte()
], IS_SLC.prototype, "UCID", void 0);
__decorate([
carName()
], IS_SLC.prototype, "CName", void 0);