UNPKG

@peacockproject/core

Version:

Type definitions for Peacock's core.

71 lines (70 loc) 1.87 kB
import { Timer } from "@peacockproject/statemachine-parser"; import { ContextScopedStorageLocation, GameVersion, InclusionData, MissionManifestObjective } from "./types"; import { gameDifficulty } from "../utils"; export type ChallengeType = "Statistic" | "contract" | "global" | "location" | "parentlocation" | string; export interface SavedChallenge { Id: string; Name: string; ImageName: string; Description: string; Rewards: { MasteryXP: number; }; Drops: string[]; IsPlayable: boolean; IsLocked: boolean; HideProgression: boolean; CategoryName: string; Icon: string; LocationId: string; ParentLocationId: string; Type?: ChallengeType; RuntimeType: "Hit" | string; Xp: number; XpModifier?: unknown; DifficultyLevels?: (keyof typeof gameDifficulty)[]; OrderIndex: number; Definition: MissionManifestObjective["Definition"] & { Scope: ContextScopedStorageLocation; Repeatable?: { Base: number; Delta: number; }; }; Tags: string[]; InclusionData?: InclusionData; TypeHeader?: string; TypeIcon?: string; TypeTitle?: string; } export interface SavedChallengeGroup { Name: string; Image: string; Icon: string; CategoryId: string; Description: string; OrderIndex?: number; Challenges: SavedChallenge[]; } export interface ChallengePackage { groups: SavedChallengeGroup[]; meta: { /** * The parent location. */ Location: string; GameVersions: GameVersion[]; }; } export type ProfileChallengeData = { Ticked: boolean; Completed: boolean; CurrentState: string; State: any; }; export type ChallengeContext = { context: unknown; state: string | undefined; timers: Timer[]; timesCompleted: number; };