UNPKG

@peacockproject/core

Version:

Type definitions for Peacock's core.

51 lines (50 loc) 1.2 kB
import { ClientToServerEvent, ContractSession } from "../types/types"; /** * A multiplayer preset. */ export interface MultiplayerPreset { /** * The preset's ID. */ Id: string; /** * The preset's game mode. */ GameMode: "versus" | string; Metadata: { Title: string; Header: string; Image: string; IsDefault: boolean; }; Data: { Contracts: string[]; Properties: { mode: string; active: boolean; __comment?: string; }; }; } export interface MatchData { Players: string[]; MatchData: { contractId: string; [key: string]: unknown; }; } /** * Extension for a session providing ghost mode details. */ export interface SessionGhostModeDetails { deaths: number; unnoticedKills: number; Opponents: string[]; IsWinner: boolean; Score: number; OpponentScore: number; IsDraw: boolean; timerEnd: number | null; } export declare const multiplayerRouter: import("express-serve-static-core").Router; export declare function handleMultiplayerEvent(event: ClientToServerEvent, session: ContractSession): boolean;