Update quest interfaces to match quests.json (!415)

Matched quest related interfaces with the types being used in quests.json. Also made some properties that weren't required into nullable types.

Co-authored-by: mBarneto <4347791+m-barneto@users.noreply.github.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT/Server/pulls/415
Co-authored-by: Mattdokn <mattdokn@noreply.dev.sp-tarkov.com>
Co-committed-by: Mattdokn <mattdokn@noreply.dev.sp-tarkov.com>
This commit is contained in:
Mattdokn 2024-09-29 18:53:08 +00:00 committed by chomp
parent a82a41f3df
commit 599c03dd06

View File

@ -23,14 +23,14 @@ export interface IQuest {
secretQuest: boolean; secretQuest: boolean;
startedMessageText: string; startedMessageText: string;
successMessageText: string; successMessageText: string;
acceptPlayerMessage: string; acceptPlayerMessage?: string;
declinePlayerMessage: string; declinePlayerMessage: string;
completePlayerMessage: string; completePlayerMessage?: string;
templateId: string; templateId?: string;
rewards: IQuestRewards; rewards: IQuestRewards;
/** Becomes 'AppearStatus' inside client */ /** Becomes 'AppearStatus' inside client */
status: string | number; status?: string | number;
KeyQuest: boolean; KeyQuest?: boolean;
changeQuestMessageText: string; changeQuestMessageText: string;
/** "Pmc" or "Scav" */ /** "Pmc" or "Scav" */
side: string; side: string;
@ -39,10 +39,10 @@ export interface IQuest {
} }
export interface IQuestConditionTypes { export interface IQuestConditionTypes {
Started: IQuestCondition[]; Started?: IQuestCondition[];
AvailableForFinish: IQuestCondition[]; AvailableForFinish: IQuestCondition[];
AvailableForStart: IQuestCondition[]; AvailableForStart: IQuestCondition[];
Success: IQuestCondition[]; Success?: IQuestCondition[];
Fail: IQuestCondition[]; Fail: IQuestCondition[];
} }
@ -54,9 +54,9 @@ export interface IQuestCondition {
visibilityConditions?: IVisibilityCondition[]; visibilityConditions?: IVisibilityCondition[];
globalQuestCounterId?: string; globalQuestCounterId?: string;
parentId?: string; parentId?: string;
target: string[] | string; target?: string[] | string;
value?: string | number; value?: string | number;
type?: boolean; type?: boolean | string;
status?: QuestStatus[]; status?: QuestStatus[];
availableAfter?: number; availableAfter?: number;
dispersion?: number; dispersion?: number;
@ -65,10 +65,10 @@ export interface IQuestCondition {
isResetOnConditionFailed?: boolean; isResetOnConditionFailed?: boolean;
isNecessary?: boolean; isNecessary?: boolean;
doNotResetIfCounterCompleted?: boolean; doNotResetIfCounterCompleted?: boolean;
dogtagLevel?: number; dogtagLevel?: number | string;
traderId?: string; traderId?: string;
maxDurability?: number; maxDurability?: number | string;
minDurability?: number; minDurability?: number | string;
counter?: IQuestConditionCounter; counter?: IQuestConditionCounter;
plantTime?: number; plantTime?: number;
zoneId?: string; zoneId?: string;
@ -85,7 +85,7 @@ export interface IQuestConditionCounter {
export interface IQuestConditionCounterCondition { export interface IQuestConditionCounterCondition {
id: string; id: string;
dynamicLocale: boolean; dynamicLocale?: boolean;
target?: string[] | string; // TODO: some objects have an array and some are just strings, thanks bsg very cool target?: string[] | string; // TODO: some objects have an array and some are just strings, thanks bsg very cool
completeInSeconds?: number; completeInSeconds?: number;
energy?: IValueCompare; energy?: IValueCompare;
@ -93,7 +93,7 @@ export interface IQuestConditionCounterCondition {
hydration?: IValueCompare; hydration?: IValueCompare;
time?: IValueCompare; time?: IValueCompare;
compareMethod?: string; compareMethod?: string;
value?: number; value?: number | string;
weapon?: string[]; weapon?: string[];
distance?: ICounterConditionDistance; distance?: ICounterConditionDistance;
equipmentInclusive?: string[][]; equipmentInclusive?: string[][];
@ -136,7 +136,7 @@ export interface IVisibilityCondition {
target: string; target: string;
value?: number; value?: number;
dynamicLocale?: boolean; dynamicLocale?: boolean;
oneSessionOnly: boolean; oneSessionOnly?: boolean;
conditionType: string; conditionType: string;
} }