node-insim
Version:
An InSim library for NodeJS with TypeScript support
37 lines (36 loc) • 928 B
JavaScript
import { __decorate } from "tslib";
import { byte, stringNull } from '../decorators';
import { SendablePacket } from './base';
import { PacketType } from './enums';
export const MSL_MSG_MAX_LENGTH = 128;
/**
* MSg Local - message to appear on local computer only
*/
export class IS_MSL extends SendablePacket {
constructor(data) {
super();
this.Size = 132;
this.Type = PacketType.ISP_MSL;
this.ReqI = 0;
/** Sound effect */
this.Sound = 0;
/** Last byte must be zero */
this.Msg = '';
this.initialize(data);
}
}
__decorate([
byte()
], IS_MSL.prototype, "Size", void 0);
__decorate([
byte()
], IS_MSL.prototype, "Type", void 0);
__decorate([
byte()
], IS_MSL.prototype, "ReqI", void 0);
__decorate([
byte()
], IS_MSL.prototype, "Sound", void 0);
__decorate([
stringNull(MSL_MSG_MAX_LENGTH)
], IS_MSL.prototype, "Msg", void 0);