1
mirror of https://github.com/thepeacockproject/Peacock synced 2025-03-01 14:43:02 +01:00
Peacock/components/types/challenges.ts
Reece Dunham cbc7238912
Add type for challenge scopes
Signed-off-by: Reece Dunham <me@rdil.rocks>
2022-10-25 15:11:38 -04:00

71 lines
2.0 KiB
TypeScript

/*
* The Peacock Project - a HITMAN server replacement.
* Copyright (C) 2021-2022 The Peacock Project Team
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { ContextScopedStorageLocation, MissionManifestObjective } from "./types"
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: "Hit" | string
RuntimeType: "contract" | string
XpModifier?: unknown
DifficultyLevels: string[]
Definition: MissionManifestObjective["Definition"] & {
Scope: ContextScopedStorageLocation
}
Tags: string[]
InclusionData?: {
ContractIds?: string[]
ContractTypes?: string[]
Locations?: string[]
GameModes?: string[]
}
}
export interface SavedChallengeGroup {
Name: string
Image: string
Icon: string
CategoryId: string
Description: string
Challenges: SavedChallenge[]
}
export interface ChallengePackage {
groups: SavedChallengeGroup[]
meta: {
/**
* The parent location.
*/
Location: string
}
}