Skip to content

@lands.io/mod-sdk / LobbyInitMessage

Interface: LobbyInitMessage

Init message received from the parent app.

Table of contents

Properties

Properties

gameEnv

Optional gameEnv: "dev" | "staging" | "prod"

Current game environment (dev, staging, prod)


gameMode

gameMode: "singleplayer" | "multiplayer"


maps

maps: string[]


modConfig

modConfig: Object

Type declaration

Name Type Description
id string Mod's unique ID
name string Mod's display name
version number Current mod version

parentOrigin

parentOrigin: string

Origin of the parent app (redundant with event.origin, but explicit)


playerInfo

playerInfo: Object

Type declaration

Name Type Description
clanTag? string Player's clan tag (if any)
id string Player's unique ID
name string Player's display name

publicApiUrl

publicApiUrl: string


queryParams

queryParams: Record\<string, string>

Query params copied from the parent route


type

type: "init"


Source Code

View full implementation
/**
 * Init message received from the parent app.
 */
export interface LobbyInitMessage {
  type: 'init';
  gameMode: 'singleplayer' | 'multiplayer';
  playerInfo: LobbyInitData['playerInfo'];
  modConfig: LobbyInitData['modConfig'];
  maps: string[];
  publicApiUrl: string;
  /** Origin of the parent app (redundant with event.origin, but explicit) */
  parentOrigin: string;
  /** Query params copied from the parent route */
  queryParams: Record<string, string>;
  /** Current game environment (dev, staging, prod) */
  gameEnv?: 'dev' | 'staging' | 'prod';
}