From 599c03dd06f674d53e63b30c998324bdd03157e8 Mon Sep 17 00:00:00 2001 From: Mattdokn Date: Sun, 29 Sep 2024 18:53:08 +0000 Subject: [PATCH] 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 Co-committed-by: Mattdokn --- .../src/models/eft/common/tables/IQuest.ts | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/project/src/models/eft/common/tables/IQuest.ts b/project/src/models/eft/common/tables/IQuest.ts index ac7ea5f7..f5382279 100644 --- a/project/src/models/eft/common/tables/IQuest.ts +++ b/project/src/models/eft/common/tables/IQuest.ts @@ -23,14 +23,14 @@ export interface IQuest { secretQuest: boolean; startedMessageText: string; successMessageText: string; - acceptPlayerMessage: string; + acceptPlayerMessage?: string; declinePlayerMessage: string; - completePlayerMessage: string; - templateId: string; + completePlayerMessage?: string; + templateId?: string; rewards: IQuestRewards; /** Becomes 'AppearStatus' inside client */ - status: string | number; - KeyQuest: boolean; + status?: string | number; + KeyQuest?: boolean; changeQuestMessageText: string; /** "Pmc" or "Scav" */ side: string; @@ -39,10 +39,10 @@ export interface IQuest { } export interface IQuestConditionTypes { - Started: IQuestCondition[]; + Started?: IQuestCondition[]; AvailableForFinish: IQuestCondition[]; AvailableForStart: IQuestCondition[]; - Success: IQuestCondition[]; + Success?: IQuestCondition[]; Fail: IQuestCondition[]; } @@ -54,9 +54,9 @@ export interface IQuestCondition { visibilityConditions?: IVisibilityCondition[]; globalQuestCounterId?: string; parentId?: string; - target: string[] | string; + target?: string[] | string; value?: string | number; - type?: boolean; + type?: boolean | string; status?: QuestStatus[]; availableAfter?: number; dispersion?: number; @@ -65,10 +65,10 @@ export interface IQuestCondition { isResetOnConditionFailed?: boolean; isNecessary?: boolean; doNotResetIfCounterCompleted?: boolean; - dogtagLevel?: number; + dogtagLevel?: number | string; traderId?: string; - maxDurability?: number; - minDurability?: number; + maxDurability?: number | string; + minDurability?: number | string; counter?: IQuestConditionCounter; plantTime?: number; zoneId?: string; @@ -85,7 +85,7 @@ export interface IQuestConditionCounter { export interface IQuestConditionCounterCondition { id: string; - dynamicLocale: boolean; + dynamicLocale?: boolean; target?: string[] | string; // TODO: some objects have an array and some are just strings, thanks bsg very cool completeInSeconds?: number; energy?: IValueCompare; @@ -93,7 +93,7 @@ export interface IQuestConditionCounterCondition { hydration?: IValueCompare; time?: IValueCompare; compareMethod?: string; - value?: number; + value?: number | string; weapon?: string[]; distance?: ICounterConditionDistance; equipmentInclusive?: string[][]; @@ -136,7 +136,7 @@ export interface IVisibilityCondition { target: string; value?: number; dynamicLocale?: boolean; - oneSessionOnly: boolean; + oneSessionOnly?: boolean; conditionType: string; }