From 3d01fe621137b4ac7f25d4efc378eca511a04816 Mon Sep 17 00:00:00 2001 From: Dev Date: Thu, 30 Nov 2023 10:30:13 +0000 Subject: [PATCH] Move `TraderData` object into `ItemEventRouterBase` where it will cause less confusion --- project/src/models/eft/common/tables/IBotBase.ts | 12 +----------- .../src/models/eft/itemEvent/IItemEventRouterBase.ts | 12 +++++++++++- project/src/routers/EventOutputHolder.ts | 4 ++-- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/project/src/models/eft/common/tables/IBotBase.ts b/project/src/models/eft/common/tables/IBotBase.ts index fba422cb..28f1be35 100644 --- a/project/src/models/eft/common/tables/IBotBase.ts +++ b/project/src/models/eft/common/tables/IBotBase.ts @@ -464,7 +464,7 @@ export interface IQuestStatus startTime: number; status: QuestStatus; statusTimers?: Record; - /** SPT specific property */ + /** Property does not exist in live profile data, but is used by ProfileChanges.questsStatus when sent to client*/ completedConditions?: string[]; availableAfter?: number; } @@ -479,16 +479,6 @@ export interface TraderInfo disabled: boolean; } -/** This object is sent to the client as part of traderRelations */ -export interface TraderData -{ - salesSum: number; - standing: number; - loyalty: number; - unlocked: boolean; - disabled: boolean; -} - export interface RagfairInfo { rating: number; diff --git a/project/src/models/eft/itemEvent/IItemEventRouterBase.ts b/project/src/models/eft/itemEvent/IItemEventRouterBase.ts index d3ceeea1..86ebf3a9 100644 --- a/project/src/models/eft/itemEvent/IItemEventRouterBase.ts +++ b/project/src/models/eft/itemEvent/IItemEventRouterBase.ts @@ -1,4 +1,4 @@ -import { Health, IQuestStatus, Productive, Skills, TraderData } from "@spt-aki/models/eft/common/tables/IBotBase"; +import { Health, IQuestStatus, Productive, Skills } from "@spt-aki/models/eft/common/tables/IBotBase"; import { Item, Upd } from "@spt-aki/models/eft/common/tables/IItem"; import { IQuest } from "@spt-aki/models/eft/common/tables/IQuest"; import { IPmcDataRepeatableQuest } from "@spt-aki/models/eft/common/tables/IRepeatableQuests"; @@ -80,6 +80,16 @@ export interface Improvement improveCompleteTimestamp: number; } +/** Related to TraderInfo */ +export interface TraderData +{ + salesSum: number; + standing: number; + loyalty: number; + unlocked: boolean; + disabled: boolean; +} + export interface Product { _id: string; diff --git a/project/src/routers/EventOutputHolder.ts b/project/src/routers/EventOutputHolder.ts index 27a9beed..21a3d56b 100644 --- a/project/src/routers/EventOutputHolder.ts +++ b/project/src/routers/EventOutputHolder.ts @@ -2,8 +2,8 @@ import { inject, injectable } from "tsyringe"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; -import { IHideoutImprovement, Productive, TraderData, TraderInfo } from "@spt-aki/models/eft/common/tables/IBotBase"; -import { ProfileChange } from "@spt-aki/models/eft/itemEvent/IItemEventRouterBase"; +import { IHideoutImprovement, Productive, TraderInfo } from "@spt-aki/models/eft/common/tables/IBotBase"; +import { ProfileChange, TraderData } from "@spt-aki/models/eft/itemEvent/IItemEventRouterBase"; import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil";