node-insim
Version:
An InSim library for NodeJS with TypeScript support
61 lines (60 loc) • 1.88 kB
TypeScript
import { SendablePacket } from './base';
import { PacketType } from './enums';
import type { PacketDataWithOptionalReqI } from './types';
/**
* InSim Init - packet to initialise the InSim system
*/
export declare class IS_ISI extends SendablePacket {
readonly Size = 44;
readonly Type = PacketType.ISP_ISI;
/** If non-zero LFS will send an {@link IS_VER} packet */
ReqI: number;
readonly Zero = 0;
/** Port for UDP replies from LFS (0 to 65535) */
UDPPort: number;
/** Bit flags for options */
Flags: InSimFlags | 0;
/** The INSIM_VERSION used by your program */
InSimVer: number;
/** Special host message prefix character */
Prefix: string;
/** Time in ms between {@link IS_NLP} or {@link IS_MCI} (0 = none) */
Interval: number;
/** Admin password (if set in LFS) */
Admin: string;
/** A short name for your program */
IName: string;
constructor(data?: IS_ISI_Data);
}
export type IS_ISI_Data = PacketDataWithOptionalReqI<IS_ISI>;
export declare enum IS_ISI_ReqI {
ZERO = 0,
/** Send back an {@link IS_VER} packet */
SEND_VERSION = 1
}
export declare enum InSimFlags {
/** Spare */
ISF_RES_0 = 1,
/** Spare */
ISF_RES_1 = 2,
/** Guest or single player */
ISF_LOCAL = 4,
/** Keep colours in {@link IS_MSO} text */
ISF_MSO_COLS = 8,
/** Receive {@link IS_NLP} packets */
ISF_NLP = 16,
/** Receive {@link IS_MCI} packets */
ISF_MCI = 32,
/** Receive {@link IS_CON} packets */
ISF_CON = 64,
/** Receive {@link IS_OBH} packets */
ISF_OBH = 128,
/** Receive {@link IS_HLV} packets */
ISF_HLV = 256,
/** Receive {@link IS_AXM} when loading a layout */
ISF_AXM_LOAD = 512,
/** Receive {@link IS_AXM} when changing objects */
ISF_AXM_EDIT = 1024,
/** Process join requests */
ISF_REQ_JOIN = 2048
}