@peacockproject/core
Version:
Type definitions for Peacock's core.
45 lines (44 loc) • 1.6 kB
TypeScript
import type { CompletionData, GameVersion, MissionManifest } from "../types/types";
import { InventoryItem } from "../inventory";
export type SniperCharacter = {
Id: string;
Loadout: SniperLoadout;
CompletionData: CompletionData;
};
export type SniperLoadout = {
LoadoutData: {
SlotId: string;
SlotName: string;
Items: {
Item: InventoryItem;
ItemDetails: unknown;
}[];
Page: number;
Recommended: {
item: InventoryItem;
type: string;
owned: boolean;
};
HasMore: boolean;
HasMoreLeft: boolean;
HasMoreRight: boolean;
OptionalData: Record<never, never>;
}[];
LimitedLoadoutUnlockLevel: number | undefined;
};
type Return = (SniperLoadout | SniperCharacter)[];
/**
* Creates the sniper loadouts data for a contract. Returns loadouts for all three
* characters because multiplayer and singleplayer share the same request.
* (Official only returns one because multiplayer is not supported)
*
* @author Anthony Fuller
* @param userId The id of the user.
* @param gameVersion The game version.
* @param contractData The contract's data.
* @param loadoutData Should the output just contain loadout data in an array?
* @returns An array containing the sniper loadouts data for all three characters
* if the contract is a sniper mission, or an empty array otherwise.
*/
export declare function createSniperLoadouts(userId: string, gameVersion: GameVersion, contractData: MissionManifest, loadoutData?: boolean): Return;
export {};