UNPKG

@peacockproject/core

Version:

Type definitions for Peacock's core.

64 lines (63 loc) 1.83 kB
import { CompletionData, GameVersion, Unlockable } from "./types"; export type LocationMasteryData = { Location: Unlockable; MasteryData: MasteryData[]; }; export type MasteryPackageDrop = { Id: string; Level: number; }; export type MasterySubPackage = { Id: string; MaxLevel?: number; Drops: MasteryPackageDrop[]; }; /** * @since v7.0.0 * The Id field has been renamed to LocationId to properly reflect what it is. * * Mastery packages may have Drops OR SubPackages, never both. * This is to properly support sniper mastery by integrating it into the current system * and mastery on H2016 as it is separated by difficulty. * * Also, a GameVersions array has been added to support multi-version mastery. */ export type MasteryPackage = { LocationId: string; GameVersions: GameVersion[]; MaxLevel?: number; XpPerLevel?: number; HideProgression?: boolean; } & (MasteryPackageDropExt | MasteryPackageSubPackageExt); /** * Extends {@link MasteryPackage} with the `Drops` field. */ export type MasteryPackageDropExt = { Drops: MasteryPackageDrop[]; SubPackages?: never; }; /** * Extends {@link MasteryPackage} with the `SubPackages` field. */ export type MasteryPackageSubPackageExt = { Drops?: never; SubPackages: MasterySubPackage[]; }; export type MasteryData = { CompletionData: CompletionData; Drops: MasteryDrop[]; Unlockable?: Unlockable; }; export type MasteryDrop = { IsLevelMarker: boolean; Unlockable: Unlockable; Level: number; IsLocked: boolean; TypeLocaKey: string; }; export type UnlockableMasteryData = { Location: string; SubPackageId?: string; Level: number; }; export type GenericCompletionData = Omit<CompletionData, "Id" | "SubLocationId" | "HideProgression" | "IsLocationProgression" | "Name">;