diff --git a/project/src/controllers/DialogueController.ts b/project/src/controllers/DialogueController.ts index 6fafc485..8b294ab8 100644 --- a/project/src/controllers/DialogueController.ts +++ b/project/src/controllers/DialogueController.ts @@ -10,7 +10,8 @@ import { IGetFriendListDataResponse } from "@spt/models/eft/dialog/IGetFriendLis import { IGetMailDialogViewRequestData } from "@spt/models/eft/dialog/IGetMailDialogViewRequestData"; import { IGetMailDialogViewResponseData } from "@spt/models/eft/dialog/IGetMailDialogViewResponseData"; import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { IDialogue, IDialogueInfo, IMessage, ISptProfile, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IDialogueInfo, IMessage, ISptProfile } from "@spt/models/eft/profile/ISptProfile"; +import { IUserDialogInfo } from "@spt/models/eft/profile/IUserDialogInfo"; import { IWsFriendsListAccept } from "@spt/models/eft/ws/IWsFriendsListAccept"; import { BackendErrorCodes } from "@spt/models/enums/BackendErrorCodes"; import { ConfigTypes } from "@spt/models/enums/ConfigTypes"; diff --git a/project/src/helpers/Dialogue/AbstractDialogueChatBot.ts b/project/src/helpers/Dialogue/AbstractDialogueChatBot.ts index 2c147f7e..3f9f25d4 100644 --- a/project/src/helpers/Dialogue/AbstractDialogueChatBot.ts +++ b/project/src/helpers/Dialogue/AbstractDialogueChatBot.ts @@ -1,7 +1,7 @@ import { IChatCommand } from "@spt/helpers/Dialogue/Commando/IChatCommand"; import { IDialogueChatBot } from "@spt/helpers/Dialogue/IDialogueChatBot"; import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IUserDialogInfo } from "@spt/models/eft/profile/IUserDialogInfo"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { MailSendService } from "@spt/services/MailSendService"; diff --git a/project/src/helpers/Dialogue/Commando/IChatCommand.ts b/project/src/helpers/Dialogue/Commando/IChatCommand.ts index e1a9362e..53f09448 100644 --- a/project/src/helpers/Dialogue/Commando/IChatCommand.ts +++ b/project/src/helpers/Dialogue/Commando/IChatCommand.ts @@ -1,5 +1,5 @@ import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IUserDialogInfo } from "@spt/models/eft/profile/IUserDialogInfo"; export interface IChatCommand { getCommandPrefix(): string; diff --git a/project/src/helpers/Dialogue/Commando/SptCommandoCommands.ts b/project/src/helpers/Dialogue/Commando/SptCommandoCommands.ts index 5ce7ef6e..bb1d6c38 100644 --- a/project/src/helpers/Dialogue/Commando/SptCommandoCommands.ts +++ b/project/src/helpers/Dialogue/Commando/SptCommandoCommands.ts @@ -1,7 +1,7 @@ import { IChatCommand } from "@spt/helpers/Dialogue/Commando/IChatCommand"; import { ISptCommand } from "@spt/helpers/Dialogue/Commando/SptCommands/ISptCommand"; import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IUserDialogInfo } from "@spt/models/eft/profile/IUserDialogInfo"; import { ConfigTypes } from "@spt/models/enums/ConfigTypes"; import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { ConfigServer } from "@spt/servers/ConfigServer"; diff --git a/project/src/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.ts b/project/src/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.ts index cc3557af..81b0b478 100644 --- a/project/src/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.ts +++ b/project/src/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.ts @@ -5,7 +5,7 @@ import { PresetHelper } from "@spt/helpers/PresetHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem"; import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IUserDialogInfo } from "@spt/models/eft/profile/IUserDialogInfo"; import { BaseClasses } from "@spt/models/enums/BaseClasses"; import { ItemTpl } from "@spt/models/enums/ItemTpl"; import { ILogger } from "@spt/models/spt/utils/ILogger"; diff --git a/project/src/helpers/Dialogue/Commando/SptCommands/ISptCommand.ts b/project/src/helpers/Dialogue/Commando/SptCommands/ISptCommand.ts index 3c562a20..669c7e6e 100644 --- a/project/src/helpers/Dialogue/Commando/SptCommands/ISptCommand.ts +++ b/project/src/helpers/Dialogue/Commando/SptCommands/ISptCommand.ts @@ -1,5 +1,5 @@ import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IUserDialogInfo } from "@spt/models/eft/profile/IUserDialogInfo"; export interface ISptCommand { getCommand(): string; diff --git a/project/src/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.ts b/project/src/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.ts index 99dbd05c..c8b84b14 100644 --- a/project/src/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.ts +++ b/project/src/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.ts @@ -4,7 +4,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IUserDialogInfo } from "@spt/models/eft/profile/IUserDialogInfo"; import { Money } from "@spt/models/enums/Money"; import { SkillTypes } from "@spt/models/enums/SkillTypes"; import { IProfileChangeEvent, ProfileChangeEventType } from "@spt/models/spt/dialog/ISendMessageDetails"; diff --git a/project/src/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.ts b/project/src/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.ts index 4446c560..fea2d28c 100644 --- a/project/src/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.ts +++ b/project/src/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.ts @@ -3,7 +3,7 @@ import { ISptCommand } from "@spt/helpers/Dialogue/Commando/SptCommands/ISptComm import { ItemHelper } from "@spt/helpers/ItemHelper"; import { PresetHelper } from "@spt/helpers/PresetHelper"; import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IUserDialogInfo } from "@spt/models/eft/profile/IUserDialogInfo"; import { Money } from "@spt/models/enums/Money"; import { IProfileChangeEvent, ProfileChangeEventType } from "@spt/models/spt/dialog/ISendMessageDetails"; import { ILogger } from "@spt/models/spt/utils/ILogger"; @@ -56,7 +56,7 @@ export class TraderSptCommand implements ISptCommand { const trader: string = result.groups.trader; const command: string = result.groups.command; - let quantity: number = +result.groups.quantity; + let quantity = +result.groups.quantity; const dbTrader = Object.values(this.databaseService.getTraders()).find( (t) => t.base.nickname.toLocaleLowerCase() === trader.toLocaleLowerCase(), diff --git a/project/src/helpers/Dialogue/CommandoDialogueChatBot.ts b/project/src/helpers/Dialogue/CommandoDialogueChatBot.ts index c339edb7..2d495e1f 100644 --- a/project/src/helpers/Dialogue/CommandoDialogueChatBot.ts +++ b/project/src/helpers/Dialogue/CommandoDialogueChatBot.ts @@ -1,6 +1,6 @@ import { AbstractDialogueChatBot } from "@spt/helpers/Dialogue/AbstractDialogueChatBot"; import { IChatCommand } from "@spt/helpers/Dialogue/Commando/IChatCommand"; -import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IUserDialogInfo } from "@spt/models/eft/profile/IUserDialogInfo"; import { MemberCategory } from "@spt/models/enums/MemberCategory"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { MailSendService } from "@spt/services/MailSendService"; diff --git a/project/src/helpers/Dialogue/IDialogueChatBot.ts b/project/src/helpers/Dialogue/IDialogueChatBot.ts index 38b3d21e..e2dc0c99 100644 --- a/project/src/helpers/Dialogue/IDialogueChatBot.ts +++ b/project/src/helpers/Dialogue/IDialogueChatBot.ts @@ -1,5 +1,5 @@ import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IUserDialogInfo } from "@spt/models/eft/profile/IUserDialogInfo"; export interface IDialogueChatBot { getChatBot(): IUserDialogInfo; diff --git a/project/src/helpers/Dialogue/SptDialogueChatBot.ts b/project/src/helpers/Dialogue/SptDialogueChatBot.ts index 6de42596..28c5103f 100644 --- a/project/src/helpers/Dialogue/SptDialogueChatBot.ts +++ b/project/src/helpers/Dialogue/SptDialogueChatBot.ts @@ -1,7 +1,7 @@ import { IDialogueChatBot } from "@spt/helpers/Dialogue/IDialogueChatBot"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { ISendMessageRequest } from "@spt/models/eft/dialog/ISendMessageRequest"; -import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IUserDialogInfo } from "@spt/models/eft/profile/IUserDialogInfo"; import { ConfigTypes } from "@spt/models/enums/ConfigTypes"; import { GiftSentResult } from "@spt/models/enums/GiftSentResult"; import { MemberCategory } from "@spt/models/enums/MemberCategory"; diff --git a/project/src/helpers/NotificationSendHelper.ts b/project/src/helpers/NotificationSendHelper.ts index ccd207e5..1c00a24e 100644 --- a/project/src/helpers/NotificationSendHelper.ts +++ b/project/src/helpers/NotificationSendHelper.ts @@ -1,4 +1,5 @@ -import { IDialogue, IMessage, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IDialogue, IMessage } from "@spt/models/eft/profile/ISptProfile"; +import { IUserDialogInfo } from "@spt/models/eft/profile/IUserDialogInfo"; import { IWsChatMessageReceived } from "@spt/models/eft/ws/IWsChatMessageReceived"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; import { MemberCategory } from "@spt/models/enums/MemberCategory"; diff --git a/project/src/helpers/NotifierHelper.ts b/project/src/helpers/NotifierHelper.ts index 42c7d1e8..4b2785db 100644 --- a/project/src/helpers/NotifierHelper.ts +++ b/project/src/helpers/NotifierHelper.ts @@ -1,5 +1,6 @@ import { HttpServerHelper } from "@spt/helpers/HttpServerHelper"; -import { IMessage, IMessageContentRagfair } from "@spt/models/eft/profile/ISptProfile"; +import { IMessageContentRagfair } from "@spt/models/eft/profile/IMessageContentRagfair"; +import { IMessage } from "@spt/models/eft/profile/ISptProfile"; import { IWsChatMessageReceived } from "@spt/models/eft/ws/IWsChatMessageReceived"; import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent"; import { IWsRagfairOfferSold } from "@spt/models/eft/ws/IWsRagfairOfferSold"; diff --git a/project/src/helpers/RagfairOfferHelper.ts b/project/src/helpers/RagfairOfferHelper.ts index 608e558d..f4940944 100644 --- a/project/src/helpers/RagfairOfferHelper.ts +++ b/project/src/helpers/RagfairOfferHelper.ts @@ -12,7 +12,8 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IItem } from "@spt/models/eft/common/tables/IItem"; import { ITraderAssort } from "@spt/models/eft/common/tables/ITrader"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; -import { ISptProfile, ISystemData } from "@spt/models/eft/profile/ISptProfile"; +import { ISptProfile } from "@spt/models/eft/profile/ISptProfile"; +import { ISystemData } from "@spt/models/eft/profile/ISystemData"; import { IRagfairOffer } from "@spt/models/eft/ragfair/IRagfairOffer"; import { ISearchRequestData, OfferOwnerType } from "@spt/models/eft/ragfair/ISearchRequestData"; import { BaseClasses } from "@spt/models/enums/BaseClasses"; diff --git a/project/src/models/eft/dialog/IGetFriendListDataResponse.ts b/project/src/models/eft/dialog/IGetFriendListDataResponse.ts index d7ccadd3..5cbbefce 100644 --- a/project/src/models/eft/dialog/IGetFriendListDataResponse.ts +++ b/project/src/models/eft/dialog/IGetFriendListDataResponse.ts @@ -1,4 +1,4 @@ -import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IUserDialogInfo } from "../profile/IUserDialogInfo"; export interface IGetFriendListDataResponse { Friends: IUserDialogInfo[]; diff --git a/project/src/models/eft/dialog/IGetMailDialogViewResponseData.ts b/project/src/models/eft/dialog/IGetMailDialogViewResponseData.ts index 96bf7689..588b72b6 100644 --- a/project/src/models/eft/dialog/IGetMailDialogViewResponseData.ts +++ b/project/src/models/eft/dialog/IGetMailDialogViewResponseData.ts @@ -1,4 +1,5 @@ -import { IMessage, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IMessage } from "@spt/models/eft/profile/ISptProfile"; +import { IUserDialogInfo } from "../profile/IUserDialogInfo"; export interface IGetMailDialogViewResponseData { messages: IMessage[]; diff --git a/project/src/models/eft/profile/IMessageContentRagfair.ts b/project/src/models/eft/profile/IMessageContentRagfair.ts new file mode 100644 index 00000000..dca36f7f --- /dev/null +++ b/project/src/models/eft/profile/IMessageContentRagfair.ts @@ -0,0 +1,5 @@ +export interface IMessageContentRagfair { + offerId: string; + count: number; + handbookId: string; +} diff --git a/project/src/models/eft/profile/ISptProfile.ts b/project/src/models/eft/profile/ISptProfile.ts index 367aa998..9c47acd7 100644 --- a/project/src/models/eft/profile/ISptProfile.ts +++ b/project/src/models/eft/profile/ISptProfile.ts @@ -4,6 +4,8 @@ import { EquipmentBuildType } from "@spt/models/enums/EquipmentBuildType"; import { MemberCategory } from "@spt/models/enums/MemberCategory"; import { MessageType } from "@spt/models/enums/MessageType"; import { IProfileChangeEvent } from "@spt/models/spt/dialog/ISendMessageDetails"; +import { ISystemData } from "./ISystemData"; +import { IUserDialogInfo } from "./IUserDialogInfo"; export interface ISptProfile { info: Info; @@ -98,20 +100,6 @@ export interface IDialogue { _id: string; } -export interface IUserDialogInfo { - _id: string; - aid: number; - Info?: IUserDialogDetails; -} - -export interface IUserDialogDetails { - Nickname: string; - Side: string; - Level: number; - MemberCategory: MemberCategory; - SelectedMemberCategory: MemberCategory; -} - // @Cleanup: Maybe the same as Dialogue? export interface IDialogueInfo { attachmentsNew: number; @@ -163,15 +151,6 @@ export interface IMessageItems { data?: IItem[]; } -export interface ISystemData { - date?: string; - time?: string; - location?: string; - buyerNickname?: string; - soldItem?: string; - itemCount?: number; -} - export interface IUpdatableChatMember { Nickname: string; Side: string; @@ -282,9 +261,3 @@ export interface IInsurance { messageTemplateId: string; items: IItem[]; } - -export interface IMessageContentRagfair { - offerId: string; - count: number; - handbookId: string; -} diff --git a/project/src/models/eft/profile/ISystemData.ts b/project/src/models/eft/profile/ISystemData.ts new file mode 100644 index 00000000..d8fc46e9 --- /dev/null +++ b/project/src/models/eft/profile/ISystemData.ts @@ -0,0 +1,8 @@ +export interface ISystemData { + date?: string; + time?: string; + location?: string; + buyerNickname?: string; + soldItem?: string; + itemCount?: number; +} diff --git a/project/src/models/eft/profile/IUserDialogInfo.ts b/project/src/models/eft/profile/IUserDialogInfo.ts new file mode 100644 index 00000000..08517175 --- /dev/null +++ b/project/src/models/eft/profile/IUserDialogInfo.ts @@ -0,0 +1,15 @@ +import { MemberCategory } from "@spt/models/enums/MemberCategory"; + +export interface IUserDialogInfo { + _id: string; + aid: number; + Info?: IUserDialogDetails; +} + +export interface IUserDialogDetails { + Nickname: string; + Side: string; + Level: number; + MemberCategory: MemberCategory; + SelectedMemberCategory: MemberCategory; +} diff --git a/project/src/models/spt/config/IGiftsConfig.ts b/project/src/models/spt/config/IGiftsConfig.ts index 32198413..77266a2a 100644 --- a/project/src/models/spt/config/IGiftsConfig.ts +++ b/project/src/models/spt/config/IGiftsConfig.ts @@ -1,5 +1,5 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IUserDialogInfo } from "@spt/models/eft/profile/IUserDialogInfo"; import { GiftSenderType } from "@spt/models/enums/GiftSenderType"; import { SeasonalEventType } from "@spt/models/enums/SeasonalEventType"; import { Traders } from "@spt/models/enums/Traders"; diff --git a/project/src/models/spt/dialog/ISendMessageDetails.ts b/project/src/models/spt/dialog/ISendMessageDetails.ts index 4fe61069..0df9673d 100644 --- a/project/src/models/spt/dialog/ISendMessageDetails.ts +++ b/project/src/models/spt/dialog/ISendMessageDetails.ts @@ -1,5 +1,7 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { IMessageContentRagfair, ISystemData, IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IMessageContentRagfair } from "@spt/models/eft/profile/IMessageContentRagfair"; +import { ISystemData } from "@spt/models/eft/profile/ISystemData"; +import { IUserDialogInfo } from "@spt/models/eft/profile/IUserDialogInfo"; import { MessageType } from "@spt/models/enums/MessageType"; import { Traders } from "@spt/models/enums/Traders"; diff --git a/project/src/services/MailSendService.ts b/project/src/services/MailSendService.ts index 03b67ae7..7fe5ab6c 100644 --- a/project/src/services/MailSendService.ts +++ b/project/src/services/MailSendService.ts @@ -4,14 +4,10 @@ import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper"; import { NotifierHelper } from "@spt/helpers/NotifierHelper"; import { TraderHelper } from "@spt/helpers/TraderHelper"; import { IItem } from "@spt/models/eft/common/tables/IItem"; -import { - IDialogue, - IMessage, - IMessageContentRagfair, - IMessageItems, - ISystemData, - IUserDialogInfo, -} from "@spt/models/eft/profile/ISptProfile"; +import { IMessageContentRagfair } from "@spt/models/eft/profile/IMessageContentRagfair"; +import { IDialogue, IMessage, IMessageItems } from "@spt/models/eft/profile/ISptProfile"; +import { ISystemData } from "@spt/models/eft/profile/ISystemData"; +import { IUserDialogInfo } from "@spt/models/eft/profile/IUserDialogInfo"; import { BaseClasses } from "@spt/models/enums/BaseClasses"; import { MessageType } from "@spt/models/enums/MessageType"; import { Traders } from "@spt/models/enums/Traders"; diff --git a/project/src/services/PmcChatResponseService.ts b/project/src/services/PmcChatResponseService.ts index 32709a19..f706552c 100644 --- a/project/src/services/PmcChatResponseService.ts +++ b/project/src/services/PmcChatResponseService.ts @@ -2,7 +2,7 @@ import { NotificationSendHelper } from "@spt/helpers/NotificationSendHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IAggressor, IVictim } from "@spt/models/eft/common/tables/IBotBase"; -import { IUserDialogInfo } from "@spt/models/eft/profile/ISptProfile"; +import { IUserDialogInfo } from "@spt/models/eft/profile/IUserDialogInfo"; import { ConfigTypes } from "@spt/models/enums/ConfigTypes"; import { MemberCategory } from "@spt/models/enums/MemberCategory"; import { MessageType } from "@spt/models/enums/MessageType";