@peacockproject/core
Version:
Type definitions for Peacock's core.
44 lines (43 loc) • 1.76 kB
TypeScript
import { GameVersion, Loadout, LoadoutFile, LocationLoadout, Unlockable } from "./types/types";
import { StashpointSlotName } from "./types/gameSchemas";
export declare const REQUIRED_LOADOUT_SLOTS: number[];
export declare const LOADOUT_SLOTS: StashpointSlotName[];
/**
* A class for managing loadouts.
*/
export declare class Loadouts {
loadouts: LoadoutFile;
/**
* Initializes the loadouts manager.
*/
init(): Promise<void>;
/**
* Create the default loadout (or just a new loadout) for the specified game version, and optionally with a name.
*
* @param gameVersion The game version to perform the operation on.
* @param name The optional name for the new loadout set, defaults to "Unnamed loadout set".
* @returns The Loadout object.
*/
createDefault(gameVersion: GameVersion, name?: string): Loadout;
/**
* Get the active loadout profile for the specified game version. May be undefined.
*
* @param gameVersion The game version.
* @returns The loadout profile or undefined if one isn't selected or none exist.
*/
getLoadoutFor(gameVersion: GameVersion): Loadout | undefined;
getLocationLoadout(userId: string, gameVersion: GameVersion, sublocation: Unlockable, suitOverride?: string | undefined): LocationLoadout;
/**
* Saves the loadout data to the Peacock userdata/users folder.
*/
save(): Promise<void>;
}
/**
* A synthetic default bind to the global Loadouts instance.
* @todo Move this somewhere that makes more sense with a dependency injection model.
*/
export declare const loadouts: Loadouts;
/**
* Router object for loadout-related web requests.
*/
export declare const loadoutRouter: import("express-serve-static-core").Router;