From 780be737ab54029f1d55d967994eb657291accb1 Mon Sep 17 00:00:00 2001 From: Chomp Date: Tue, 24 Dec 2024 09:48:16 +0000 Subject: [PATCH] Updated types --- .../types/generators/BotGenerator.d.ts | 12 ++++++++++-- .../types/helpers/RagfairOfferHelper.d.ts | 12 ++++++++++++ .../types/models/eft/common/tables/IBotBase.d.ts | 1 + .../types/models/spt/config/IInventoryConfig.d.ts | 2 ++ .../types/models/spt/config/IPmcConfig.d.ts | 2 ++ .../types/models/spt/config/IRagfairConfig.d.ts | 2 ++ .../models/spt/config/ISeasonalEventConfig.d.ts | 2 ++ .../types/services/BotNameService.d.ts | 14 +++++++++----- .../types/services/DatabaseService.d.ts | 4 ++-- .../types/services/InsuranceService.d.ts | 14 -------------- .../types/services/PaymentService.d.ts | 6 +++++- .../types/services/PostDbLoadService.d.ts | 2 ++ .../types/services/ProfileFixerService.d.ts | 6 ++++++ .../types/services/SeasonalEventService.d.ts | 13 ++++++++++++- TypeScript/10ScopesAndTypes/types/utils/App.d.ts | 2 +- .../types/utils/ProgressWriter.d.ts | 13 +++++++++++++ .../types/generators/BotGenerator.d.ts | 12 ++++++++++-- .../types/helpers/RagfairOfferHelper.d.ts | 12 ++++++++++++ .../types/models/eft/common/tables/IBotBase.d.ts | 1 + .../types/models/spt/config/IInventoryConfig.d.ts | 2 ++ .../types/models/spt/config/IPmcConfig.d.ts | 2 ++ .../types/models/spt/config/IRagfairConfig.d.ts | 2 ++ .../models/spt/config/ISeasonalEventConfig.d.ts | 2 ++ .../types/services/BotNameService.d.ts | 14 +++++++++----- .../types/services/DatabaseService.d.ts | 4 ++-- .../types/services/InsuranceService.d.ts | 14 -------------- .../types/services/PaymentService.d.ts | 6 +++++- .../types/services/PostDbLoadService.d.ts | 2 ++ .../types/services/ProfileFixerService.d.ts | 6 ++++++ .../types/services/SeasonalEventService.d.ts | 13 ++++++++++++- .../11BundleLoadingSample/types/utils/App.d.ts | 2 +- .../types/utils/ProgressWriter.d.ts | 13 +++++++++++++ .../types/generators/BotGenerator.d.ts | 12 ++++++++++-- .../types/helpers/RagfairOfferHelper.d.ts | 12 ++++++++++++ .../types/models/eft/common/tables/IBotBase.d.ts | 1 + .../types/models/spt/config/IInventoryConfig.d.ts | 2 ++ .../types/models/spt/config/IPmcConfig.d.ts | 2 ++ .../types/models/spt/config/IRagfairConfig.d.ts | 2 ++ .../models/spt/config/ISeasonalEventConfig.d.ts | 2 ++ .../types/services/BotNameService.d.ts | 14 +++++++++----- .../types/services/DatabaseService.d.ts | 4 ++-- .../types/services/InsuranceService.d.ts | 14 -------------- .../types/services/PaymentService.d.ts | 6 +++++- .../types/services/PostDbLoadService.d.ts | 2 ++ .../types/services/ProfileFixerService.d.ts | 6 ++++++ .../types/services/SeasonalEventService.d.ts | 13 ++++++++++++- .../12ClassExtensionOverride/types/utils/App.d.ts | 2 +- .../types/utils/ProgressWriter.d.ts | 13 +++++++++++++ .../types/generators/BotGenerator.d.ts | 12 ++++++++++-- .../types/helpers/RagfairOfferHelper.d.ts | 12 ++++++++++++ .../types/models/eft/common/tables/IBotBase.d.ts | 1 + .../types/models/spt/config/IInventoryConfig.d.ts | 2 ++ .../types/models/spt/config/IPmcConfig.d.ts | 2 ++ .../types/models/spt/config/IRagfairConfig.d.ts | 2 ++ .../models/spt/config/ISeasonalEventConfig.d.ts | 2 ++ .../types/services/BotNameService.d.ts | 14 +++++++++----- .../types/services/DatabaseService.d.ts | 4 ++-- .../types/services/InsuranceService.d.ts | 14 -------------- .../types/services/PaymentService.d.ts | 6 +++++- .../types/services/PostDbLoadService.d.ts | 2 ++ .../types/services/ProfileFixerService.d.ts | 6 ++++++ .../types/services/SeasonalEventService.d.ts | 13 ++++++++++++- .../types/utils/App.d.ts | 2 +- .../types/utils/ProgressWriter.d.ts | 13 +++++++++++++ .../13AddTrader/types/generators/BotGenerator.d.ts | 12 ++++++++++-- .../types/helpers/RagfairOfferHelper.d.ts | 12 ++++++++++++ .../types/models/eft/common/tables/IBotBase.d.ts | 1 + .../types/models/spt/config/IInventoryConfig.d.ts | 2 ++ .../types/models/spt/config/IPmcConfig.d.ts | 2 ++ .../types/models/spt/config/IRagfairConfig.d.ts | 2 ++ .../models/spt/config/ISeasonalEventConfig.d.ts | 2 ++ .../13AddTrader/types/services/BotNameService.d.ts | 14 +++++++++----- .../types/services/DatabaseService.d.ts | 4 ++-- .../types/services/InsuranceService.d.ts | 14 -------------- .../13AddTrader/types/services/PaymentService.d.ts | 6 +++++- .../types/services/PostDbLoadService.d.ts | 2 ++ .../types/services/ProfileFixerService.d.ts | 6 ++++++ .../types/services/SeasonalEventService.d.ts | 13 ++++++++++++- TypeScript/13AddTrader/types/utils/App.d.ts | 2 +- .../13AddTrader/types/utils/ProgressWriter.d.ts | 13 +++++++++++++ .../types/generators/BotGenerator.d.ts | 12 ++++++++++-- .../types/helpers/RagfairOfferHelper.d.ts | 12 ++++++++++++ .../types/models/eft/common/tables/IBotBase.d.ts | 1 + .../types/models/spt/config/IInventoryConfig.d.ts | 2 ++ .../types/models/spt/config/IPmcConfig.d.ts | 2 ++ .../types/models/spt/config/IRagfairConfig.d.ts | 2 ++ .../models/spt/config/ISeasonalEventConfig.d.ts | 2 ++ .../types/services/BotNameService.d.ts | 14 +++++++++----- .../types/services/DatabaseService.d.ts | 4 ++-- .../types/services/InsuranceService.d.ts | 14 -------------- .../types/services/PaymentService.d.ts | 6 +++++- .../types/services/PostDbLoadService.d.ts | 2 ++ .../types/services/ProfileFixerService.d.ts | 6 ++++++ .../types/services/SeasonalEventService.d.ts | 13 ++++++++++++- TypeScript/14AfterDBLoadHook/types/utils/App.d.ts | 2 +- .../types/utils/ProgressWriter.d.ts | 13 +++++++++++++ .../types/generators/BotGenerator.d.ts | 12 ++++++++++-- .../types/helpers/RagfairOfferHelper.d.ts | 12 ++++++++++++ .../types/models/eft/common/tables/IBotBase.d.ts | 1 + .../types/models/spt/config/IInventoryConfig.d.ts | 2 ++ .../types/models/spt/config/IPmcConfig.d.ts | 2 ++ .../types/models/spt/config/IRagfairConfig.d.ts | 2 ++ .../models/spt/config/ISeasonalEventConfig.d.ts | 2 ++ .../types/services/BotNameService.d.ts | 14 +++++++++----- .../types/services/DatabaseService.d.ts | 4 ++-- .../types/services/InsuranceService.d.ts | 14 -------------- .../types/services/PaymentService.d.ts | 6 +++++- .../types/services/PostDbLoadService.d.ts | 2 ++ .../types/services/ProfileFixerService.d.ts | 6 ++++++ .../types/services/SeasonalEventService.d.ts | 13 ++++++++++++- .../15HttpListenerExample/types/utils/App.d.ts | 2 +- .../types/utils/ProgressWriter.d.ts | 13 +++++++++++++ .../types/generators/BotGenerator.d.ts | 12 ++++++++++-- .../types/helpers/RagfairOfferHelper.d.ts | 12 ++++++++++++ .../types/models/eft/common/tables/IBotBase.d.ts | 1 + .../types/models/spt/config/IInventoryConfig.d.ts | 2 ++ .../types/models/spt/config/IPmcConfig.d.ts | 2 ++ .../types/models/spt/config/IRagfairConfig.d.ts | 2 ++ .../models/spt/config/ISeasonalEventConfig.d.ts | 2 ++ .../types/services/BotNameService.d.ts | 14 +++++++++----- .../types/services/DatabaseService.d.ts | 4 ++-- .../types/services/InsuranceService.d.ts | 14 -------------- .../types/services/PaymentService.d.ts | 6 +++++- .../types/services/PostDbLoadService.d.ts | 2 ++ .../types/services/ProfileFixerService.d.ts | 6 ++++++ .../types/services/SeasonalEventService.d.ts | 13 ++++++++++++- TypeScript/16ImporterUtil/types/utils/App.d.ts | 2 +- .../16ImporterUtil/types/utils/ProgressWriter.d.ts | 13 +++++++++++++ .../types/generators/BotGenerator.d.ts | 12 ++++++++++-- .../types/helpers/RagfairOfferHelper.d.ts | 12 ++++++++++++ .../types/models/eft/common/tables/IBotBase.d.ts | 1 + .../types/models/spt/config/IInventoryConfig.d.ts | 2 ++ .../types/models/spt/config/IPmcConfig.d.ts | 2 ++ .../types/models/spt/config/IRagfairConfig.d.ts | 2 ++ .../models/spt/config/ISeasonalEventConfig.d.ts | 2 ++ .../types/services/BotNameService.d.ts | 14 +++++++++----- .../types/services/DatabaseService.d.ts | 4 ++-- .../types/services/InsuranceService.d.ts | 14 -------------- .../types/services/PaymentService.d.ts | 6 +++++- .../types/services/PostDbLoadService.d.ts | 2 ++ .../types/services/ProfileFixerService.d.ts | 6 ++++++ .../types/services/SeasonalEventService.d.ts | 13 ++++++++++++- .../types/utils/App.d.ts | 2 +- .../types/utils/ProgressWriter.d.ts | 13 +++++++++++++ .../types/generators/BotGenerator.d.ts | 12 ++++++++++-- .../types/helpers/RagfairOfferHelper.d.ts | 12 ++++++++++++ .../types/models/eft/common/tables/IBotBase.d.ts | 1 + .../types/models/spt/config/IInventoryConfig.d.ts | 2 ++ .../types/models/spt/config/IPmcConfig.d.ts | 2 ++ .../types/models/spt/config/IRagfairConfig.d.ts | 2 ++ .../models/spt/config/ISeasonalEventConfig.d.ts | 2 ++ .../types/services/BotNameService.d.ts | 14 +++++++++----- .../types/services/DatabaseService.d.ts | 4 ++-- .../types/services/InsuranceService.d.ts | 14 -------------- .../types/services/PaymentService.d.ts | 6 +++++- .../types/services/PostDbLoadService.d.ts | 2 ++ .../types/services/ProfileFixerService.d.ts | 6 ++++++ .../types/services/SeasonalEventService.d.ts | 13 ++++++++++++- .../types/utils/App.d.ts | 2 +- .../types/utils/ProgressWriter.d.ts | 13 +++++++++++++ .../types/generators/BotGenerator.d.ts | 12 ++++++++++-- .../types/helpers/RagfairOfferHelper.d.ts | 12 ++++++++++++ .../types/models/eft/common/tables/IBotBase.d.ts | 1 + .../types/models/spt/config/IInventoryConfig.d.ts | 2 ++ .../types/models/spt/config/IPmcConfig.d.ts | 2 ++ .../types/models/spt/config/IRagfairConfig.d.ts | 2 ++ .../models/spt/config/ISeasonalEventConfig.d.ts | 2 ++ .../types/services/BotNameService.d.ts | 14 +++++++++----- .../types/services/DatabaseService.d.ts | 4 ++-- .../types/services/InsuranceService.d.ts | 14 -------------- .../types/services/PaymentService.d.ts | 6 +++++- .../types/services/PostDbLoadService.d.ts | 2 ++ .../types/services/ProfileFixerService.d.ts | 6 ++++++ .../types/services/SeasonalEventService.d.ts | 13 ++++++++++++- .../types/utils/App.d.ts | 2 +- .../types/utils/ProgressWriter.d.ts | 13 +++++++++++++ .../types/generators/BotGenerator.d.ts | 12 ++++++++++-- .../types/helpers/RagfairOfferHelper.d.ts | 12 ++++++++++++ .../types/models/eft/common/tables/IBotBase.d.ts | 1 + .../types/models/spt/config/IInventoryConfig.d.ts | 2 ++ .../types/models/spt/config/IPmcConfig.d.ts | 2 ++ .../types/models/spt/config/IRagfairConfig.d.ts | 2 ++ .../models/spt/config/ISeasonalEventConfig.d.ts | 2 ++ .../types/services/BotNameService.d.ts | 14 +++++++++----- .../types/services/DatabaseService.d.ts | 4 ++-- .../types/services/InsuranceService.d.ts | 14 -------------- .../types/services/PaymentService.d.ts | 6 +++++- .../types/services/PostDbLoadService.d.ts | 2 ++ .../types/services/ProfileFixerService.d.ts | 6 ++++++ .../types/services/SeasonalEventService.d.ts | 13 ++++++++++++- .../18CustomItemService/types/utils/App.d.ts | 2 +- .../types/utils/ProgressWriter.d.ts | 13 +++++++++++++ .../types/generators/BotGenerator.d.ts | 12 ++++++++++-- .../types/helpers/RagfairOfferHelper.d.ts | 12 ++++++++++++ .../types/models/eft/common/tables/IBotBase.d.ts | 1 + .../types/models/spt/config/IInventoryConfig.d.ts | 2 ++ .../types/models/spt/config/IPmcConfig.d.ts | 2 ++ .../types/models/spt/config/IRagfairConfig.d.ts | 2 ++ .../models/spt/config/ISeasonalEventConfig.d.ts | 2 ++ .../types/services/BotNameService.d.ts | 14 +++++++++----- .../types/services/DatabaseService.d.ts | 4 ++-- .../types/services/InsuranceService.d.ts | 14 -------------- .../types/services/PaymentService.d.ts | 6 +++++- .../types/services/PostDbLoadService.d.ts | 2 ++ .../types/services/ProfileFixerService.d.ts | 6 ++++++ .../types/services/SeasonalEventService.d.ts | 13 ++++++++++++- .../19UseExternalLibraries/types/utils/App.d.ts | 2 +- .../types/utils/ProgressWriter.d.ts | 13 +++++++++++++ .../types/generators/BotGenerator.d.ts | 12 ++++++++++-- .../types/helpers/RagfairOfferHelper.d.ts | 12 ++++++++++++ .../types/models/eft/common/tables/IBotBase.d.ts | 1 + .../types/models/spt/config/IInventoryConfig.d.ts | 2 ++ .../types/models/spt/config/IPmcConfig.d.ts | 2 ++ .../types/models/spt/config/IRagfairConfig.d.ts | 2 ++ .../models/spt/config/ISeasonalEventConfig.d.ts | 2 ++ .../types/services/BotNameService.d.ts | 14 +++++++++----- .../types/services/DatabaseService.d.ts | 4 ++-- .../types/services/InsuranceService.d.ts | 14 -------------- .../types/services/PaymentService.d.ts | 6 +++++- .../types/services/PostDbLoadService.d.ts | 2 ++ .../types/services/ProfileFixerService.d.ts | 6 ++++++ .../types/services/SeasonalEventService.d.ts | 13 ++++++++++++- TypeScript/1LogToConsole/types/utils/App.d.ts | 2 +- .../1LogToConsole/types/utils/ProgressWriter.d.ts | 13 +++++++++++++ .../types/generators/BotGenerator.d.ts | 12 ++++++++++-- .../types/helpers/RagfairOfferHelper.d.ts | 12 ++++++++++++ .../types/models/eft/common/tables/IBotBase.d.ts | 1 + .../types/models/spt/config/IInventoryConfig.d.ts | 2 ++ .../types/models/spt/config/IPmcConfig.d.ts | 2 ++ .../types/models/spt/config/IRagfairConfig.d.ts | 2 ++ .../models/spt/config/ISeasonalEventConfig.d.ts | 2 ++ .../types/services/BotNameService.d.ts | 14 +++++++++----- .../types/services/DatabaseService.d.ts | 4 ++-- .../types/services/InsuranceService.d.ts | 14 -------------- .../types/services/PaymentService.d.ts | 6 +++++- .../types/services/PostDbLoadService.d.ts | 2 ++ .../types/services/ProfileFixerService.d.ts | 6 ++++++ .../types/services/SeasonalEventService.d.ts | 13 ++++++++++++- TypeScript/20CustomChatBot/types/utils/App.d.ts | 2 +- .../types/utils/ProgressWriter.d.ts | 13 +++++++++++++ .../types/generators/BotGenerator.d.ts | 12 ++++++++++-- .../types/helpers/RagfairOfferHelper.d.ts | 12 ++++++++++++ .../types/models/eft/common/tables/IBotBase.d.ts | 1 + .../types/models/spt/config/IInventoryConfig.d.ts | 2 ++ .../types/models/spt/config/IPmcConfig.d.ts | 2 ++ .../types/models/spt/config/IRagfairConfig.d.ts | 2 ++ .../models/spt/config/ISeasonalEventConfig.d.ts | 2 ++ .../types/services/BotNameService.d.ts | 14 +++++++++----- .../types/services/DatabaseService.d.ts | 4 ++-- .../types/services/InsuranceService.d.ts | 14 -------------- .../types/services/PaymentService.d.ts | 6 +++++- .../types/services/PostDbLoadService.d.ts | 2 ++ .../types/services/ProfileFixerService.d.ts | 6 ++++++ .../types/services/SeasonalEventService.d.ts | 13 ++++++++++++- .../21CustomCommandoCommand/types/utils/App.d.ts | 2 +- .../types/utils/ProgressWriter.d.ts | 13 +++++++++++++ .../types/generators/BotGenerator.d.ts | 12 ++++++++++-- .../types/helpers/RagfairOfferHelper.d.ts | 12 ++++++++++++ .../types/models/eft/common/tables/IBotBase.d.ts | 1 + .../types/models/spt/config/IInventoryConfig.d.ts | 2 ++ .../types/models/spt/config/IPmcConfig.d.ts | 2 ++ .../types/models/spt/config/IRagfairConfig.d.ts | 2 ++ .../models/spt/config/ISeasonalEventConfig.d.ts | 2 ++ .../types/services/BotNameService.d.ts | 14 +++++++++----- .../types/services/DatabaseService.d.ts | 4 ++-- .../types/services/InsuranceService.d.ts | 14 -------------- .../types/services/PaymentService.d.ts | 6 +++++- .../types/services/PostDbLoadService.d.ts | 2 ++ .../types/services/ProfileFixerService.d.ts | 6 ++++++ .../types/services/SeasonalEventService.d.ts | 13 ++++++++++++- TypeScript/22CustomSptCommand/types/utils/App.d.ts | 2 +- .../types/utils/ProgressWriter.d.ts | 13 +++++++++++++ .../types/generators/BotGenerator.d.ts | 12 ++++++++++-- .../types/helpers/RagfairOfferHelper.d.ts | 12 ++++++++++++ .../types/models/eft/common/tables/IBotBase.d.ts | 1 + .../types/models/spt/config/IInventoryConfig.d.ts | 2 ++ .../types/models/spt/config/IPmcConfig.d.ts | 2 ++ .../types/models/spt/config/IRagfairConfig.d.ts | 2 ++ .../models/spt/config/ISeasonalEventConfig.d.ts | 2 ++ .../types/services/BotNameService.d.ts | 14 +++++++++----- .../types/services/DatabaseService.d.ts | 4 ++-- .../types/services/InsuranceService.d.ts | 14 -------------- .../types/services/PaymentService.d.ts | 6 +++++- .../types/services/PostDbLoadService.d.ts | 2 ++ .../types/services/ProfileFixerService.d.ts | 6 ++++++ .../types/services/SeasonalEventService.d.ts | 13 ++++++++++++- .../23CustomAbstractChatBot/types/utils/App.d.ts | 2 +- .../types/utils/ProgressWriter.d.ts | 13 +++++++++++++ .../24WebSocket/types/generators/BotGenerator.d.ts | 12 ++++++++++-- .../types/helpers/RagfairOfferHelper.d.ts | 12 ++++++++++++ .../types/models/eft/common/tables/IBotBase.d.ts | 1 + .../types/models/spt/config/IInventoryConfig.d.ts | 2 ++ .../types/models/spt/config/IPmcConfig.d.ts | 2 ++ .../types/models/spt/config/IRagfairConfig.d.ts | 2 ++ .../models/spt/config/ISeasonalEventConfig.d.ts | 2 ++ .../24WebSocket/types/services/BotNameService.d.ts | 14 +++++++++----- .../types/services/DatabaseService.d.ts | 4 ++-- .../types/services/InsuranceService.d.ts | 14 -------------- .../24WebSocket/types/services/PaymentService.d.ts | 6 +++++- .../types/services/PostDbLoadService.d.ts | 2 ++ .../types/services/ProfileFixerService.d.ts | 6 ++++++ .../types/services/SeasonalEventService.d.ts | 13 ++++++++++++- TypeScript/24WebSocket/types/utils/App.d.ts | 2 +- .../24WebSocket/types/utils/ProgressWriter.d.ts | 13 +++++++++++++ .../types/generators/BotGenerator.d.ts | 12 ++++++++++-- .../types/helpers/RagfairOfferHelper.d.ts | 12 ++++++++++++ .../types/models/eft/common/tables/IBotBase.d.ts | 1 + .../types/models/spt/config/IInventoryConfig.d.ts | 2 ++ .../types/models/spt/config/IPmcConfig.d.ts | 2 ++ .../types/models/spt/config/IRagfairConfig.d.ts | 2 ++ .../models/spt/config/ISeasonalEventConfig.d.ts | 2 ++ .../types/services/BotNameService.d.ts | 14 +++++++++----- .../types/services/DatabaseService.d.ts | 4 ++-- .../types/services/InsuranceService.d.ts | 14 -------------- .../types/services/PaymentService.d.ts | 6 +++++- .../types/services/PostDbLoadService.d.ts | 2 ++ .../types/services/ProfileFixerService.d.ts | 6 ++++++ .../types/services/SeasonalEventService.d.ts | 13 ++++++++++++- TypeScript/2EditDatabase/types/utils/App.d.ts | 2 +- .../2EditDatabase/types/utils/ProgressWriter.d.ts | 13 +++++++++++++ .../types/generators/BotGenerator.d.ts | 12 ++++++++++-- .../types/helpers/RagfairOfferHelper.d.ts | 12 ++++++++++++ .../types/models/eft/common/tables/IBotBase.d.ts | 1 + .../types/models/spt/config/IInventoryConfig.d.ts | 2 ++ .../types/models/spt/config/IPmcConfig.d.ts | 2 ++ .../types/models/spt/config/IRagfairConfig.d.ts | 2 ++ .../models/spt/config/ISeasonalEventConfig.d.ts | 2 ++ .../types/services/BotNameService.d.ts | 14 +++++++++----- .../types/services/DatabaseService.d.ts | 4 ++-- .../types/services/InsuranceService.d.ts | 14 -------------- .../types/services/PaymentService.d.ts | 6 +++++- .../types/services/PostDbLoadService.d.ts | 2 ++ .../types/services/ProfileFixerService.d.ts | 6 ++++++ .../types/services/SeasonalEventService.d.ts | 13 ++++++++++++- TypeScript/3GetSptConfigFile/types/utils/App.d.ts | 2 +- .../types/utils/ProgressWriter.d.ts | 13 +++++++++++++ .../types/generators/BotGenerator.d.ts | 12 ++++++++++-- .../types/helpers/RagfairOfferHelper.d.ts | 12 ++++++++++++ .../types/models/eft/common/tables/IBotBase.d.ts | 1 + .../types/models/spt/config/IInventoryConfig.d.ts | 2 ++ .../types/models/spt/config/IPmcConfig.d.ts | 2 ++ .../types/models/spt/config/IRagfairConfig.d.ts | 2 ++ .../models/spt/config/ISeasonalEventConfig.d.ts | 2 ++ .../types/services/BotNameService.d.ts | 14 +++++++++----- .../types/services/DatabaseService.d.ts | 4 ++-- .../types/services/InsuranceService.d.ts | 14 -------------- .../types/services/PaymentService.d.ts | 6 +++++- .../types/services/PostDbLoadService.d.ts | 2 ++ .../types/services/ProfileFixerService.d.ts | 6 ++++++ .../types/services/SeasonalEventService.d.ts | 13 ++++++++++++- .../types/utils/App.d.ts | 2 +- .../types/utils/ProgressWriter.d.ts | 13 +++++++++++++ .../types/generators/BotGenerator.d.ts | 12 ++++++++++-- .../types/helpers/RagfairOfferHelper.d.ts | 12 ++++++++++++ .../types/models/eft/common/tables/IBotBase.d.ts | 1 + .../types/models/spt/config/IInventoryConfig.d.ts | 2 ++ .../types/models/spt/config/IPmcConfig.d.ts | 2 ++ .../types/models/spt/config/IRagfairConfig.d.ts | 2 ++ .../models/spt/config/ISeasonalEventConfig.d.ts | 2 ++ .../types/services/BotNameService.d.ts | 14 +++++++++----- .../types/services/DatabaseService.d.ts | 4 ++-- .../types/services/InsuranceService.d.ts | 14 -------------- .../types/services/PaymentService.d.ts | 6 +++++- .../types/services/PostDbLoadService.d.ts | 2 ++ .../types/services/ProfileFixerService.d.ts | 6 ++++++ .../types/services/SeasonalEventService.d.ts | 13 ++++++++++++- .../4UseACustomConfigFile/types/utils/App.d.ts | 2 +- .../types/utils/ProgressWriter.d.ts | 13 +++++++++++++ .../types/generators/BotGenerator.d.ts | 12 ++++++++++-- .../types/helpers/RagfairOfferHelper.d.ts | 12 ++++++++++++ .../types/models/eft/common/tables/IBotBase.d.ts | 1 + .../types/models/spt/config/IInventoryConfig.d.ts | 2 ++ .../types/models/spt/config/IPmcConfig.d.ts | 2 ++ .../types/models/spt/config/IRagfairConfig.d.ts | 2 ++ .../models/spt/config/ISeasonalEventConfig.d.ts | 2 ++ .../types/services/BotNameService.d.ts | 14 +++++++++----- .../types/services/DatabaseService.d.ts | 4 ++-- .../types/services/InsuranceService.d.ts | 14 -------------- .../types/services/PaymentService.d.ts | 6 +++++- .../types/services/PostDbLoadService.d.ts | 2 ++ .../types/services/ProfileFixerService.d.ts | 6 ++++++ .../types/services/SeasonalEventService.d.ts | 13 ++++++++++++- TypeScript/5ReplaceMethod/types/utils/App.d.ts | 2 +- .../5ReplaceMethod/types/utils/ProgressWriter.d.ts | 13 +++++++++++++ .../types/generators/BotGenerator.d.ts | 12 ++++++++++-- .../types/helpers/RagfairOfferHelper.d.ts | 12 ++++++++++++ .../types/models/eft/common/tables/IBotBase.d.ts | 1 + .../types/models/spt/config/IInventoryConfig.d.ts | 2 ++ .../types/models/spt/config/IPmcConfig.d.ts | 2 ++ .../types/models/spt/config/IRagfairConfig.d.ts | 2 ++ .../models/spt/config/ISeasonalEventConfig.d.ts | 2 ++ .../types/services/BotNameService.d.ts | 14 +++++++++----- .../types/services/DatabaseService.d.ts | 4 ++-- .../types/services/InsuranceService.d.ts | 14 -------------- .../types/services/PaymentService.d.ts | 6 +++++- .../types/services/PostDbLoadService.d.ts | 2 ++ .../types/services/ProfileFixerService.d.ts | 6 ++++++ .../types/services/SeasonalEventService.d.ts | 13 ++++++++++++- .../6ReferenceAnotherClass/types/utils/App.d.ts | 2 +- .../types/utils/ProgressWriter.d.ts | 13 +++++++++++++ .../7OnLoadHook/types/generators/BotGenerator.d.ts | 12 ++++++++++-- .../types/helpers/RagfairOfferHelper.d.ts | 12 ++++++++++++ .../types/models/eft/common/tables/IBotBase.d.ts | 1 + .../types/models/spt/config/IInventoryConfig.d.ts | 2 ++ .../types/models/spt/config/IPmcConfig.d.ts | 2 ++ .../types/models/spt/config/IRagfairConfig.d.ts | 2 ++ .../models/spt/config/ISeasonalEventConfig.d.ts | 2 ++ .../7OnLoadHook/types/services/BotNameService.d.ts | 14 +++++++++----- .../types/services/DatabaseService.d.ts | 4 ++-- .../types/services/InsuranceService.d.ts | 14 -------------- .../7OnLoadHook/types/services/PaymentService.d.ts | 6 +++++- .../types/services/PostDbLoadService.d.ts | 2 ++ .../types/services/ProfileFixerService.d.ts | 6 ++++++ .../types/services/SeasonalEventService.d.ts | 13 ++++++++++++- TypeScript/7OnLoadHook/types/utils/App.d.ts | 2 +- .../7OnLoadHook/types/utils/ProgressWriter.d.ts | 13 +++++++++++++ .../types/generators/BotGenerator.d.ts | 12 ++++++++++-- .../types/helpers/RagfairOfferHelper.d.ts | 12 ++++++++++++ .../types/models/eft/common/tables/IBotBase.d.ts | 1 + .../types/models/spt/config/IInventoryConfig.d.ts | 2 ++ .../types/models/spt/config/IPmcConfig.d.ts | 2 ++ .../types/models/spt/config/IRagfairConfig.d.ts | 2 ++ .../models/spt/config/ISeasonalEventConfig.d.ts | 2 ++ .../types/services/BotNameService.d.ts | 14 +++++++++----- .../types/services/DatabaseService.d.ts | 4 ++-- .../types/services/InsuranceService.d.ts | 14 -------------- .../types/services/PaymentService.d.ts | 6 +++++- .../types/services/PostDbLoadService.d.ts | 2 ++ .../types/services/ProfileFixerService.d.ts | 6 ++++++ .../types/services/SeasonalEventService.d.ts | 13 ++++++++++++- TypeScript/8OnUpdateHook/types/utils/App.d.ts | 2 +- .../8OnUpdateHook/types/utils/ProgressWriter.d.ts | 13 +++++++++++++ .../types/generators/BotGenerator.d.ts | 12 ++++++++++-- .../types/helpers/RagfairOfferHelper.d.ts | 12 ++++++++++++ .../types/models/eft/common/tables/IBotBase.d.ts | 1 + .../types/models/spt/config/IInventoryConfig.d.ts | 2 ++ .../types/models/spt/config/IPmcConfig.d.ts | 2 ++ .../types/models/spt/config/IRagfairConfig.d.ts | 2 ++ .../models/spt/config/ISeasonalEventConfig.d.ts | 2 ++ .../types/services/BotNameService.d.ts | 14 +++++++++----- .../types/services/DatabaseService.d.ts | 4 ++-- .../types/services/InsuranceService.d.ts | 14 -------------- .../types/services/PaymentService.d.ts | 6 +++++- .../types/services/PostDbLoadService.d.ts | 2 ++ .../types/services/ProfileFixerService.d.ts | 6 ++++++ .../types/services/SeasonalEventService.d.ts | 13 ++++++++++++- TypeScript/9RouterHooks/types/utils/App.d.ts | 2 +- .../9RouterHooks/types/utils/ProgressWriter.d.ts | 13 +++++++++++++ 448 files changed, 2268 insertions(+), 728 deletions(-) create mode 100644 TypeScript/10ScopesAndTypes/types/utils/ProgressWriter.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/utils/ProgressWriter.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/utils/ProgressWriter.d.ts create mode 100644 TypeScript/13.1AddTraderWithAssortJSON/types/utils/ProgressWriter.d.ts create mode 100644 TypeScript/13AddTrader/types/utils/ProgressWriter.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/utils/ProgressWriter.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/utils/ProgressWriter.d.ts create mode 100644 TypeScript/16ImporterUtil/types/utils/ProgressWriter.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/utils/ProgressWriter.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/utils/ProgressWriter.d.ts create mode 100644 TypeScript/18.1CustomItemServiceLootBox/types/utils/ProgressWriter.d.ts create mode 100644 TypeScript/18CustomItemService/types/utils/ProgressWriter.d.ts create mode 100644 TypeScript/19UseExternalLibraries/types/utils/ProgressWriter.d.ts create mode 100644 TypeScript/1LogToConsole/types/utils/ProgressWriter.d.ts create mode 100644 TypeScript/20CustomChatBot/types/utils/ProgressWriter.d.ts create mode 100644 TypeScript/21CustomCommandoCommand/types/utils/ProgressWriter.d.ts create mode 100644 TypeScript/22CustomSptCommand/types/utils/ProgressWriter.d.ts create mode 100644 TypeScript/23CustomAbstractChatBot/types/utils/ProgressWriter.d.ts create mode 100644 TypeScript/24WebSocket/types/utils/ProgressWriter.d.ts create mode 100644 TypeScript/2EditDatabase/types/utils/ProgressWriter.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/utils/ProgressWriter.d.ts create mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/utils/ProgressWriter.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/utils/ProgressWriter.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/utils/ProgressWriter.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/utils/ProgressWriter.d.ts create mode 100644 TypeScript/7OnLoadHook/types/utils/ProgressWriter.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/utils/ProgressWriter.d.ts create mode 100644 TypeScript/9RouterHooks/types/utils/ProgressWriter.d.ts diff --git a/TypeScript/10ScopesAndTypes/types/generators/BotGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/BotGenerator.d.ts index 2c7bba6..a2291f4 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/BotGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/BotGenerator.d.ts @@ -5,6 +5,7 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { MinMax } from "@spt/models/common/MinMax"; +import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase"; import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; @@ -47,9 +48,10 @@ export declare class BotGenerator { * @param role e.g. assault / pmcbot * @param difficulty easy/normal/hard/impossible * @param botTemplate base bot template to use (e.g. assault/pmcbot) - * @returns + * profile PMC profile of player generating pscav + * @returns IBotBase */ - generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase; + generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType, profile: IPmcData): IBotBase; /** * Create 1 bot of the type/side/difficulty defined in botGenerationDetails * @param sessionId Session id @@ -79,6 +81,12 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; + /** + * Should this bot have a name like "name (Pmc Name)" and be alterd by client patch to be hostile to player + * @param botRole Role bot has + * @returns True if name should be simulated pscav + */ + protected shouldSimulatePlayerScav(botRole: string): boolean; /** * Get exp for kill by bot difficulty * @param experience Dict of difficulties and experience diff --git a/TypeScript/10ScopesAndTypes/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/RagfairOfferHelper.d.ts index 9dd5be3..0ff9c66 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/RagfairOfferHelper.d.ts @@ -91,6 +91,12 @@ export declare class RagfairOfferHelper { * @returns IRagfairOffer array */ getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcData: IPmcData): IRagfairOffer[]; + /** + * Get offers that have not exceeded buy limits + * @param possibleOffers offers to process + * @returns Offers + */ + protected getOffersInsideBuyRestrictionLimits(possibleOffers: IRagfairOffer[]): IRagfairOffer[]; /** * Check if offer is from trader standing the player does not have * @param offer Offer to check @@ -209,4 +215,10 @@ export declare class RagfairOfferHelper { * @returns True if in range */ protected itemQualityInRange(item: IItem, min: number, max: number): boolean; + /** + * Does this offer come from a trader + * @param offer Offer to check + * @returns True = from trader + */ + offerIsFromTrader(offer: IRagfairOffer): boolean; } diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/IBotBase.d.ts index d3fd87e..8609573 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/IBotBase.d.ts @@ -60,6 +60,7 @@ export interface IUnlockedInfo { export interface IInfo { EntryPoint: string; Nickname: string; + MainProfileNickname?: string; LowerNickname: string; Side: string; SquadInviteRestriction: boolean; diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/config/IInventoryConfig.d.ts index af0ec79..00ba5b1 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/config/IInventoryConfig.d.ts @@ -10,6 +10,8 @@ export interface IInventoryConfig extends IBaseConfig { customMoneyTpls: string[]; /** Multipliers for skill gain when inside menus, NOT in-game */ skillGainMultiplers: Record; + /** Container Tpls that shoud be deprioritised when choosing where to take money from for payments */ + deprioritisedMoneyContainers: string[]; } export interface IRewardDetails { rewardCount: number; diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/config/IPmcConfig.d.ts index 2e68219..02c9c5b 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/config/IPmcConfig.d.ts @@ -66,7 +66,9 @@ export interface IPmcTypes { bear: string; } export interface ISlotLootSettings { + /** Item Type whitelist */ whitelist: string[]; + /** item tpl blacklist */ blacklist: string[]; } export interface IMinMaxLootValue extends MinMax { diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/config/IRagfairConfig.d.ts index 36122c5..805a6b2 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/config/IRagfairConfig.d.ts @@ -75,6 +75,8 @@ export interface IDynamic { blacklist: IRagfairBlacklist; /** Dict of price limits keyed by item type */ unreasonableModPrices: Record; + /** Custom rouble prices for items to override values from prices.json */ + itemPriceOverrideRouble: Record; } export interface IPriceRanges { default: MinMax; diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/config/ISeasonalEventConfig.d.ts index 5e119fa..bf93685 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -6,6 +6,8 @@ export interface ISeasonalEventConfig extends IBaseConfig { enableSeasonalEventDetection: boolean; /** event / botType / equipSlot / itemid */ eventGear: Record>>>; + /** event / bot type / equipSlot / itemid */ + eventLoot: Record>>>; events: ISeasonalEvent[]; eventBotMapping: Record; eventBossSpawns: Record>; diff --git a/TypeScript/10ScopesAndTypes/types/services/BotNameService.d.ts b/TypeScript/10ScopesAndTypes/types/services/BotNameService.d.ts index 056bd0f..349964d 100644 --- a/TypeScript/10ScopesAndTypes/types/services/BotNameService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/BotNameService.d.ts @@ -1,5 +1,6 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; @@ -38,10 +39,13 @@ export declare class BotNameService { */ generateUniqueBotNickname(botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails, botRole: string, uniqueRoles?: string[]): string; /** - * Should this bot have a name like "name (Pmc Name)" - * @param botRole Role bot has - * @returns True if name should be simulated pscav + * Add random PMC name to bots MainProfileNickname property + * @param bot Bot to update */ - protected shouldSimulatePlayerScavName(botRole: string): boolean; - protected addPlayerScavNameSimulationSuffix(nickname: string): string; + addRandomPmcNameToBotMainProfileNicknameProperty(bot: IBotBase): void; + /** + * Choose a random PMC name from bear or usec bot jsons + * @returns PMC name as string + */ + protected getRandomPMCName(): string; } diff --git a/TypeScript/10ScopesAndTypes/types/services/DatabaseService.d.ts b/TypeScript/10ScopesAndTypes/types/services/DatabaseService.d.ts index 934617a..73575b1 100644 --- a/TypeScript/10ScopesAndTypes/types/services/DatabaseService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/DatabaseService.d.ts @@ -85,7 +85,7 @@ export declare class DatabaseService { */ getCustomization(): Record; /** - * @returns assets/database/templates/items.json + * @returns assets/database/templates/handbook.json */ getHandbook(): IHandbookBase; /** @@ -101,7 +101,7 @@ export declare class DatabaseService { */ getProfiles(): IProfileTemplates; /** - * @returns assets/database/templates/items.json + * @returns assets/database/templates/quests.json */ getQuests(): Record; /** diff --git a/TypeScript/10ScopesAndTypes/types/services/InsuranceService.d.ts b/TypeScript/10ScopesAndTypes/types/services/InsuranceService.d.ts index ac9cff5..e52fa59 100644 --- a/TypeScript/10ScopesAndTypes/types/services/InsuranceService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/InsuranceService.d.ts @@ -62,14 +62,6 @@ export declare class InsuranceService { * @returns Timestamp to return items to player in seconds */ protected getInsuranceReturnTimestamp(pmcData: IPmcData, trader: ITraderBase): number; - /** - * Take the insurance item packages within a profile session and ensure that each of the items in that package are - * not orphaned from their parent ID. - * - * @param sessionID The session ID to update insurance equipment packages in. - * @returns void - */ - protected adoptOrphanedInsEquipment(sessionID: string): void; protected getMaxInsuranceStorageTime(traderBase: ITraderBase): number; /** * Store lost gear post-raid inside profile, ready for later code to pick it up and mail it @@ -127,10 +119,4 @@ export declare class InsuranceService { * @returns price in roubles */ getRoublePriceToInsureItemWithTrader(pmcData: IPmcData, inventoryItem: IItem, traderId: string): number; - /** - * Returns the ID that should be used for a root-level Item's parentId property value within in the context of insurance. - * @param sessionID Players id - * @returns The root item Id. - */ - getRootItemParentID(sessionID: string): string; } diff --git a/TypeScript/10ScopesAndTypes/types/services/PaymentService.d.ts b/TypeScript/10ScopesAndTypes/types/services/PaymentService.d.ts index f6ec79d..78fdfb6 100644 --- a/TypeScript/10ScopesAndTypes/types/services/PaymentService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/PaymentService.d.ts @@ -8,7 +8,9 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IProcessBuyTradeRequestData } from "@spt/models/eft/trade/IProcessBuyTradeRequestData"; import { IProcessSellTradeRequestData } from "@spt/models/eft/trade/IProcessSellTradeRequestData"; +import { IInventoryConfig } from "@spt/models/spt/config/IInventoryConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { HashUtil } from "@spt/utils/HashUtil"; @@ -24,7 +26,9 @@ export declare class PaymentService { protected inventoryHelper: InventoryHelper; protected localisationService: LocalisationService; protected paymentHelper: PaymentHelper; - constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper); + protected configServer: ConfigServer; + protected inventoryConfig: IInventoryConfig; + constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper, configServer: ConfigServer); /** * Take money and insert items into return to server request * @param pmcData Pmc profile diff --git a/TypeScript/10ScopesAndTypes/types/services/PostDbLoadService.d.ts b/TypeScript/10ScopesAndTypes/types/services/PostDbLoadService.d.ts index c9e4bbe..cc51311 100644 --- a/TypeScript/10ScopesAndTypes/types/services/PostDbLoadService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/PostDbLoadService.d.ts @@ -74,4 +74,6 @@ export declare class PostDbLoadService { */ protected validateQuestAssortUnlocksExist(): void; protected setAllDbItemsAsSellableOnFlea(): void; + protected addMissingTraderBuyRestrictionMaxValue(): void; + protected applyFleaPriceOverrides(): void; } diff --git a/TypeScript/10ScopesAndTypes/types/services/ProfileFixerService.d.ts b/TypeScript/10ScopesAndTypes/types/services/ProfileFixerService.d.ts index 4a3a5ff..cbbe1d0 100644 --- a/TypeScript/10ScopesAndTypes/types/services/ProfileFixerService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/ProfileFixerService.d.ts @@ -47,6 +47,12 @@ export declare class ProfileFixerService { * @param pmcProfile profile to check and fix */ checkForAndFixPmcProfileIssues(pmcProfile: IPmcData): void; + /** + * Resolve any dialogue attachments that were accidentally created using the player's equipment ID as + * the stash root object ID + * @param fullProfile + */ + checkForAndFixDialogueAttachments(fullProfile: ISptProfile): void; /** * Find issues in the scav profile data that may cause issues * @param scavProfile profile to check and fix diff --git a/TypeScript/10ScopesAndTypes/types/services/SeasonalEventService.d.ts b/TypeScript/10ScopesAndTypes/types/services/SeasonalEventService.d.ts index 446cccc..26b74ef 100644 --- a/TypeScript/10ScopesAndTypes/types/services/SeasonalEventService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/SeasonalEventService.d.ts @@ -88,6 +88,12 @@ export declare class SeasonalEventService { * @returns bots with equipment changes */ protected getEventBotGear(eventType: SeasonalEventType): Record>>; + /** + * Get a dictionary of loot changes to apply to bots for a specific event e.g. Christmas/Halloween + * @param eventName Name of event to get gear changes for + * @returns bots with loot changes + */ + protected getEventBotLoot(eventType: SeasonalEventType): Record>>; /** * Get the dates each seasonal event starts and ends at * @returns Record with event name + start/end date @@ -108,7 +114,7 @@ export declare class SeasonalEventService { /** * Store active events inside class array property `currentlyActiveEvents` + set class properties: christmasEventActive/halloweenEventActive */ - protected cacheActiveEvents(): void; + cacheActiveEvents(): void; /** * Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER * @returns Season enum value @@ -171,6 +177,11 @@ export declare class SeasonalEventService { * @param eventName Name of the event to read equipment in from config */ protected addEventGearToBots(eventType: SeasonalEventType): void; + /** + * Read in data from seasonalEvents.json and add found loot items to bots + * @param eventName Name of the event to read loot in from config + */ + protected addEventLootToBots(eventType: SeasonalEventType): void; /** * Add pumpkin loot boxes to scavs */ diff --git a/TypeScript/10ScopesAndTypes/types/utils/App.d.ts b/TypeScript/10ScopesAndTypes/types/utils/App.d.ts index db46d2c..0e4850e 100644 --- a/TypeScript/10ScopesAndTypes/types/utils/App.d.ts +++ b/TypeScript/10ScopesAndTypes/types/utils/App.d.ts @@ -4,10 +4,10 @@ import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { HttpServer } from "@spt/servers/HttpServer"; -import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { EncodingUtil } from "@spt/utils/EncodingUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; +import { DatabaseService } from "@spt/services/DatabaseService"; export declare class App { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/10ScopesAndTypes/types/utils/ProgressWriter.d.ts b/TypeScript/10ScopesAndTypes/types/utils/ProgressWriter.d.ts new file mode 100644 index 0000000..2641d3a --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/utils/ProgressWriter.d.ts @@ -0,0 +1,13 @@ +export declare class ProgressWriter { + private count; + private total?; + private done; + private barFillChar; + private barEmptyChar; + private maxBarLength; + constructor(total: number, maxBarLength?: number, barFillChar?: string, barEmptyChar?: string); + /** + * Increment the progress counter and update the progress bar display. + */ + increment(): void; +} diff --git a/TypeScript/11BundleLoadingSample/types/generators/BotGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/BotGenerator.d.ts index 2c7bba6..a2291f4 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/BotGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/BotGenerator.d.ts @@ -5,6 +5,7 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { MinMax } from "@spt/models/common/MinMax"; +import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase"; import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; @@ -47,9 +48,10 @@ export declare class BotGenerator { * @param role e.g. assault / pmcbot * @param difficulty easy/normal/hard/impossible * @param botTemplate base bot template to use (e.g. assault/pmcbot) - * @returns + * profile PMC profile of player generating pscav + * @returns IBotBase */ - generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase; + generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType, profile: IPmcData): IBotBase; /** * Create 1 bot of the type/side/difficulty defined in botGenerationDetails * @param sessionId Session id @@ -79,6 +81,12 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; + /** + * Should this bot have a name like "name (Pmc Name)" and be alterd by client patch to be hostile to player + * @param botRole Role bot has + * @returns True if name should be simulated pscav + */ + protected shouldSimulatePlayerScav(botRole: string): boolean; /** * Get exp for kill by bot difficulty * @param experience Dict of difficulties and experience diff --git a/TypeScript/11BundleLoadingSample/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/RagfairOfferHelper.d.ts index 9dd5be3..0ff9c66 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/RagfairOfferHelper.d.ts @@ -91,6 +91,12 @@ export declare class RagfairOfferHelper { * @returns IRagfairOffer array */ getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcData: IPmcData): IRagfairOffer[]; + /** + * Get offers that have not exceeded buy limits + * @param possibleOffers offers to process + * @returns Offers + */ + protected getOffersInsideBuyRestrictionLimits(possibleOffers: IRagfairOffer[]): IRagfairOffer[]; /** * Check if offer is from trader standing the player does not have * @param offer Offer to check @@ -209,4 +215,10 @@ export declare class RagfairOfferHelper { * @returns True if in range */ protected itemQualityInRange(item: IItem, min: number, max: number): boolean; + /** + * Does this offer come from a trader + * @param offer Offer to check + * @returns True = from trader + */ + offerIsFromTrader(offer: IRagfairOffer): boolean; } diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/IBotBase.d.ts index d3fd87e..8609573 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/IBotBase.d.ts @@ -60,6 +60,7 @@ export interface IUnlockedInfo { export interface IInfo { EntryPoint: string; Nickname: string; + MainProfileNickname?: string; LowerNickname: string; Side: string; SquadInviteRestriction: boolean; diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/config/IInventoryConfig.d.ts index af0ec79..00ba5b1 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/config/IInventoryConfig.d.ts @@ -10,6 +10,8 @@ export interface IInventoryConfig extends IBaseConfig { customMoneyTpls: string[]; /** Multipliers for skill gain when inside menus, NOT in-game */ skillGainMultiplers: Record; + /** Container Tpls that shoud be deprioritised when choosing where to take money from for payments */ + deprioritisedMoneyContainers: string[]; } export interface IRewardDetails { rewardCount: number; diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/config/IPmcConfig.d.ts index 2e68219..02c9c5b 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/config/IPmcConfig.d.ts @@ -66,7 +66,9 @@ export interface IPmcTypes { bear: string; } export interface ISlotLootSettings { + /** Item Type whitelist */ whitelist: string[]; + /** item tpl blacklist */ blacklist: string[]; } export interface IMinMaxLootValue extends MinMax { diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/config/IRagfairConfig.d.ts index 36122c5..805a6b2 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/config/IRagfairConfig.d.ts @@ -75,6 +75,8 @@ export interface IDynamic { blacklist: IRagfairBlacklist; /** Dict of price limits keyed by item type */ unreasonableModPrices: Record; + /** Custom rouble prices for items to override values from prices.json */ + itemPriceOverrideRouble: Record; } export interface IPriceRanges { default: MinMax; diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/config/ISeasonalEventConfig.d.ts index 5e119fa..bf93685 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -6,6 +6,8 @@ export interface ISeasonalEventConfig extends IBaseConfig { enableSeasonalEventDetection: boolean; /** event / botType / equipSlot / itemid */ eventGear: Record>>>; + /** event / bot type / equipSlot / itemid */ + eventLoot: Record>>>; events: ISeasonalEvent[]; eventBotMapping: Record; eventBossSpawns: Record>; diff --git a/TypeScript/11BundleLoadingSample/types/services/BotNameService.d.ts b/TypeScript/11BundleLoadingSample/types/services/BotNameService.d.ts index 056bd0f..349964d 100644 --- a/TypeScript/11BundleLoadingSample/types/services/BotNameService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/BotNameService.d.ts @@ -1,5 +1,6 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; @@ -38,10 +39,13 @@ export declare class BotNameService { */ generateUniqueBotNickname(botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails, botRole: string, uniqueRoles?: string[]): string; /** - * Should this bot have a name like "name (Pmc Name)" - * @param botRole Role bot has - * @returns True if name should be simulated pscav + * Add random PMC name to bots MainProfileNickname property + * @param bot Bot to update */ - protected shouldSimulatePlayerScavName(botRole: string): boolean; - protected addPlayerScavNameSimulationSuffix(nickname: string): string; + addRandomPmcNameToBotMainProfileNicknameProperty(bot: IBotBase): void; + /** + * Choose a random PMC name from bear or usec bot jsons + * @returns PMC name as string + */ + protected getRandomPMCName(): string; } diff --git a/TypeScript/11BundleLoadingSample/types/services/DatabaseService.d.ts b/TypeScript/11BundleLoadingSample/types/services/DatabaseService.d.ts index 934617a..73575b1 100644 --- a/TypeScript/11BundleLoadingSample/types/services/DatabaseService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/DatabaseService.d.ts @@ -85,7 +85,7 @@ export declare class DatabaseService { */ getCustomization(): Record; /** - * @returns assets/database/templates/items.json + * @returns assets/database/templates/handbook.json */ getHandbook(): IHandbookBase; /** @@ -101,7 +101,7 @@ export declare class DatabaseService { */ getProfiles(): IProfileTemplates; /** - * @returns assets/database/templates/items.json + * @returns assets/database/templates/quests.json */ getQuests(): Record; /** diff --git a/TypeScript/11BundleLoadingSample/types/services/InsuranceService.d.ts b/TypeScript/11BundleLoadingSample/types/services/InsuranceService.d.ts index ac9cff5..e52fa59 100644 --- a/TypeScript/11BundleLoadingSample/types/services/InsuranceService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/InsuranceService.d.ts @@ -62,14 +62,6 @@ export declare class InsuranceService { * @returns Timestamp to return items to player in seconds */ protected getInsuranceReturnTimestamp(pmcData: IPmcData, trader: ITraderBase): number; - /** - * Take the insurance item packages within a profile session and ensure that each of the items in that package are - * not orphaned from their parent ID. - * - * @param sessionID The session ID to update insurance equipment packages in. - * @returns void - */ - protected adoptOrphanedInsEquipment(sessionID: string): void; protected getMaxInsuranceStorageTime(traderBase: ITraderBase): number; /** * Store lost gear post-raid inside profile, ready for later code to pick it up and mail it @@ -127,10 +119,4 @@ export declare class InsuranceService { * @returns price in roubles */ getRoublePriceToInsureItemWithTrader(pmcData: IPmcData, inventoryItem: IItem, traderId: string): number; - /** - * Returns the ID that should be used for a root-level Item's parentId property value within in the context of insurance. - * @param sessionID Players id - * @returns The root item Id. - */ - getRootItemParentID(sessionID: string): string; } diff --git a/TypeScript/11BundleLoadingSample/types/services/PaymentService.d.ts b/TypeScript/11BundleLoadingSample/types/services/PaymentService.d.ts index f6ec79d..78fdfb6 100644 --- a/TypeScript/11BundleLoadingSample/types/services/PaymentService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/PaymentService.d.ts @@ -8,7 +8,9 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IProcessBuyTradeRequestData } from "@spt/models/eft/trade/IProcessBuyTradeRequestData"; import { IProcessSellTradeRequestData } from "@spt/models/eft/trade/IProcessSellTradeRequestData"; +import { IInventoryConfig } from "@spt/models/spt/config/IInventoryConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { HashUtil } from "@spt/utils/HashUtil"; @@ -24,7 +26,9 @@ export declare class PaymentService { protected inventoryHelper: InventoryHelper; protected localisationService: LocalisationService; protected paymentHelper: PaymentHelper; - constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper); + protected configServer: ConfigServer; + protected inventoryConfig: IInventoryConfig; + constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper, configServer: ConfigServer); /** * Take money and insert items into return to server request * @param pmcData Pmc profile diff --git a/TypeScript/11BundleLoadingSample/types/services/PostDbLoadService.d.ts b/TypeScript/11BundleLoadingSample/types/services/PostDbLoadService.d.ts index c9e4bbe..cc51311 100644 --- a/TypeScript/11BundleLoadingSample/types/services/PostDbLoadService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/PostDbLoadService.d.ts @@ -74,4 +74,6 @@ export declare class PostDbLoadService { */ protected validateQuestAssortUnlocksExist(): void; protected setAllDbItemsAsSellableOnFlea(): void; + protected addMissingTraderBuyRestrictionMaxValue(): void; + protected applyFleaPriceOverrides(): void; } diff --git a/TypeScript/11BundleLoadingSample/types/services/ProfileFixerService.d.ts b/TypeScript/11BundleLoadingSample/types/services/ProfileFixerService.d.ts index 4a3a5ff..cbbe1d0 100644 --- a/TypeScript/11BundleLoadingSample/types/services/ProfileFixerService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/ProfileFixerService.d.ts @@ -47,6 +47,12 @@ export declare class ProfileFixerService { * @param pmcProfile profile to check and fix */ checkForAndFixPmcProfileIssues(pmcProfile: IPmcData): void; + /** + * Resolve any dialogue attachments that were accidentally created using the player's equipment ID as + * the stash root object ID + * @param fullProfile + */ + checkForAndFixDialogueAttachments(fullProfile: ISptProfile): void; /** * Find issues in the scav profile data that may cause issues * @param scavProfile profile to check and fix diff --git a/TypeScript/11BundleLoadingSample/types/services/SeasonalEventService.d.ts b/TypeScript/11BundleLoadingSample/types/services/SeasonalEventService.d.ts index 446cccc..26b74ef 100644 --- a/TypeScript/11BundleLoadingSample/types/services/SeasonalEventService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/SeasonalEventService.d.ts @@ -88,6 +88,12 @@ export declare class SeasonalEventService { * @returns bots with equipment changes */ protected getEventBotGear(eventType: SeasonalEventType): Record>>; + /** + * Get a dictionary of loot changes to apply to bots for a specific event e.g. Christmas/Halloween + * @param eventName Name of event to get gear changes for + * @returns bots with loot changes + */ + protected getEventBotLoot(eventType: SeasonalEventType): Record>>; /** * Get the dates each seasonal event starts and ends at * @returns Record with event name + start/end date @@ -108,7 +114,7 @@ export declare class SeasonalEventService { /** * Store active events inside class array property `currentlyActiveEvents` + set class properties: christmasEventActive/halloweenEventActive */ - protected cacheActiveEvents(): void; + cacheActiveEvents(): void; /** * Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER * @returns Season enum value @@ -171,6 +177,11 @@ export declare class SeasonalEventService { * @param eventName Name of the event to read equipment in from config */ protected addEventGearToBots(eventType: SeasonalEventType): void; + /** + * Read in data from seasonalEvents.json and add found loot items to bots + * @param eventName Name of the event to read loot in from config + */ + protected addEventLootToBots(eventType: SeasonalEventType): void; /** * Add pumpkin loot boxes to scavs */ diff --git a/TypeScript/11BundleLoadingSample/types/utils/App.d.ts b/TypeScript/11BundleLoadingSample/types/utils/App.d.ts index db46d2c..0e4850e 100644 --- a/TypeScript/11BundleLoadingSample/types/utils/App.d.ts +++ b/TypeScript/11BundleLoadingSample/types/utils/App.d.ts @@ -4,10 +4,10 @@ import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { HttpServer } from "@spt/servers/HttpServer"; -import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { EncodingUtil } from "@spt/utils/EncodingUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; +import { DatabaseService } from "@spt/services/DatabaseService"; export declare class App { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/11BundleLoadingSample/types/utils/ProgressWriter.d.ts b/TypeScript/11BundleLoadingSample/types/utils/ProgressWriter.d.ts new file mode 100644 index 0000000..2641d3a --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/utils/ProgressWriter.d.ts @@ -0,0 +1,13 @@ +export declare class ProgressWriter { + private count; + private total?; + private done; + private barFillChar; + private barEmptyChar; + private maxBarLength; + constructor(total: number, maxBarLength?: number, barFillChar?: string, barEmptyChar?: string); + /** + * Increment the progress counter and update the progress bar display. + */ + increment(): void; +} diff --git a/TypeScript/12ClassExtensionOverride/types/generators/BotGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/BotGenerator.d.ts index 2c7bba6..a2291f4 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/BotGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/BotGenerator.d.ts @@ -5,6 +5,7 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { MinMax } from "@spt/models/common/MinMax"; +import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase"; import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; @@ -47,9 +48,10 @@ export declare class BotGenerator { * @param role e.g. assault / pmcbot * @param difficulty easy/normal/hard/impossible * @param botTemplate base bot template to use (e.g. assault/pmcbot) - * @returns + * profile PMC profile of player generating pscav + * @returns IBotBase */ - generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase; + generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType, profile: IPmcData): IBotBase; /** * Create 1 bot of the type/side/difficulty defined in botGenerationDetails * @param sessionId Session id @@ -79,6 +81,12 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; + /** + * Should this bot have a name like "name (Pmc Name)" and be alterd by client patch to be hostile to player + * @param botRole Role bot has + * @returns True if name should be simulated pscav + */ + protected shouldSimulatePlayerScav(botRole: string): boolean; /** * Get exp for kill by bot difficulty * @param experience Dict of difficulties and experience diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/RagfairOfferHelper.d.ts index 9dd5be3..0ff9c66 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/RagfairOfferHelper.d.ts @@ -91,6 +91,12 @@ export declare class RagfairOfferHelper { * @returns IRagfairOffer array */ getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcData: IPmcData): IRagfairOffer[]; + /** + * Get offers that have not exceeded buy limits + * @param possibleOffers offers to process + * @returns Offers + */ + protected getOffersInsideBuyRestrictionLimits(possibleOffers: IRagfairOffer[]): IRagfairOffer[]; /** * Check if offer is from trader standing the player does not have * @param offer Offer to check @@ -209,4 +215,10 @@ export declare class RagfairOfferHelper { * @returns True if in range */ protected itemQualityInRange(item: IItem, min: number, max: number): boolean; + /** + * Does this offer come from a trader + * @param offer Offer to check + * @returns True = from trader + */ + offerIsFromTrader(offer: IRagfairOffer): boolean; } diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/IBotBase.d.ts index d3fd87e..8609573 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/IBotBase.d.ts @@ -60,6 +60,7 @@ export interface IUnlockedInfo { export interface IInfo { EntryPoint: string; Nickname: string; + MainProfileNickname?: string; LowerNickname: string; Side: string; SquadInviteRestriction: boolean; diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IInventoryConfig.d.ts index af0ec79..00ba5b1 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IInventoryConfig.d.ts @@ -10,6 +10,8 @@ export interface IInventoryConfig extends IBaseConfig { customMoneyTpls: string[]; /** Multipliers for skill gain when inside menus, NOT in-game */ skillGainMultiplers: Record; + /** Container Tpls that shoud be deprioritised when choosing where to take money from for payments */ + deprioritisedMoneyContainers: string[]; } export interface IRewardDetails { rewardCount: number; diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IPmcConfig.d.ts index 2e68219..02c9c5b 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IPmcConfig.d.ts @@ -66,7 +66,9 @@ export interface IPmcTypes { bear: string; } export interface ISlotLootSettings { + /** Item Type whitelist */ whitelist: string[]; + /** item tpl blacklist */ blacklist: string[]; } export interface IMinMaxLootValue extends MinMax { diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IRagfairConfig.d.ts index 36122c5..805a6b2 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IRagfairConfig.d.ts @@ -75,6 +75,8 @@ export interface IDynamic { blacklist: IRagfairBlacklist; /** Dict of price limits keyed by item type */ unreasonableModPrices: Record; + /** Custom rouble prices for items to override values from prices.json */ + itemPriceOverrideRouble: Record; } export interface IPriceRanges { default: MinMax; diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/config/ISeasonalEventConfig.d.ts index 5e119fa..bf93685 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -6,6 +6,8 @@ export interface ISeasonalEventConfig extends IBaseConfig { enableSeasonalEventDetection: boolean; /** event / botType / equipSlot / itemid */ eventGear: Record>>>; + /** event / bot type / equipSlot / itemid */ + eventLoot: Record>>>; events: ISeasonalEvent[]; eventBotMapping: Record; eventBossSpawns: Record>; diff --git a/TypeScript/12ClassExtensionOverride/types/services/BotNameService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/BotNameService.d.ts index 056bd0f..349964d 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/BotNameService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/BotNameService.d.ts @@ -1,5 +1,6 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; @@ -38,10 +39,13 @@ export declare class BotNameService { */ generateUniqueBotNickname(botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails, botRole: string, uniqueRoles?: string[]): string; /** - * Should this bot have a name like "name (Pmc Name)" - * @param botRole Role bot has - * @returns True if name should be simulated pscav + * Add random PMC name to bots MainProfileNickname property + * @param bot Bot to update */ - protected shouldSimulatePlayerScavName(botRole: string): boolean; - protected addPlayerScavNameSimulationSuffix(nickname: string): string; + addRandomPmcNameToBotMainProfileNicknameProperty(bot: IBotBase): void; + /** + * Choose a random PMC name from bear or usec bot jsons + * @returns PMC name as string + */ + protected getRandomPMCName(): string; } diff --git a/TypeScript/12ClassExtensionOverride/types/services/DatabaseService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/DatabaseService.d.ts index 934617a..73575b1 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/DatabaseService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/DatabaseService.d.ts @@ -85,7 +85,7 @@ export declare class DatabaseService { */ getCustomization(): Record; /** - * @returns assets/database/templates/items.json + * @returns assets/database/templates/handbook.json */ getHandbook(): IHandbookBase; /** @@ -101,7 +101,7 @@ export declare class DatabaseService { */ getProfiles(): IProfileTemplates; /** - * @returns assets/database/templates/items.json + * @returns assets/database/templates/quests.json */ getQuests(): Record; /** diff --git a/TypeScript/12ClassExtensionOverride/types/services/InsuranceService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/InsuranceService.d.ts index ac9cff5..e52fa59 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/InsuranceService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/InsuranceService.d.ts @@ -62,14 +62,6 @@ export declare class InsuranceService { * @returns Timestamp to return items to player in seconds */ protected getInsuranceReturnTimestamp(pmcData: IPmcData, trader: ITraderBase): number; - /** - * Take the insurance item packages within a profile session and ensure that each of the items in that package are - * not orphaned from their parent ID. - * - * @param sessionID The session ID to update insurance equipment packages in. - * @returns void - */ - protected adoptOrphanedInsEquipment(sessionID: string): void; protected getMaxInsuranceStorageTime(traderBase: ITraderBase): number; /** * Store lost gear post-raid inside profile, ready for later code to pick it up and mail it @@ -127,10 +119,4 @@ export declare class InsuranceService { * @returns price in roubles */ getRoublePriceToInsureItemWithTrader(pmcData: IPmcData, inventoryItem: IItem, traderId: string): number; - /** - * Returns the ID that should be used for a root-level Item's parentId property value within in the context of insurance. - * @param sessionID Players id - * @returns The root item Id. - */ - getRootItemParentID(sessionID: string): string; } diff --git a/TypeScript/12ClassExtensionOverride/types/services/PaymentService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/PaymentService.d.ts index f6ec79d..78fdfb6 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/PaymentService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/PaymentService.d.ts @@ -8,7 +8,9 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IProcessBuyTradeRequestData } from "@spt/models/eft/trade/IProcessBuyTradeRequestData"; import { IProcessSellTradeRequestData } from "@spt/models/eft/trade/IProcessSellTradeRequestData"; +import { IInventoryConfig } from "@spt/models/spt/config/IInventoryConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { HashUtil } from "@spt/utils/HashUtil"; @@ -24,7 +26,9 @@ export declare class PaymentService { protected inventoryHelper: InventoryHelper; protected localisationService: LocalisationService; protected paymentHelper: PaymentHelper; - constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper); + protected configServer: ConfigServer; + protected inventoryConfig: IInventoryConfig; + constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper, configServer: ConfigServer); /** * Take money and insert items into return to server request * @param pmcData Pmc profile diff --git a/TypeScript/12ClassExtensionOverride/types/services/PostDbLoadService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/PostDbLoadService.d.ts index c9e4bbe..cc51311 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/PostDbLoadService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/PostDbLoadService.d.ts @@ -74,4 +74,6 @@ export declare class PostDbLoadService { */ protected validateQuestAssortUnlocksExist(): void; protected setAllDbItemsAsSellableOnFlea(): void; + protected addMissingTraderBuyRestrictionMaxValue(): void; + protected applyFleaPriceOverrides(): void; } diff --git a/TypeScript/12ClassExtensionOverride/types/services/ProfileFixerService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/ProfileFixerService.d.ts index 4a3a5ff..cbbe1d0 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/ProfileFixerService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/ProfileFixerService.d.ts @@ -47,6 +47,12 @@ export declare class ProfileFixerService { * @param pmcProfile profile to check and fix */ checkForAndFixPmcProfileIssues(pmcProfile: IPmcData): void; + /** + * Resolve any dialogue attachments that were accidentally created using the player's equipment ID as + * the stash root object ID + * @param fullProfile + */ + checkForAndFixDialogueAttachments(fullProfile: ISptProfile): void; /** * Find issues in the scav profile data that may cause issues * @param scavProfile profile to check and fix diff --git a/TypeScript/12ClassExtensionOverride/types/services/SeasonalEventService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/SeasonalEventService.d.ts index 446cccc..26b74ef 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/SeasonalEventService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/SeasonalEventService.d.ts @@ -88,6 +88,12 @@ export declare class SeasonalEventService { * @returns bots with equipment changes */ protected getEventBotGear(eventType: SeasonalEventType): Record>>; + /** + * Get a dictionary of loot changes to apply to bots for a specific event e.g. Christmas/Halloween + * @param eventName Name of event to get gear changes for + * @returns bots with loot changes + */ + protected getEventBotLoot(eventType: SeasonalEventType): Record>>; /** * Get the dates each seasonal event starts and ends at * @returns Record with event name + start/end date @@ -108,7 +114,7 @@ export declare class SeasonalEventService { /** * Store active events inside class array property `currentlyActiveEvents` + set class properties: christmasEventActive/halloweenEventActive */ - protected cacheActiveEvents(): void; + cacheActiveEvents(): void; /** * Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER * @returns Season enum value @@ -171,6 +177,11 @@ export declare class SeasonalEventService { * @param eventName Name of the event to read equipment in from config */ protected addEventGearToBots(eventType: SeasonalEventType): void; + /** + * Read in data from seasonalEvents.json and add found loot items to bots + * @param eventName Name of the event to read loot in from config + */ + protected addEventLootToBots(eventType: SeasonalEventType): void; /** * Add pumpkin loot boxes to scavs */ diff --git a/TypeScript/12ClassExtensionOverride/types/utils/App.d.ts b/TypeScript/12ClassExtensionOverride/types/utils/App.d.ts index db46d2c..0e4850e 100644 --- a/TypeScript/12ClassExtensionOverride/types/utils/App.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/utils/App.d.ts @@ -4,10 +4,10 @@ import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { HttpServer } from "@spt/servers/HttpServer"; -import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { EncodingUtil } from "@spt/utils/EncodingUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; +import { DatabaseService } from "@spt/services/DatabaseService"; export declare class App { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/12ClassExtensionOverride/types/utils/ProgressWriter.d.ts b/TypeScript/12ClassExtensionOverride/types/utils/ProgressWriter.d.ts new file mode 100644 index 0000000..2641d3a --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/utils/ProgressWriter.d.ts @@ -0,0 +1,13 @@ +export declare class ProgressWriter { + private count; + private total?; + private done; + private barFillChar; + private barEmptyChar; + private maxBarLength; + constructor(total: number, maxBarLength?: number, barFillChar?: string, barEmptyChar?: string); + /** + * Increment the progress counter and update the progress bar display. + */ + increment(): void; +} diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/generators/BotGenerator.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/generators/BotGenerator.d.ts index 2c7bba6..a2291f4 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/generators/BotGenerator.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/generators/BotGenerator.d.ts @@ -5,6 +5,7 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { MinMax } from "@spt/models/common/MinMax"; +import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase"; import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; @@ -47,9 +48,10 @@ export declare class BotGenerator { * @param role e.g. assault / pmcbot * @param difficulty easy/normal/hard/impossible * @param botTemplate base bot template to use (e.g. assault/pmcbot) - * @returns + * profile PMC profile of player generating pscav + * @returns IBotBase */ - generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase; + generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType, profile: IPmcData): IBotBase; /** * Create 1 bot of the type/side/difficulty defined in botGenerationDetails * @param sessionId Session id @@ -79,6 +81,12 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; + /** + * Should this bot have a name like "name (Pmc Name)" and be alterd by client patch to be hostile to player + * @param botRole Role bot has + * @returns True if name should be simulated pscav + */ + protected shouldSimulatePlayerScav(botRole: string): boolean; /** * Get exp for kill by bot difficulty * @param experience Dict of difficulties and experience diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/RagfairOfferHelper.d.ts index 9dd5be3..0ff9c66 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/helpers/RagfairOfferHelper.d.ts @@ -91,6 +91,12 @@ export declare class RagfairOfferHelper { * @returns IRagfairOffer array */ getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcData: IPmcData): IRagfairOffer[]; + /** + * Get offers that have not exceeded buy limits + * @param possibleOffers offers to process + * @returns Offers + */ + protected getOffersInsideBuyRestrictionLimits(possibleOffers: IRagfairOffer[]): IRagfairOffer[]; /** * Check if offer is from trader standing the player does not have * @param offer Offer to check @@ -209,4 +215,10 @@ export declare class RagfairOfferHelper { * @returns True if in range */ protected itemQualityInRange(item: IItem, min: number, max: number): boolean; + /** + * Does this offer come from a trader + * @param offer Offer to check + * @returns True = from trader + */ + offerIsFromTrader(offer: IRagfairOffer): boolean; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/common/tables/IBotBase.d.ts index d3fd87e..8609573 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/eft/common/tables/IBotBase.d.ts @@ -60,6 +60,7 @@ export interface IUnlockedInfo { export interface IInfo { EntryPoint: string; Nickname: string; + MainProfileNickname?: string; LowerNickname: string; Side: string; SquadInviteRestriction: boolean; diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IInventoryConfig.d.ts index af0ec79..00ba5b1 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IInventoryConfig.d.ts @@ -10,6 +10,8 @@ export interface IInventoryConfig extends IBaseConfig { customMoneyTpls: string[]; /** Multipliers for skill gain when inside menus, NOT in-game */ skillGainMultiplers: Record; + /** Container Tpls that shoud be deprioritised when choosing where to take money from for payments */ + deprioritisedMoneyContainers: string[]; } export interface IRewardDetails { rewardCount: number; diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IPmcConfig.d.ts index 2e68219..02c9c5b 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IPmcConfig.d.ts @@ -66,7 +66,9 @@ export interface IPmcTypes { bear: string; } export interface ISlotLootSettings { + /** Item Type whitelist */ whitelist: string[]; + /** item tpl blacklist */ blacklist: string[]; } export interface IMinMaxLootValue extends MinMax { diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IRagfairConfig.d.ts index 36122c5..805a6b2 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/IRagfairConfig.d.ts @@ -75,6 +75,8 @@ export interface IDynamic { blacklist: IRagfairBlacklist; /** Dict of price limits keyed by item type */ unreasonableModPrices: Record; + /** Custom rouble prices for items to override values from prices.json */ + itemPriceOverrideRouble: Record; } export interface IPriceRanges { default: MinMax; diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/ISeasonalEventConfig.d.ts index 5e119fa..bf93685 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -6,6 +6,8 @@ export interface ISeasonalEventConfig extends IBaseConfig { enableSeasonalEventDetection: boolean; /** event / botType / equipSlot / itemid */ eventGear: Record>>>; + /** event / bot type / equipSlot / itemid */ + eventLoot: Record>>>; events: ISeasonalEvent[]; eventBotMapping: Record; eventBossSpawns: Record>; diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/services/BotNameService.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/services/BotNameService.d.ts index 056bd0f..349964d 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/services/BotNameService.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/services/BotNameService.d.ts @@ -1,5 +1,6 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; @@ -38,10 +39,13 @@ export declare class BotNameService { */ generateUniqueBotNickname(botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails, botRole: string, uniqueRoles?: string[]): string; /** - * Should this bot have a name like "name (Pmc Name)" - * @param botRole Role bot has - * @returns True if name should be simulated pscav + * Add random PMC name to bots MainProfileNickname property + * @param bot Bot to update */ - protected shouldSimulatePlayerScavName(botRole: string): boolean; - protected addPlayerScavNameSimulationSuffix(nickname: string): string; + addRandomPmcNameToBotMainProfileNicknameProperty(bot: IBotBase): void; + /** + * Choose a random PMC name from bear or usec bot jsons + * @returns PMC name as string + */ + protected getRandomPMCName(): string; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/services/DatabaseService.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/services/DatabaseService.d.ts index 934617a..73575b1 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/services/DatabaseService.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/services/DatabaseService.d.ts @@ -85,7 +85,7 @@ export declare class DatabaseService { */ getCustomization(): Record; /** - * @returns assets/database/templates/items.json + * @returns assets/database/templates/handbook.json */ getHandbook(): IHandbookBase; /** @@ -101,7 +101,7 @@ export declare class DatabaseService { */ getProfiles(): IProfileTemplates; /** - * @returns assets/database/templates/items.json + * @returns assets/database/templates/quests.json */ getQuests(): Record; /** diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/services/InsuranceService.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/services/InsuranceService.d.ts index ac9cff5..e52fa59 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/services/InsuranceService.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/services/InsuranceService.d.ts @@ -62,14 +62,6 @@ export declare class InsuranceService { * @returns Timestamp to return items to player in seconds */ protected getInsuranceReturnTimestamp(pmcData: IPmcData, trader: ITraderBase): number; - /** - * Take the insurance item packages within a profile session and ensure that each of the items in that package are - * not orphaned from their parent ID. - * - * @param sessionID The session ID to update insurance equipment packages in. - * @returns void - */ - protected adoptOrphanedInsEquipment(sessionID: string): void; protected getMaxInsuranceStorageTime(traderBase: ITraderBase): number; /** * Store lost gear post-raid inside profile, ready for later code to pick it up and mail it @@ -127,10 +119,4 @@ export declare class InsuranceService { * @returns price in roubles */ getRoublePriceToInsureItemWithTrader(pmcData: IPmcData, inventoryItem: IItem, traderId: string): number; - /** - * Returns the ID that should be used for a root-level Item's parentId property value within in the context of insurance. - * @param sessionID Players id - * @returns The root item Id. - */ - getRootItemParentID(sessionID: string): string; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/services/PaymentService.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/services/PaymentService.d.ts index f6ec79d..78fdfb6 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/services/PaymentService.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/services/PaymentService.d.ts @@ -8,7 +8,9 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IProcessBuyTradeRequestData } from "@spt/models/eft/trade/IProcessBuyTradeRequestData"; import { IProcessSellTradeRequestData } from "@spt/models/eft/trade/IProcessSellTradeRequestData"; +import { IInventoryConfig } from "@spt/models/spt/config/IInventoryConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { HashUtil } from "@spt/utils/HashUtil"; @@ -24,7 +26,9 @@ export declare class PaymentService { protected inventoryHelper: InventoryHelper; protected localisationService: LocalisationService; protected paymentHelper: PaymentHelper; - constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper); + protected configServer: ConfigServer; + protected inventoryConfig: IInventoryConfig; + constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper, configServer: ConfigServer); /** * Take money and insert items into return to server request * @param pmcData Pmc profile diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/services/PostDbLoadService.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/services/PostDbLoadService.d.ts index c9e4bbe..cc51311 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/services/PostDbLoadService.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/services/PostDbLoadService.d.ts @@ -74,4 +74,6 @@ export declare class PostDbLoadService { */ protected validateQuestAssortUnlocksExist(): void; protected setAllDbItemsAsSellableOnFlea(): void; + protected addMissingTraderBuyRestrictionMaxValue(): void; + protected applyFleaPriceOverrides(): void; } diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/services/ProfileFixerService.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/services/ProfileFixerService.d.ts index 4a3a5ff..cbbe1d0 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/services/ProfileFixerService.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/services/ProfileFixerService.d.ts @@ -47,6 +47,12 @@ export declare class ProfileFixerService { * @param pmcProfile profile to check and fix */ checkForAndFixPmcProfileIssues(pmcProfile: IPmcData): void; + /** + * Resolve any dialogue attachments that were accidentally created using the player's equipment ID as + * the stash root object ID + * @param fullProfile + */ + checkForAndFixDialogueAttachments(fullProfile: ISptProfile): void; /** * Find issues in the scav profile data that may cause issues * @param scavProfile profile to check and fix diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/services/SeasonalEventService.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/services/SeasonalEventService.d.ts index 446cccc..26b74ef 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/services/SeasonalEventService.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/services/SeasonalEventService.d.ts @@ -88,6 +88,12 @@ export declare class SeasonalEventService { * @returns bots with equipment changes */ protected getEventBotGear(eventType: SeasonalEventType): Record>>; + /** + * Get a dictionary of loot changes to apply to bots for a specific event e.g. Christmas/Halloween + * @param eventName Name of event to get gear changes for + * @returns bots with loot changes + */ + protected getEventBotLoot(eventType: SeasonalEventType): Record>>; /** * Get the dates each seasonal event starts and ends at * @returns Record with event name + start/end date @@ -108,7 +114,7 @@ export declare class SeasonalEventService { /** * Store active events inside class array property `currentlyActiveEvents` + set class properties: christmasEventActive/halloweenEventActive */ - protected cacheActiveEvents(): void; + cacheActiveEvents(): void; /** * Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER * @returns Season enum value @@ -171,6 +177,11 @@ export declare class SeasonalEventService { * @param eventName Name of the event to read equipment in from config */ protected addEventGearToBots(eventType: SeasonalEventType): void; + /** + * Read in data from seasonalEvents.json and add found loot items to bots + * @param eventName Name of the event to read loot in from config + */ + protected addEventLootToBots(eventType: SeasonalEventType): void; /** * Add pumpkin loot boxes to scavs */ diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/utils/App.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/utils/App.d.ts index db46d2c..0e4850e 100644 --- a/TypeScript/13.1AddTraderWithAssortJSON/types/utils/App.d.ts +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/utils/App.d.ts @@ -4,10 +4,10 @@ import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { HttpServer } from "@spt/servers/HttpServer"; -import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { EncodingUtil } from "@spt/utils/EncodingUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; +import { DatabaseService } from "@spt/services/DatabaseService"; export declare class App { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/13.1AddTraderWithAssortJSON/types/utils/ProgressWriter.d.ts b/TypeScript/13.1AddTraderWithAssortJSON/types/utils/ProgressWriter.d.ts new file mode 100644 index 0000000..2641d3a --- /dev/null +++ b/TypeScript/13.1AddTraderWithAssortJSON/types/utils/ProgressWriter.d.ts @@ -0,0 +1,13 @@ +export declare class ProgressWriter { + private count; + private total?; + private done; + private barFillChar; + private barEmptyChar; + private maxBarLength; + constructor(total: number, maxBarLength?: number, barFillChar?: string, barEmptyChar?: string); + /** + * Increment the progress counter and update the progress bar display. + */ + increment(): void; +} diff --git a/TypeScript/13AddTrader/types/generators/BotGenerator.d.ts b/TypeScript/13AddTrader/types/generators/BotGenerator.d.ts index 2c7bba6..a2291f4 100644 --- a/TypeScript/13AddTrader/types/generators/BotGenerator.d.ts +++ b/TypeScript/13AddTrader/types/generators/BotGenerator.d.ts @@ -5,6 +5,7 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { MinMax } from "@spt/models/common/MinMax"; +import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase"; import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; @@ -47,9 +48,10 @@ export declare class BotGenerator { * @param role e.g. assault / pmcbot * @param difficulty easy/normal/hard/impossible * @param botTemplate base bot template to use (e.g. assault/pmcbot) - * @returns + * profile PMC profile of player generating pscav + * @returns IBotBase */ - generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase; + generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType, profile: IPmcData): IBotBase; /** * Create 1 bot of the type/side/difficulty defined in botGenerationDetails * @param sessionId Session id @@ -79,6 +81,12 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; + /** + * Should this bot have a name like "name (Pmc Name)" and be alterd by client patch to be hostile to player + * @param botRole Role bot has + * @returns True if name should be simulated pscav + */ + protected shouldSimulatePlayerScav(botRole: string): boolean; /** * Get exp for kill by bot difficulty * @param experience Dict of difficulties and experience diff --git a/TypeScript/13AddTrader/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/13AddTrader/types/helpers/RagfairOfferHelper.d.ts index 9dd5be3..0ff9c66 100644 --- a/TypeScript/13AddTrader/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/RagfairOfferHelper.d.ts @@ -91,6 +91,12 @@ export declare class RagfairOfferHelper { * @returns IRagfairOffer array */ getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcData: IPmcData): IRagfairOffer[]; + /** + * Get offers that have not exceeded buy limits + * @param possibleOffers offers to process + * @returns Offers + */ + protected getOffersInsideBuyRestrictionLimits(possibleOffers: IRagfairOffer[]): IRagfairOffer[]; /** * Check if offer is from trader standing the player does not have * @param offer Offer to check @@ -209,4 +215,10 @@ export declare class RagfairOfferHelper { * @returns True if in range */ protected itemQualityInRange(item: IItem, min: number, max: number): boolean; + /** + * Does this offer come from a trader + * @param offer Offer to check + * @returns True = from trader + */ + offerIsFromTrader(offer: IRagfairOffer): boolean; } diff --git a/TypeScript/13AddTrader/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/13AddTrader/types/models/eft/common/tables/IBotBase.d.ts index d3fd87e..8609573 100644 --- a/TypeScript/13AddTrader/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/common/tables/IBotBase.d.ts @@ -60,6 +60,7 @@ export interface IUnlockedInfo { export interface IInfo { EntryPoint: string; Nickname: string; + MainProfileNickname?: string; LowerNickname: string; Side: string; SquadInviteRestriction: boolean; diff --git a/TypeScript/13AddTrader/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/13AddTrader/types/models/spt/config/IInventoryConfig.d.ts index af0ec79..00ba5b1 100644 --- a/TypeScript/13AddTrader/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/config/IInventoryConfig.d.ts @@ -10,6 +10,8 @@ export interface IInventoryConfig extends IBaseConfig { customMoneyTpls: string[]; /** Multipliers for skill gain when inside menus, NOT in-game */ skillGainMultiplers: Record; + /** Container Tpls that shoud be deprioritised when choosing where to take money from for payments */ + deprioritisedMoneyContainers: string[]; } export interface IRewardDetails { rewardCount: number; diff --git a/TypeScript/13AddTrader/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/13AddTrader/types/models/spt/config/IPmcConfig.d.ts index 2e68219..02c9c5b 100644 --- a/TypeScript/13AddTrader/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/config/IPmcConfig.d.ts @@ -66,7 +66,9 @@ export interface IPmcTypes { bear: string; } export interface ISlotLootSettings { + /** Item Type whitelist */ whitelist: string[]; + /** item tpl blacklist */ blacklist: string[]; } export interface IMinMaxLootValue extends MinMax { diff --git a/TypeScript/13AddTrader/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/13AddTrader/types/models/spt/config/IRagfairConfig.d.ts index 36122c5..805a6b2 100644 --- a/TypeScript/13AddTrader/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/config/IRagfairConfig.d.ts @@ -75,6 +75,8 @@ export interface IDynamic { blacklist: IRagfairBlacklist; /** Dict of price limits keyed by item type */ unreasonableModPrices: Record; + /** Custom rouble prices for items to override values from prices.json */ + itemPriceOverrideRouble: Record; } export interface IPriceRanges { default: MinMax; diff --git a/TypeScript/13AddTrader/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/13AddTrader/types/models/spt/config/ISeasonalEventConfig.d.ts index 5e119fa..bf93685 100644 --- a/TypeScript/13AddTrader/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -6,6 +6,8 @@ export interface ISeasonalEventConfig extends IBaseConfig { enableSeasonalEventDetection: boolean; /** event / botType / equipSlot / itemid */ eventGear: Record>>>; + /** event / bot type / equipSlot / itemid */ + eventLoot: Record>>>; events: ISeasonalEvent[]; eventBotMapping: Record; eventBossSpawns: Record>; diff --git a/TypeScript/13AddTrader/types/services/BotNameService.d.ts b/TypeScript/13AddTrader/types/services/BotNameService.d.ts index 056bd0f..349964d 100644 --- a/TypeScript/13AddTrader/types/services/BotNameService.d.ts +++ b/TypeScript/13AddTrader/types/services/BotNameService.d.ts @@ -1,5 +1,6 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; @@ -38,10 +39,13 @@ export declare class BotNameService { */ generateUniqueBotNickname(botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails, botRole: string, uniqueRoles?: string[]): string; /** - * Should this bot have a name like "name (Pmc Name)" - * @param botRole Role bot has - * @returns True if name should be simulated pscav + * Add random PMC name to bots MainProfileNickname property + * @param bot Bot to update */ - protected shouldSimulatePlayerScavName(botRole: string): boolean; - protected addPlayerScavNameSimulationSuffix(nickname: string): string; + addRandomPmcNameToBotMainProfileNicknameProperty(bot: IBotBase): void; + /** + * Choose a random PMC name from bear or usec bot jsons + * @returns PMC name as string + */ + protected getRandomPMCName(): string; } diff --git a/TypeScript/13AddTrader/types/services/DatabaseService.d.ts b/TypeScript/13AddTrader/types/services/DatabaseService.d.ts index 934617a..73575b1 100644 --- a/TypeScript/13AddTrader/types/services/DatabaseService.d.ts +++ b/TypeScript/13AddTrader/types/services/DatabaseService.d.ts @@ -85,7 +85,7 @@ export declare class DatabaseService { */ getCustomization(): Record; /** - * @returns assets/database/templates/items.json + * @returns assets/database/templates/handbook.json */ getHandbook(): IHandbookBase; /** @@ -101,7 +101,7 @@ export declare class DatabaseService { */ getProfiles(): IProfileTemplates; /** - * @returns assets/database/templates/items.json + * @returns assets/database/templates/quests.json */ getQuests(): Record; /** diff --git a/TypeScript/13AddTrader/types/services/InsuranceService.d.ts b/TypeScript/13AddTrader/types/services/InsuranceService.d.ts index ac9cff5..e52fa59 100644 --- a/TypeScript/13AddTrader/types/services/InsuranceService.d.ts +++ b/TypeScript/13AddTrader/types/services/InsuranceService.d.ts @@ -62,14 +62,6 @@ export declare class InsuranceService { * @returns Timestamp to return items to player in seconds */ protected getInsuranceReturnTimestamp(pmcData: IPmcData, trader: ITraderBase): number; - /** - * Take the insurance item packages within a profile session and ensure that each of the items in that package are - * not orphaned from their parent ID. - * - * @param sessionID The session ID to update insurance equipment packages in. - * @returns void - */ - protected adoptOrphanedInsEquipment(sessionID: string): void; protected getMaxInsuranceStorageTime(traderBase: ITraderBase): number; /** * Store lost gear post-raid inside profile, ready for later code to pick it up and mail it @@ -127,10 +119,4 @@ export declare class InsuranceService { * @returns price in roubles */ getRoublePriceToInsureItemWithTrader(pmcData: IPmcData, inventoryItem: IItem, traderId: string): number; - /** - * Returns the ID that should be used for a root-level Item's parentId property value within in the context of insurance. - * @param sessionID Players id - * @returns The root item Id. - */ - getRootItemParentID(sessionID: string): string; } diff --git a/TypeScript/13AddTrader/types/services/PaymentService.d.ts b/TypeScript/13AddTrader/types/services/PaymentService.d.ts index f6ec79d..78fdfb6 100644 --- a/TypeScript/13AddTrader/types/services/PaymentService.d.ts +++ b/TypeScript/13AddTrader/types/services/PaymentService.d.ts @@ -8,7 +8,9 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IProcessBuyTradeRequestData } from "@spt/models/eft/trade/IProcessBuyTradeRequestData"; import { IProcessSellTradeRequestData } from "@spt/models/eft/trade/IProcessSellTradeRequestData"; +import { IInventoryConfig } from "@spt/models/spt/config/IInventoryConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { HashUtil } from "@spt/utils/HashUtil"; @@ -24,7 +26,9 @@ export declare class PaymentService { protected inventoryHelper: InventoryHelper; protected localisationService: LocalisationService; protected paymentHelper: PaymentHelper; - constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper); + protected configServer: ConfigServer; + protected inventoryConfig: IInventoryConfig; + constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper, configServer: ConfigServer); /** * Take money and insert items into return to server request * @param pmcData Pmc profile diff --git a/TypeScript/13AddTrader/types/services/PostDbLoadService.d.ts b/TypeScript/13AddTrader/types/services/PostDbLoadService.d.ts index c9e4bbe..cc51311 100644 --- a/TypeScript/13AddTrader/types/services/PostDbLoadService.d.ts +++ b/TypeScript/13AddTrader/types/services/PostDbLoadService.d.ts @@ -74,4 +74,6 @@ export declare class PostDbLoadService { */ protected validateQuestAssortUnlocksExist(): void; protected setAllDbItemsAsSellableOnFlea(): void; + protected addMissingTraderBuyRestrictionMaxValue(): void; + protected applyFleaPriceOverrides(): void; } diff --git a/TypeScript/13AddTrader/types/services/ProfileFixerService.d.ts b/TypeScript/13AddTrader/types/services/ProfileFixerService.d.ts index 4a3a5ff..cbbe1d0 100644 --- a/TypeScript/13AddTrader/types/services/ProfileFixerService.d.ts +++ b/TypeScript/13AddTrader/types/services/ProfileFixerService.d.ts @@ -47,6 +47,12 @@ export declare class ProfileFixerService { * @param pmcProfile profile to check and fix */ checkForAndFixPmcProfileIssues(pmcProfile: IPmcData): void; + /** + * Resolve any dialogue attachments that were accidentally created using the player's equipment ID as + * the stash root object ID + * @param fullProfile + */ + checkForAndFixDialogueAttachments(fullProfile: ISptProfile): void; /** * Find issues in the scav profile data that may cause issues * @param scavProfile profile to check and fix diff --git a/TypeScript/13AddTrader/types/services/SeasonalEventService.d.ts b/TypeScript/13AddTrader/types/services/SeasonalEventService.d.ts index 446cccc..26b74ef 100644 --- a/TypeScript/13AddTrader/types/services/SeasonalEventService.d.ts +++ b/TypeScript/13AddTrader/types/services/SeasonalEventService.d.ts @@ -88,6 +88,12 @@ export declare class SeasonalEventService { * @returns bots with equipment changes */ protected getEventBotGear(eventType: SeasonalEventType): Record>>; + /** + * Get a dictionary of loot changes to apply to bots for a specific event e.g. Christmas/Halloween + * @param eventName Name of event to get gear changes for + * @returns bots with loot changes + */ + protected getEventBotLoot(eventType: SeasonalEventType): Record>>; /** * Get the dates each seasonal event starts and ends at * @returns Record with event name + start/end date @@ -108,7 +114,7 @@ export declare class SeasonalEventService { /** * Store active events inside class array property `currentlyActiveEvents` + set class properties: christmasEventActive/halloweenEventActive */ - protected cacheActiveEvents(): void; + cacheActiveEvents(): void; /** * Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER * @returns Season enum value @@ -171,6 +177,11 @@ export declare class SeasonalEventService { * @param eventName Name of the event to read equipment in from config */ protected addEventGearToBots(eventType: SeasonalEventType): void; + /** + * Read in data from seasonalEvents.json and add found loot items to bots + * @param eventName Name of the event to read loot in from config + */ + protected addEventLootToBots(eventType: SeasonalEventType): void; /** * Add pumpkin loot boxes to scavs */ diff --git a/TypeScript/13AddTrader/types/utils/App.d.ts b/TypeScript/13AddTrader/types/utils/App.d.ts index db46d2c..0e4850e 100644 --- a/TypeScript/13AddTrader/types/utils/App.d.ts +++ b/TypeScript/13AddTrader/types/utils/App.d.ts @@ -4,10 +4,10 @@ import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { HttpServer } from "@spt/servers/HttpServer"; -import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { EncodingUtil } from "@spt/utils/EncodingUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; +import { DatabaseService } from "@spt/services/DatabaseService"; export declare class App { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/13AddTrader/types/utils/ProgressWriter.d.ts b/TypeScript/13AddTrader/types/utils/ProgressWriter.d.ts new file mode 100644 index 0000000..2641d3a --- /dev/null +++ b/TypeScript/13AddTrader/types/utils/ProgressWriter.d.ts @@ -0,0 +1,13 @@ +export declare class ProgressWriter { + private count; + private total?; + private done; + private barFillChar; + private barEmptyChar; + private maxBarLength; + constructor(total: number, maxBarLength?: number, barFillChar?: string, barEmptyChar?: string); + /** + * Increment the progress counter and update the progress bar display. + */ + increment(): void; +} diff --git a/TypeScript/14AfterDBLoadHook/types/generators/BotGenerator.d.ts b/TypeScript/14AfterDBLoadHook/types/generators/BotGenerator.d.ts index 2c7bba6..a2291f4 100644 --- a/TypeScript/14AfterDBLoadHook/types/generators/BotGenerator.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/generators/BotGenerator.d.ts @@ -5,6 +5,7 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { MinMax } from "@spt/models/common/MinMax"; +import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase"; import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; @@ -47,9 +48,10 @@ export declare class BotGenerator { * @param role e.g. assault / pmcbot * @param difficulty easy/normal/hard/impossible * @param botTemplate base bot template to use (e.g. assault/pmcbot) - * @returns + * profile PMC profile of player generating pscav + * @returns IBotBase */ - generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase; + generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType, profile: IPmcData): IBotBase; /** * Create 1 bot of the type/side/difficulty defined in botGenerationDetails * @param sessionId Session id @@ -79,6 +81,12 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; + /** + * Should this bot have a name like "name (Pmc Name)" and be alterd by client patch to be hostile to player + * @param botRole Role bot has + * @returns True if name should be simulated pscav + */ + protected shouldSimulatePlayerScav(botRole: string): boolean; /** * Get exp for kill by bot difficulty * @param experience Dict of difficulties and experience diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/RagfairOfferHelper.d.ts index 9dd5be3..0ff9c66 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/RagfairOfferHelper.d.ts @@ -91,6 +91,12 @@ export declare class RagfairOfferHelper { * @returns IRagfairOffer array */ getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcData: IPmcData): IRagfairOffer[]; + /** + * Get offers that have not exceeded buy limits + * @param possibleOffers offers to process + * @returns Offers + */ + protected getOffersInsideBuyRestrictionLimits(possibleOffers: IRagfairOffer[]): IRagfairOffer[]; /** * Check if offer is from trader standing the player does not have * @param offer Offer to check @@ -209,4 +215,10 @@ export declare class RagfairOfferHelper { * @returns True if in range */ protected itemQualityInRange(item: IItem, min: number, max: number): boolean; + /** + * Does this offer come from a trader + * @param offer Offer to check + * @returns True = from trader + */ + offerIsFromTrader(offer: IRagfairOffer): boolean; } diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/IBotBase.d.ts index d3fd87e..8609573 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/IBotBase.d.ts @@ -60,6 +60,7 @@ export interface IUnlockedInfo { export interface IInfo { EntryPoint: string; Nickname: string; + MainProfileNickname?: string; LowerNickname: string; Side: string; SquadInviteRestriction: boolean; diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IInventoryConfig.d.ts index af0ec79..00ba5b1 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IInventoryConfig.d.ts @@ -10,6 +10,8 @@ export interface IInventoryConfig extends IBaseConfig { customMoneyTpls: string[]; /** Multipliers for skill gain when inside menus, NOT in-game */ skillGainMultiplers: Record; + /** Container Tpls that shoud be deprioritised when choosing where to take money from for payments */ + deprioritisedMoneyContainers: string[]; } export interface IRewardDetails { rewardCount: number; diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IPmcConfig.d.ts index 2e68219..02c9c5b 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IPmcConfig.d.ts @@ -66,7 +66,9 @@ export interface IPmcTypes { bear: string; } export interface ISlotLootSettings { + /** Item Type whitelist */ whitelist: string[]; + /** item tpl blacklist */ blacklist: string[]; } export interface IMinMaxLootValue extends MinMax { diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IRagfairConfig.d.ts index 36122c5..805a6b2 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IRagfairConfig.d.ts @@ -75,6 +75,8 @@ export interface IDynamic { blacklist: IRagfairBlacklist; /** Dict of price limits keyed by item type */ unreasonableModPrices: Record; + /** Custom rouble prices for items to override values from prices.json */ + itemPriceOverrideRouble: Record; } export interface IPriceRanges { default: MinMax; diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/config/ISeasonalEventConfig.d.ts index 5e119fa..bf93685 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -6,6 +6,8 @@ export interface ISeasonalEventConfig extends IBaseConfig { enableSeasonalEventDetection: boolean; /** event / botType / equipSlot / itemid */ eventGear: Record>>>; + /** event / bot type / equipSlot / itemid */ + eventLoot: Record>>>; events: ISeasonalEvent[]; eventBotMapping: Record; eventBossSpawns: Record>; diff --git a/TypeScript/14AfterDBLoadHook/types/services/BotNameService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/BotNameService.d.ts index 056bd0f..349964d 100644 --- a/TypeScript/14AfterDBLoadHook/types/services/BotNameService.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/services/BotNameService.d.ts @@ -1,5 +1,6 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; @@ -38,10 +39,13 @@ export declare class BotNameService { */ generateUniqueBotNickname(botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails, botRole: string, uniqueRoles?: string[]): string; /** - * Should this bot have a name like "name (Pmc Name)" - * @param botRole Role bot has - * @returns True if name should be simulated pscav + * Add random PMC name to bots MainProfileNickname property + * @param bot Bot to update */ - protected shouldSimulatePlayerScavName(botRole: string): boolean; - protected addPlayerScavNameSimulationSuffix(nickname: string): string; + addRandomPmcNameToBotMainProfileNicknameProperty(bot: IBotBase): void; + /** + * Choose a random PMC name from bear or usec bot jsons + * @returns PMC name as string + */ + protected getRandomPMCName(): string; } diff --git a/TypeScript/14AfterDBLoadHook/types/services/DatabaseService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/DatabaseService.d.ts index 934617a..73575b1 100644 --- a/TypeScript/14AfterDBLoadHook/types/services/DatabaseService.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/services/DatabaseService.d.ts @@ -85,7 +85,7 @@ export declare class DatabaseService { */ getCustomization(): Record; /** - * @returns assets/database/templates/items.json + * @returns assets/database/templates/handbook.json */ getHandbook(): IHandbookBase; /** @@ -101,7 +101,7 @@ export declare class DatabaseService { */ getProfiles(): IProfileTemplates; /** - * @returns assets/database/templates/items.json + * @returns assets/database/templates/quests.json */ getQuests(): Record; /** diff --git a/TypeScript/14AfterDBLoadHook/types/services/InsuranceService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/InsuranceService.d.ts index ac9cff5..e52fa59 100644 --- a/TypeScript/14AfterDBLoadHook/types/services/InsuranceService.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/services/InsuranceService.d.ts @@ -62,14 +62,6 @@ export declare class InsuranceService { * @returns Timestamp to return items to player in seconds */ protected getInsuranceReturnTimestamp(pmcData: IPmcData, trader: ITraderBase): number; - /** - * Take the insurance item packages within a profile session and ensure that each of the items in that package are - * not orphaned from their parent ID. - * - * @param sessionID The session ID to update insurance equipment packages in. - * @returns void - */ - protected adoptOrphanedInsEquipment(sessionID: string): void; protected getMaxInsuranceStorageTime(traderBase: ITraderBase): number; /** * Store lost gear post-raid inside profile, ready for later code to pick it up and mail it @@ -127,10 +119,4 @@ export declare class InsuranceService { * @returns price in roubles */ getRoublePriceToInsureItemWithTrader(pmcData: IPmcData, inventoryItem: IItem, traderId: string): number; - /** - * Returns the ID that should be used for a root-level Item's parentId property value within in the context of insurance. - * @param sessionID Players id - * @returns The root item Id. - */ - getRootItemParentID(sessionID: string): string; } diff --git a/TypeScript/14AfterDBLoadHook/types/services/PaymentService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/PaymentService.d.ts index f6ec79d..78fdfb6 100644 --- a/TypeScript/14AfterDBLoadHook/types/services/PaymentService.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/services/PaymentService.d.ts @@ -8,7 +8,9 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IProcessBuyTradeRequestData } from "@spt/models/eft/trade/IProcessBuyTradeRequestData"; import { IProcessSellTradeRequestData } from "@spt/models/eft/trade/IProcessSellTradeRequestData"; +import { IInventoryConfig } from "@spt/models/spt/config/IInventoryConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { HashUtil } from "@spt/utils/HashUtil"; @@ -24,7 +26,9 @@ export declare class PaymentService { protected inventoryHelper: InventoryHelper; protected localisationService: LocalisationService; protected paymentHelper: PaymentHelper; - constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper); + protected configServer: ConfigServer; + protected inventoryConfig: IInventoryConfig; + constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper, configServer: ConfigServer); /** * Take money and insert items into return to server request * @param pmcData Pmc profile diff --git a/TypeScript/14AfterDBLoadHook/types/services/PostDbLoadService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/PostDbLoadService.d.ts index c9e4bbe..cc51311 100644 --- a/TypeScript/14AfterDBLoadHook/types/services/PostDbLoadService.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/services/PostDbLoadService.d.ts @@ -74,4 +74,6 @@ export declare class PostDbLoadService { */ protected validateQuestAssortUnlocksExist(): void; protected setAllDbItemsAsSellableOnFlea(): void; + protected addMissingTraderBuyRestrictionMaxValue(): void; + protected applyFleaPriceOverrides(): void; } diff --git a/TypeScript/14AfterDBLoadHook/types/services/ProfileFixerService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/ProfileFixerService.d.ts index 4a3a5ff..cbbe1d0 100644 --- a/TypeScript/14AfterDBLoadHook/types/services/ProfileFixerService.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/services/ProfileFixerService.d.ts @@ -47,6 +47,12 @@ export declare class ProfileFixerService { * @param pmcProfile profile to check and fix */ checkForAndFixPmcProfileIssues(pmcProfile: IPmcData): void; + /** + * Resolve any dialogue attachments that were accidentally created using the player's equipment ID as + * the stash root object ID + * @param fullProfile + */ + checkForAndFixDialogueAttachments(fullProfile: ISptProfile): void; /** * Find issues in the scav profile data that may cause issues * @param scavProfile profile to check and fix diff --git a/TypeScript/14AfterDBLoadHook/types/services/SeasonalEventService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/SeasonalEventService.d.ts index 446cccc..26b74ef 100644 --- a/TypeScript/14AfterDBLoadHook/types/services/SeasonalEventService.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/services/SeasonalEventService.d.ts @@ -88,6 +88,12 @@ export declare class SeasonalEventService { * @returns bots with equipment changes */ protected getEventBotGear(eventType: SeasonalEventType): Record>>; + /** + * Get a dictionary of loot changes to apply to bots for a specific event e.g. Christmas/Halloween + * @param eventName Name of event to get gear changes for + * @returns bots with loot changes + */ + protected getEventBotLoot(eventType: SeasonalEventType): Record>>; /** * Get the dates each seasonal event starts and ends at * @returns Record with event name + start/end date @@ -108,7 +114,7 @@ export declare class SeasonalEventService { /** * Store active events inside class array property `currentlyActiveEvents` + set class properties: christmasEventActive/halloweenEventActive */ - protected cacheActiveEvents(): void; + cacheActiveEvents(): void; /** * Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER * @returns Season enum value @@ -171,6 +177,11 @@ export declare class SeasonalEventService { * @param eventName Name of the event to read equipment in from config */ protected addEventGearToBots(eventType: SeasonalEventType): void; + /** + * Read in data from seasonalEvents.json and add found loot items to bots + * @param eventName Name of the event to read loot in from config + */ + protected addEventLootToBots(eventType: SeasonalEventType): void; /** * Add pumpkin loot boxes to scavs */ diff --git a/TypeScript/14AfterDBLoadHook/types/utils/App.d.ts b/TypeScript/14AfterDBLoadHook/types/utils/App.d.ts index db46d2c..0e4850e 100644 --- a/TypeScript/14AfterDBLoadHook/types/utils/App.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/utils/App.d.ts @@ -4,10 +4,10 @@ import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { HttpServer } from "@spt/servers/HttpServer"; -import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { EncodingUtil } from "@spt/utils/EncodingUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; +import { DatabaseService } from "@spt/services/DatabaseService"; export declare class App { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/14AfterDBLoadHook/types/utils/ProgressWriter.d.ts b/TypeScript/14AfterDBLoadHook/types/utils/ProgressWriter.d.ts new file mode 100644 index 0000000..2641d3a --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/utils/ProgressWriter.d.ts @@ -0,0 +1,13 @@ +export declare class ProgressWriter { + private count; + private total?; + private done; + private barFillChar; + private barEmptyChar; + private maxBarLength; + constructor(total: number, maxBarLength?: number, barFillChar?: string, barEmptyChar?: string); + /** + * Increment the progress counter and update the progress bar display. + */ + increment(): void; +} diff --git a/TypeScript/15HttpListenerExample/types/generators/BotGenerator.d.ts b/TypeScript/15HttpListenerExample/types/generators/BotGenerator.d.ts index 2c7bba6..a2291f4 100644 --- a/TypeScript/15HttpListenerExample/types/generators/BotGenerator.d.ts +++ b/TypeScript/15HttpListenerExample/types/generators/BotGenerator.d.ts @@ -5,6 +5,7 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { MinMax } from "@spt/models/common/MinMax"; +import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase"; import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; @@ -47,9 +48,10 @@ export declare class BotGenerator { * @param role e.g. assault / pmcbot * @param difficulty easy/normal/hard/impossible * @param botTemplate base bot template to use (e.g. assault/pmcbot) - * @returns + * profile PMC profile of player generating pscav + * @returns IBotBase */ - generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase; + generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType, profile: IPmcData): IBotBase; /** * Create 1 bot of the type/side/difficulty defined in botGenerationDetails * @param sessionId Session id @@ -79,6 +81,12 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; + /** + * Should this bot have a name like "name (Pmc Name)" and be alterd by client patch to be hostile to player + * @param botRole Role bot has + * @returns True if name should be simulated pscav + */ + protected shouldSimulatePlayerScav(botRole: string): boolean; /** * Get exp for kill by bot difficulty * @param experience Dict of difficulties and experience diff --git a/TypeScript/15HttpListenerExample/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/RagfairOfferHelper.d.ts index 9dd5be3..0ff9c66 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/RagfairOfferHelper.d.ts @@ -91,6 +91,12 @@ export declare class RagfairOfferHelper { * @returns IRagfairOffer array */ getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcData: IPmcData): IRagfairOffer[]; + /** + * Get offers that have not exceeded buy limits + * @param possibleOffers offers to process + * @returns Offers + */ + protected getOffersInsideBuyRestrictionLimits(possibleOffers: IRagfairOffer[]): IRagfairOffer[]; /** * Check if offer is from trader standing the player does not have * @param offer Offer to check @@ -209,4 +215,10 @@ export declare class RagfairOfferHelper { * @returns True if in range */ protected itemQualityInRange(item: IItem, min: number, max: number): boolean; + /** + * Does this offer come from a trader + * @param offer Offer to check + * @returns True = from trader + */ + offerIsFromTrader(offer: IRagfairOffer): boolean; } diff --git a/TypeScript/15HttpListenerExample/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/common/tables/IBotBase.d.ts index d3fd87e..8609573 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/common/tables/IBotBase.d.ts @@ -60,6 +60,7 @@ export interface IUnlockedInfo { export interface IInfo { EntryPoint: string; Nickname: string; + MainProfileNickname?: string; LowerNickname: string; Side: string; SquadInviteRestriction: boolean; diff --git a/TypeScript/15HttpListenerExample/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/config/IInventoryConfig.d.ts index af0ec79..00ba5b1 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/config/IInventoryConfig.d.ts @@ -10,6 +10,8 @@ export interface IInventoryConfig extends IBaseConfig { customMoneyTpls: string[]; /** Multipliers for skill gain when inside menus, NOT in-game */ skillGainMultiplers: Record; + /** Container Tpls that shoud be deprioritised when choosing where to take money from for payments */ + deprioritisedMoneyContainers: string[]; } export interface IRewardDetails { rewardCount: number; diff --git a/TypeScript/15HttpListenerExample/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/config/IPmcConfig.d.ts index 2e68219..02c9c5b 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/config/IPmcConfig.d.ts @@ -66,7 +66,9 @@ export interface IPmcTypes { bear: string; } export interface ISlotLootSettings { + /** Item Type whitelist */ whitelist: string[]; + /** item tpl blacklist */ blacklist: string[]; } export interface IMinMaxLootValue extends MinMax { diff --git a/TypeScript/15HttpListenerExample/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/config/IRagfairConfig.d.ts index 36122c5..805a6b2 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/config/IRagfairConfig.d.ts @@ -75,6 +75,8 @@ export interface IDynamic { blacklist: IRagfairBlacklist; /** Dict of price limits keyed by item type */ unreasonableModPrices: Record; + /** Custom rouble prices for items to override values from prices.json */ + itemPriceOverrideRouble: Record; } export interface IPriceRanges { default: MinMax; diff --git a/TypeScript/15HttpListenerExample/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/config/ISeasonalEventConfig.d.ts index 5e119fa..bf93685 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -6,6 +6,8 @@ export interface ISeasonalEventConfig extends IBaseConfig { enableSeasonalEventDetection: boolean; /** event / botType / equipSlot / itemid */ eventGear: Record>>>; + /** event / bot type / equipSlot / itemid */ + eventLoot: Record>>>; events: ISeasonalEvent[]; eventBotMapping: Record; eventBossSpawns: Record>; diff --git a/TypeScript/15HttpListenerExample/types/services/BotNameService.d.ts b/TypeScript/15HttpListenerExample/types/services/BotNameService.d.ts index 056bd0f..349964d 100644 --- a/TypeScript/15HttpListenerExample/types/services/BotNameService.d.ts +++ b/TypeScript/15HttpListenerExample/types/services/BotNameService.d.ts @@ -1,5 +1,6 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; @@ -38,10 +39,13 @@ export declare class BotNameService { */ generateUniqueBotNickname(botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails, botRole: string, uniqueRoles?: string[]): string; /** - * Should this bot have a name like "name (Pmc Name)" - * @param botRole Role bot has - * @returns True if name should be simulated pscav + * Add random PMC name to bots MainProfileNickname property + * @param bot Bot to update */ - protected shouldSimulatePlayerScavName(botRole: string): boolean; - protected addPlayerScavNameSimulationSuffix(nickname: string): string; + addRandomPmcNameToBotMainProfileNicknameProperty(bot: IBotBase): void; + /** + * Choose a random PMC name from bear or usec bot jsons + * @returns PMC name as string + */ + protected getRandomPMCName(): string; } diff --git a/TypeScript/15HttpListenerExample/types/services/DatabaseService.d.ts b/TypeScript/15HttpListenerExample/types/services/DatabaseService.d.ts index 934617a..73575b1 100644 --- a/TypeScript/15HttpListenerExample/types/services/DatabaseService.d.ts +++ b/TypeScript/15HttpListenerExample/types/services/DatabaseService.d.ts @@ -85,7 +85,7 @@ export declare class DatabaseService { */ getCustomization(): Record; /** - * @returns assets/database/templates/items.json + * @returns assets/database/templates/handbook.json */ getHandbook(): IHandbookBase; /** @@ -101,7 +101,7 @@ export declare class DatabaseService { */ getProfiles(): IProfileTemplates; /** - * @returns assets/database/templates/items.json + * @returns assets/database/templates/quests.json */ getQuests(): Record; /** diff --git a/TypeScript/15HttpListenerExample/types/services/InsuranceService.d.ts b/TypeScript/15HttpListenerExample/types/services/InsuranceService.d.ts index ac9cff5..e52fa59 100644 --- a/TypeScript/15HttpListenerExample/types/services/InsuranceService.d.ts +++ b/TypeScript/15HttpListenerExample/types/services/InsuranceService.d.ts @@ -62,14 +62,6 @@ export declare class InsuranceService { * @returns Timestamp to return items to player in seconds */ protected getInsuranceReturnTimestamp(pmcData: IPmcData, trader: ITraderBase): number; - /** - * Take the insurance item packages within a profile session and ensure that each of the items in that package are - * not orphaned from their parent ID. - * - * @param sessionID The session ID to update insurance equipment packages in. - * @returns void - */ - protected adoptOrphanedInsEquipment(sessionID: string): void; protected getMaxInsuranceStorageTime(traderBase: ITraderBase): number; /** * Store lost gear post-raid inside profile, ready for later code to pick it up and mail it @@ -127,10 +119,4 @@ export declare class InsuranceService { * @returns price in roubles */ getRoublePriceToInsureItemWithTrader(pmcData: IPmcData, inventoryItem: IItem, traderId: string): number; - /** - * Returns the ID that should be used for a root-level Item's parentId property value within in the context of insurance. - * @param sessionID Players id - * @returns The root item Id. - */ - getRootItemParentID(sessionID: string): string; } diff --git a/TypeScript/15HttpListenerExample/types/services/PaymentService.d.ts b/TypeScript/15HttpListenerExample/types/services/PaymentService.d.ts index f6ec79d..78fdfb6 100644 --- a/TypeScript/15HttpListenerExample/types/services/PaymentService.d.ts +++ b/TypeScript/15HttpListenerExample/types/services/PaymentService.d.ts @@ -8,7 +8,9 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IProcessBuyTradeRequestData } from "@spt/models/eft/trade/IProcessBuyTradeRequestData"; import { IProcessSellTradeRequestData } from "@spt/models/eft/trade/IProcessSellTradeRequestData"; +import { IInventoryConfig } from "@spt/models/spt/config/IInventoryConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { HashUtil } from "@spt/utils/HashUtil"; @@ -24,7 +26,9 @@ export declare class PaymentService { protected inventoryHelper: InventoryHelper; protected localisationService: LocalisationService; protected paymentHelper: PaymentHelper; - constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper); + protected configServer: ConfigServer; + protected inventoryConfig: IInventoryConfig; + constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper, configServer: ConfigServer); /** * Take money and insert items into return to server request * @param pmcData Pmc profile diff --git a/TypeScript/15HttpListenerExample/types/services/PostDbLoadService.d.ts b/TypeScript/15HttpListenerExample/types/services/PostDbLoadService.d.ts index c9e4bbe..cc51311 100644 --- a/TypeScript/15HttpListenerExample/types/services/PostDbLoadService.d.ts +++ b/TypeScript/15HttpListenerExample/types/services/PostDbLoadService.d.ts @@ -74,4 +74,6 @@ export declare class PostDbLoadService { */ protected validateQuestAssortUnlocksExist(): void; protected setAllDbItemsAsSellableOnFlea(): void; + protected addMissingTraderBuyRestrictionMaxValue(): void; + protected applyFleaPriceOverrides(): void; } diff --git a/TypeScript/15HttpListenerExample/types/services/ProfileFixerService.d.ts b/TypeScript/15HttpListenerExample/types/services/ProfileFixerService.d.ts index 4a3a5ff..cbbe1d0 100644 --- a/TypeScript/15HttpListenerExample/types/services/ProfileFixerService.d.ts +++ b/TypeScript/15HttpListenerExample/types/services/ProfileFixerService.d.ts @@ -47,6 +47,12 @@ export declare class ProfileFixerService { * @param pmcProfile profile to check and fix */ checkForAndFixPmcProfileIssues(pmcProfile: IPmcData): void; + /** + * Resolve any dialogue attachments that were accidentally created using the player's equipment ID as + * the stash root object ID + * @param fullProfile + */ + checkForAndFixDialogueAttachments(fullProfile: ISptProfile): void; /** * Find issues in the scav profile data that may cause issues * @param scavProfile profile to check and fix diff --git a/TypeScript/15HttpListenerExample/types/services/SeasonalEventService.d.ts b/TypeScript/15HttpListenerExample/types/services/SeasonalEventService.d.ts index 446cccc..26b74ef 100644 --- a/TypeScript/15HttpListenerExample/types/services/SeasonalEventService.d.ts +++ b/TypeScript/15HttpListenerExample/types/services/SeasonalEventService.d.ts @@ -88,6 +88,12 @@ export declare class SeasonalEventService { * @returns bots with equipment changes */ protected getEventBotGear(eventType: SeasonalEventType): Record>>; + /** + * Get a dictionary of loot changes to apply to bots for a specific event e.g. Christmas/Halloween + * @param eventName Name of event to get gear changes for + * @returns bots with loot changes + */ + protected getEventBotLoot(eventType: SeasonalEventType): Record>>; /** * Get the dates each seasonal event starts and ends at * @returns Record with event name + start/end date @@ -108,7 +114,7 @@ export declare class SeasonalEventService { /** * Store active events inside class array property `currentlyActiveEvents` + set class properties: christmasEventActive/halloweenEventActive */ - protected cacheActiveEvents(): void; + cacheActiveEvents(): void; /** * Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER * @returns Season enum value @@ -171,6 +177,11 @@ export declare class SeasonalEventService { * @param eventName Name of the event to read equipment in from config */ protected addEventGearToBots(eventType: SeasonalEventType): void; + /** + * Read in data from seasonalEvents.json and add found loot items to bots + * @param eventName Name of the event to read loot in from config + */ + protected addEventLootToBots(eventType: SeasonalEventType): void; /** * Add pumpkin loot boxes to scavs */ diff --git a/TypeScript/15HttpListenerExample/types/utils/App.d.ts b/TypeScript/15HttpListenerExample/types/utils/App.d.ts index db46d2c..0e4850e 100644 --- a/TypeScript/15HttpListenerExample/types/utils/App.d.ts +++ b/TypeScript/15HttpListenerExample/types/utils/App.d.ts @@ -4,10 +4,10 @@ import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { HttpServer } from "@spt/servers/HttpServer"; -import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { EncodingUtil } from "@spt/utils/EncodingUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; +import { DatabaseService } from "@spt/services/DatabaseService"; export declare class App { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/15HttpListenerExample/types/utils/ProgressWriter.d.ts b/TypeScript/15HttpListenerExample/types/utils/ProgressWriter.d.ts new file mode 100644 index 0000000..2641d3a --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/utils/ProgressWriter.d.ts @@ -0,0 +1,13 @@ +export declare class ProgressWriter { + private count; + private total?; + private done; + private barFillChar; + private barEmptyChar; + private maxBarLength; + constructor(total: number, maxBarLength?: number, barFillChar?: string, barEmptyChar?: string); + /** + * Increment the progress counter and update the progress bar display. + */ + increment(): void; +} diff --git a/TypeScript/16ImporterUtil/types/generators/BotGenerator.d.ts b/TypeScript/16ImporterUtil/types/generators/BotGenerator.d.ts index 2c7bba6..a2291f4 100644 --- a/TypeScript/16ImporterUtil/types/generators/BotGenerator.d.ts +++ b/TypeScript/16ImporterUtil/types/generators/BotGenerator.d.ts @@ -5,6 +5,7 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { MinMax } from "@spt/models/common/MinMax"; +import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase"; import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; @@ -47,9 +48,10 @@ export declare class BotGenerator { * @param role e.g. assault / pmcbot * @param difficulty easy/normal/hard/impossible * @param botTemplate base bot template to use (e.g. assault/pmcbot) - * @returns + * profile PMC profile of player generating pscav + * @returns IBotBase */ - generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase; + generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType, profile: IPmcData): IBotBase; /** * Create 1 bot of the type/side/difficulty defined in botGenerationDetails * @param sessionId Session id @@ -79,6 +81,12 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; + /** + * Should this bot have a name like "name (Pmc Name)" and be alterd by client patch to be hostile to player + * @param botRole Role bot has + * @returns True if name should be simulated pscav + */ + protected shouldSimulatePlayerScav(botRole: string): boolean; /** * Get exp for kill by bot difficulty * @param experience Dict of difficulties and experience diff --git a/TypeScript/16ImporterUtil/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/RagfairOfferHelper.d.ts index 9dd5be3..0ff9c66 100644 --- a/TypeScript/16ImporterUtil/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/RagfairOfferHelper.d.ts @@ -91,6 +91,12 @@ export declare class RagfairOfferHelper { * @returns IRagfairOffer array */ getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcData: IPmcData): IRagfairOffer[]; + /** + * Get offers that have not exceeded buy limits + * @param possibleOffers offers to process + * @returns Offers + */ + protected getOffersInsideBuyRestrictionLimits(possibleOffers: IRagfairOffer[]): IRagfairOffer[]; /** * Check if offer is from trader standing the player does not have * @param offer Offer to check @@ -209,4 +215,10 @@ export declare class RagfairOfferHelper { * @returns True if in range */ protected itemQualityInRange(item: IItem, min: number, max: number): boolean; + /** + * Does this offer come from a trader + * @param offer Offer to check + * @returns True = from trader + */ + offerIsFromTrader(offer: IRagfairOffer): boolean; } diff --git a/TypeScript/16ImporterUtil/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/16ImporterUtil/types/models/eft/common/tables/IBotBase.d.ts index d3fd87e..8609573 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/common/tables/IBotBase.d.ts @@ -60,6 +60,7 @@ export interface IUnlockedInfo { export interface IInfo { EntryPoint: string; Nickname: string; + MainProfileNickname?: string; LowerNickname: string; Side: string; SquadInviteRestriction: boolean; diff --git a/TypeScript/16ImporterUtil/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/16ImporterUtil/types/models/spt/config/IInventoryConfig.d.ts index af0ec79..00ba5b1 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/config/IInventoryConfig.d.ts @@ -10,6 +10,8 @@ export interface IInventoryConfig extends IBaseConfig { customMoneyTpls: string[]; /** Multipliers for skill gain when inside menus, NOT in-game */ skillGainMultiplers: Record; + /** Container Tpls that shoud be deprioritised when choosing where to take money from for payments */ + deprioritisedMoneyContainers: string[]; } export interface IRewardDetails { rewardCount: number; diff --git a/TypeScript/16ImporterUtil/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/16ImporterUtil/types/models/spt/config/IPmcConfig.d.ts index 2e68219..02c9c5b 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/config/IPmcConfig.d.ts @@ -66,7 +66,9 @@ export interface IPmcTypes { bear: string; } export interface ISlotLootSettings { + /** Item Type whitelist */ whitelist: string[]; + /** item tpl blacklist */ blacklist: string[]; } export interface IMinMaxLootValue extends MinMax { diff --git a/TypeScript/16ImporterUtil/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/16ImporterUtil/types/models/spt/config/IRagfairConfig.d.ts index 36122c5..805a6b2 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/config/IRagfairConfig.d.ts @@ -75,6 +75,8 @@ export interface IDynamic { blacklist: IRagfairBlacklist; /** Dict of price limits keyed by item type */ unreasonableModPrices: Record; + /** Custom rouble prices for items to override values from prices.json */ + itemPriceOverrideRouble: Record; } export interface IPriceRanges { default: MinMax; diff --git a/TypeScript/16ImporterUtil/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/16ImporterUtil/types/models/spt/config/ISeasonalEventConfig.d.ts index 5e119fa..bf93685 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -6,6 +6,8 @@ export interface ISeasonalEventConfig extends IBaseConfig { enableSeasonalEventDetection: boolean; /** event / botType / equipSlot / itemid */ eventGear: Record>>>; + /** event / bot type / equipSlot / itemid */ + eventLoot: Record>>>; events: ISeasonalEvent[]; eventBotMapping: Record; eventBossSpawns: Record>; diff --git a/TypeScript/16ImporterUtil/types/services/BotNameService.d.ts b/TypeScript/16ImporterUtil/types/services/BotNameService.d.ts index 056bd0f..349964d 100644 --- a/TypeScript/16ImporterUtil/types/services/BotNameService.d.ts +++ b/TypeScript/16ImporterUtil/types/services/BotNameService.d.ts @@ -1,5 +1,6 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; @@ -38,10 +39,13 @@ export declare class BotNameService { */ generateUniqueBotNickname(botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails, botRole: string, uniqueRoles?: string[]): string; /** - * Should this bot have a name like "name (Pmc Name)" - * @param botRole Role bot has - * @returns True if name should be simulated pscav + * Add random PMC name to bots MainProfileNickname property + * @param bot Bot to update */ - protected shouldSimulatePlayerScavName(botRole: string): boolean; - protected addPlayerScavNameSimulationSuffix(nickname: string): string; + addRandomPmcNameToBotMainProfileNicknameProperty(bot: IBotBase): void; + /** + * Choose a random PMC name from bear or usec bot jsons + * @returns PMC name as string + */ + protected getRandomPMCName(): string; } diff --git a/TypeScript/16ImporterUtil/types/services/DatabaseService.d.ts b/TypeScript/16ImporterUtil/types/services/DatabaseService.d.ts index 934617a..73575b1 100644 --- a/TypeScript/16ImporterUtil/types/services/DatabaseService.d.ts +++ b/TypeScript/16ImporterUtil/types/services/DatabaseService.d.ts @@ -85,7 +85,7 @@ export declare class DatabaseService { */ getCustomization(): Record; /** - * @returns assets/database/templates/items.json + * @returns assets/database/templates/handbook.json */ getHandbook(): IHandbookBase; /** @@ -101,7 +101,7 @@ export declare class DatabaseService { */ getProfiles(): IProfileTemplates; /** - * @returns assets/database/templates/items.json + * @returns assets/database/templates/quests.json */ getQuests(): Record; /** diff --git a/TypeScript/16ImporterUtil/types/services/InsuranceService.d.ts b/TypeScript/16ImporterUtil/types/services/InsuranceService.d.ts index ac9cff5..e52fa59 100644 --- a/TypeScript/16ImporterUtil/types/services/InsuranceService.d.ts +++ b/TypeScript/16ImporterUtil/types/services/InsuranceService.d.ts @@ -62,14 +62,6 @@ export declare class InsuranceService { * @returns Timestamp to return items to player in seconds */ protected getInsuranceReturnTimestamp(pmcData: IPmcData, trader: ITraderBase): number; - /** - * Take the insurance item packages within a profile session and ensure that each of the items in that package are - * not orphaned from their parent ID. - * - * @param sessionID The session ID to update insurance equipment packages in. - * @returns void - */ - protected adoptOrphanedInsEquipment(sessionID: string): void; protected getMaxInsuranceStorageTime(traderBase: ITraderBase): number; /** * Store lost gear post-raid inside profile, ready for later code to pick it up and mail it @@ -127,10 +119,4 @@ export declare class InsuranceService { * @returns price in roubles */ getRoublePriceToInsureItemWithTrader(pmcData: IPmcData, inventoryItem: IItem, traderId: string): number; - /** - * Returns the ID that should be used for a root-level Item's parentId property value within in the context of insurance. - * @param sessionID Players id - * @returns The root item Id. - */ - getRootItemParentID(sessionID: string): string; } diff --git a/TypeScript/16ImporterUtil/types/services/PaymentService.d.ts b/TypeScript/16ImporterUtil/types/services/PaymentService.d.ts index f6ec79d..78fdfb6 100644 --- a/TypeScript/16ImporterUtil/types/services/PaymentService.d.ts +++ b/TypeScript/16ImporterUtil/types/services/PaymentService.d.ts @@ -8,7 +8,9 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IProcessBuyTradeRequestData } from "@spt/models/eft/trade/IProcessBuyTradeRequestData"; import { IProcessSellTradeRequestData } from "@spt/models/eft/trade/IProcessSellTradeRequestData"; +import { IInventoryConfig } from "@spt/models/spt/config/IInventoryConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { HashUtil } from "@spt/utils/HashUtil"; @@ -24,7 +26,9 @@ export declare class PaymentService { protected inventoryHelper: InventoryHelper; protected localisationService: LocalisationService; protected paymentHelper: PaymentHelper; - constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper); + protected configServer: ConfigServer; + protected inventoryConfig: IInventoryConfig; + constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper, configServer: ConfigServer); /** * Take money and insert items into return to server request * @param pmcData Pmc profile diff --git a/TypeScript/16ImporterUtil/types/services/PostDbLoadService.d.ts b/TypeScript/16ImporterUtil/types/services/PostDbLoadService.d.ts index c9e4bbe..cc51311 100644 --- a/TypeScript/16ImporterUtil/types/services/PostDbLoadService.d.ts +++ b/TypeScript/16ImporterUtil/types/services/PostDbLoadService.d.ts @@ -74,4 +74,6 @@ export declare class PostDbLoadService { */ protected validateQuestAssortUnlocksExist(): void; protected setAllDbItemsAsSellableOnFlea(): void; + protected addMissingTraderBuyRestrictionMaxValue(): void; + protected applyFleaPriceOverrides(): void; } diff --git a/TypeScript/16ImporterUtil/types/services/ProfileFixerService.d.ts b/TypeScript/16ImporterUtil/types/services/ProfileFixerService.d.ts index 4a3a5ff..cbbe1d0 100644 --- a/TypeScript/16ImporterUtil/types/services/ProfileFixerService.d.ts +++ b/TypeScript/16ImporterUtil/types/services/ProfileFixerService.d.ts @@ -47,6 +47,12 @@ export declare class ProfileFixerService { * @param pmcProfile profile to check and fix */ checkForAndFixPmcProfileIssues(pmcProfile: IPmcData): void; + /** + * Resolve any dialogue attachments that were accidentally created using the player's equipment ID as + * the stash root object ID + * @param fullProfile + */ + checkForAndFixDialogueAttachments(fullProfile: ISptProfile): void; /** * Find issues in the scav profile data that may cause issues * @param scavProfile profile to check and fix diff --git a/TypeScript/16ImporterUtil/types/services/SeasonalEventService.d.ts b/TypeScript/16ImporterUtil/types/services/SeasonalEventService.d.ts index 446cccc..26b74ef 100644 --- a/TypeScript/16ImporterUtil/types/services/SeasonalEventService.d.ts +++ b/TypeScript/16ImporterUtil/types/services/SeasonalEventService.d.ts @@ -88,6 +88,12 @@ export declare class SeasonalEventService { * @returns bots with equipment changes */ protected getEventBotGear(eventType: SeasonalEventType): Record>>; + /** + * Get a dictionary of loot changes to apply to bots for a specific event e.g. Christmas/Halloween + * @param eventName Name of event to get gear changes for + * @returns bots with loot changes + */ + protected getEventBotLoot(eventType: SeasonalEventType): Record>>; /** * Get the dates each seasonal event starts and ends at * @returns Record with event name + start/end date @@ -108,7 +114,7 @@ export declare class SeasonalEventService { /** * Store active events inside class array property `currentlyActiveEvents` + set class properties: christmasEventActive/halloweenEventActive */ - protected cacheActiveEvents(): void; + cacheActiveEvents(): void; /** * Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER * @returns Season enum value @@ -171,6 +177,11 @@ export declare class SeasonalEventService { * @param eventName Name of the event to read equipment in from config */ protected addEventGearToBots(eventType: SeasonalEventType): void; + /** + * Read in data from seasonalEvents.json and add found loot items to bots + * @param eventName Name of the event to read loot in from config + */ + protected addEventLootToBots(eventType: SeasonalEventType): void; /** * Add pumpkin loot boxes to scavs */ diff --git a/TypeScript/16ImporterUtil/types/utils/App.d.ts b/TypeScript/16ImporterUtil/types/utils/App.d.ts index db46d2c..0e4850e 100644 --- a/TypeScript/16ImporterUtil/types/utils/App.d.ts +++ b/TypeScript/16ImporterUtil/types/utils/App.d.ts @@ -4,10 +4,10 @@ import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { HttpServer } from "@spt/servers/HttpServer"; -import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { EncodingUtil } from "@spt/utils/EncodingUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; +import { DatabaseService } from "@spt/services/DatabaseService"; export declare class App { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/16ImporterUtil/types/utils/ProgressWriter.d.ts b/TypeScript/16ImporterUtil/types/utils/ProgressWriter.d.ts new file mode 100644 index 0000000..2641d3a --- /dev/null +++ b/TypeScript/16ImporterUtil/types/utils/ProgressWriter.d.ts @@ -0,0 +1,13 @@ +export declare class ProgressWriter { + private count; + private total?; + private done; + private barFillChar; + private barEmptyChar; + private maxBarLength; + constructor(total: number, maxBarLength?: number, barFillChar?: string, barEmptyChar?: string); + /** + * Increment the progress counter and update the progress bar display. + */ + increment(): void; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/generators/BotGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/generators/BotGenerator.d.ts index 2c7bba6..a2291f4 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/generators/BotGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/generators/BotGenerator.d.ts @@ -5,6 +5,7 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { MinMax } from "@spt/models/common/MinMax"; +import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase"; import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; @@ -47,9 +48,10 @@ export declare class BotGenerator { * @param role e.g. assault / pmcbot * @param difficulty easy/normal/hard/impossible * @param botTemplate base bot template to use (e.g. assault/pmcbot) - * @returns + * profile PMC profile of player generating pscav + * @returns IBotBase */ - generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase; + generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType, profile: IPmcData): IBotBase; /** * Create 1 bot of the type/side/difficulty defined in botGenerationDetails * @param sessionId Session id @@ -79,6 +81,12 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; + /** + * Should this bot have a name like "name (Pmc Name)" and be alterd by client patch to be hostile to player + * @param botRole Role bot has + * @returns True if name should be simulated pscav + */ + protected shouldSimulatePlayerScav(botRole: string): boolean; /** * Get exp for kill by bot difficulty * @param experience Dict of difficulties and experience diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/RagfairOfferHelper.d.ts index 9dd5be3..0ff9c66 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/RagfairOfferHelper.d.ts @@ -91,6 +91,12 @@ export declare class RagfairOfferHelper { * @returns IRagfairOffer array */ getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcData: IPmcData): IRagfairOffer[]; + /** + * Get offers that have not exceeded buy limits + * @param possibleOffers offers to process + * @returns Offers + */ + protected getOffersInsideBuyRestrictionLimits(possibleOffers: IRagfairOffer[]): IRagfairOffer[]; /** * Check if offer is from trader standing the player does not have * @param offer Offer to check @@ -209,4 +215,10 @@ export declare class RagfairOfferHelper { * @returns True if in range */ protected itemQualityInRange(item: IItem, min: number, max: number): boolean; + /** + * Does this offer come from a trader + * @param offer Offer to check + * @returns True = from trader + */ + offerIsFromTrader(offer: IRagfairOffer): boolean; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/IBotBase.d.ts index d3fd87e..8609573 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/IBotBase.d.ts @@ -60,6 +60,7 @@ export interface IUnlockedInfo { export interface IInfo { EntryPoint: string; Nickname: string; + MainProfileNickname?: string; LowerNickname: string; Side: string; SquadInviteRestriction: boolean; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IInventoryConfig.d.ts index af0ec79..00ba5b1 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IInventoryConfig.d.ts @@ -10,6 +10,8 @@ export interface IInventoryConfig extends IBaseConfig { customMoneyTpls: string[]; /** Multipliers for skill gain when inside menus, NOT in-game */ skillGainMultiplers: Record; + /** Container Tpls that shoud be deprioritised when choosing where to take money from for payments */ + deprioritisedMoneyContainers: string[]; } export interface IRewardDetails { rewardCount: number; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IPmcConfig.d.ts index 2e68219..02c9c5b 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IPmcConfig.d.ts @@ -66,7 +66,9 @@ export interface IPmcTypes { bear: string; } export interface ISlotLootSettings { + /** Item Type whitelist */ whitelist: string[]; + /** item tpl blacklist */ blacklist: string[]; } export interface IMinMaxLootValue extends MinMax { diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IRagfairConfig.d.ts index 36122c5..805a6b2 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IRagfairConfig.d.ts @@ -75,6 +75,8 @@ export interface IDynamic { blacklist: IRagfairBlacklist; /** Dict of price limits keyed by item type */ unreasonableModPrices: Record; + /** Custom rouble prices for items to override values from prices.json */ + itemPriceOverrideRouble: Record; } export interface IPriceRanges { default: MinMax; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ISeasonalEventConfig.d.ts index 5e119fa..bf93685 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -6,6 +6,8 @@ export interface ISeasonalEventConfig extends IBaseConfig { enableSeasonalEventDetection: boolean; /** event / botType / equipSlot / itemid */ eventGear: Record>>>; + /** event / bot type / equipSlot / itemid */ + eventLoot: Record>>>; events: ISeasonalEvent[]; eventBotMapping: Record; eventBossSpawns: Record>; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/BotNameService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/BotNameService.d.ts index 056bd0f..349964d 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/services/BotNameService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/BotNameService.d.ts @@ -1,5 +1,6 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; @@ -38,10 +39,13 @@ export declare class BotNameService { */ generateUniqueBotNickname(botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails, botRole: string, uniqueRoles?: string[]): string; /** - * Should this bot have a name like "name (Pmc Name)" - * @param botRole Role bot has - * @returns True if name should be simulated pscav + * Add random PMC name to bots MainProfileNickname property + * @param bot Bot to update */ - protected shouldSimulatePlayerScavName(botRole: string): boolean; - protected addPlayerScavNameSimulationSuffix(nickname: string): string; + addRandomPmcNameToBotMainProfileNicknameProperty(bot: IBotBase): void; + /** + * Choose a random PMC name from bear or usec bot jsons + * @returns PMC name as string + */ + protected getRandomPMCName(): string; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/DatabaseService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/DatabaseService.d.ts index 934617a..73575b1 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/services/DatabaseService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/DatabaseService.d.ts @@ -85,7 +85,7 @@ export declare class DatabaseService { */ getCustomization(): Record; /** - * @returns assets/database/templates/items.json + * @returns assets/database/templates/handbook.json */ getHandbook(): IHandbookBase; /** @@ -101,7 +101,7 @@ export declare class DatabaseService { */ getProfiles(): IProfileTemplates; /** - * @returns assets/database/templates/items.json + * @returns assets/database/templates/quests.json */ getQuests(): Record; /** diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/InsuranceService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/InsuranceService.d.ts index ac9cff5..e52fa59 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/services/InsuranceService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/InsuranceService.d.ts @@ -62,14 +62,6 @@ export declare class InsuranceService { * @returns Timestamp to return items to player in seconds */ protected getInsuranceReturnTimestamp(pmcData: IPmcData, trader: ITraderBase): number; - /** - * Take the insurance item packages within a profile session and ensure that each of the items in that package are - * not orphaned from their parent ID. - * - * @param sessionID The session ID to update insurance equipment packages in. - * @returns void - */ - protected adoptOrphanedInsEquipment(sessionID: string): void; protected getMaxInsuranceStorageTime(traderBase: ITraderBase): number; /** * Store lost gear post-raid inside profile, ready for later code to pick it up and mail it @@ -127,10 +119,4 @@ export declare class InsuranceService { * @returns price in roubles */ getRoublePriceToInsureItemWithTrader(pmcData: IPmcData, inventoryItem: IItem, traderId: string): number; - /** - * Returns the ID that should be used for a root-level Item's parentId property value within in the context of insurance. - * @param sessionID Players id - * @returns The root item Id. - */ - getRootItemParentID(sessionID: string): string; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/PaymentService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/PaymentService.d.ts index f6ec79d..78fdfb6 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/services/PaymentService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/PaymentService.d.ts @@ -8,7 +8,9 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IProcessBuyTradeRequestData } from "@spt/models/eft/trade/IProcessBuyTradeRequestData"; import { IProcessSellTradeRequestData } from "@spt/models/eft/trade/IProcessSellTradeRequestData"; +import { IInventoryConfig } from "@spt/models/spt/config/IInventoryConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { HashUtil } from "@spt/utils/HashUtil"; @@ -24,7 +26,9 @@ export declare class PaymentService { protected inventoryHelper: InventoryHelper; protected localisationService: LocalisationService; protected paymentHelper: PaymentHelper; - constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper); + protected configServer: ConfigServer; + protected inventoryConfig: IInventoryConfig; + constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper, configServer: ConfigServer); /** * Take money and insert items into return to server request * @param pmcData Pmc profile diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/PostDbLoadService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/PostDbLoadService.d.ts index c9e4bbe..cc51311 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/services/PostDbLoadService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/PostDbLoadService.d.ts @@ -74,4 +74,6 @@ export declare class PostDbLoadService { */ protected validateQuestAssortUnlocksExist(): void; protected setAllDbItemsAsSellableOnFlea(): void; + protected addMissingTraderBuyRestrictionMaxValue(): void; + protected applyFleaPriceOverrides(): void; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/ProfileFixerService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/ProfileFixerService.d.ts index 4a3a5ff..cbbe1d0 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/services/ProfileFixerService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/ProfileFixerService.d.ts @@ -47,6 +47,12 @@ export declare class ProfileFixerService { * @param pmcProfile profile to check and fix */ checkForAndFixPmcProfileIssues(pmcProfile: IPmcData): void; + /** + * Resolve any dialogue attachments that were accidentally created using the player's equipment ID as + * the stash root object ID + * @param fullProfile + */ + checkForAndFixDialogueAttachments(fullProfile: ISptProfile): void; /** * Find issues in the scav profile data that may cause issues * @param scavProfile profile to check and fix diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/SeasonalEventService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/SeasonalEventService.d.ts index 446cccc..26b74ef 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/services/SeasonalEventService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/SeasonalEventService.d.ts @@ -88,6 +88,12 @@ export declare class SeasonalEventService { * @returns bots with equipment changes */ protected getEventBotGear(eventType: SeasonalEventType): Record>>; + /** + * Get a dictionary of loot changes to apply to bots for a specific event e.g. Christmas/Halloween + * @param eventName Name of event to get gear changes for + * @returns bots with loot changes + */ + protected getEventBotLoot(eventType: SeasonalEventType): Record>>; /** * Get the dates each seasonal event starts and ends at * @returns Record with event name + start/end date @@ -108,7 +114,7 @@ export declare class SeasonalEventService { /** * Store active events inside class array property `currentlyActiveEvents` + set class properties: christmasEventActive/halloweenEventActive */ - protected cacheActiveEvents(): void; + cacheActiveEvents(): void; /** * Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER * @returns Season enum value @@ -171,6 +177,11 @@ export declare class SeasonalEventService { * @param eventName Name of the event to read equipment in from config */ protected addEventGearToBots(eventType: SeasonalEventType): void; + /** + * Read in data from seasonalEvents.json and add found loot items to bots + * @param eventName Name of the event to read loot in from config + */ + protected addEventLootToBots(eventType: SeasonalEventType): void; /** * Add pumpkin loot boxes to scavs */ diff --git a/TypeScript/17AsyncImporterWithDependency1/types/utils/App.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/utils/App.d.ts index db46d2c..0e4850e 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/utils/App.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/utils/App.d.ts @@ -4,10 +4,10 @@ import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { HttpServer } from "@spt/servers/HttpServer"; -import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { EncodingUtil } from "@spt/utils/EncodingUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; +import { DatabaseService } from "@spt/services/DatabaseService"; export declare class App { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/utils/ProgressWriter.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/utils/ProgressWriter.d.ts new file mode 100644 index 0000000..2641d3a --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/utils/ProgressWriter.d.ts @@ -0,0 +1,13 @@ +export declare class ProgressWriter { + private count; + private total?; + private done; + private barFillChar; + private barEmptyChar; + private maxBarLength; + constructor(total: number, maxBarLength?: number, barFillChar?: string, barEmptyChar?: string); + /** + * Increment the progress counter and update the progress bar display. + */ + increment(): void; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/generators/BotGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/generators/BotGenerator.d.ts index 2c7bba6..a2291f4 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/generators/BotGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/generators/BotGenerator.d.ts @@ -5,6 +5,7 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { MinMax } from "@spt/models/common/MinMax"; +import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase"; import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; @@ -47,9 +48,10 @@ export declare class BotGenerator { * @param role e.g. assault / pmcbot * @param difficulty easy/normal/hard/impossible * @param botTemplate base bot template to use (e.g. assault/pmcbot) - * @returns + * profile PMC profile of player generating pscav + * @returns IBotBase */ - generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase; + generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType, profile: IPmcData): IBotBase; /** * Create 1 bot of the type/side/difficulty defined in botGenerationDetails * @param sessionId Session id @@ -79,6 +81,12 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; + /** + * Should this bot have a name like "name (Pmc Name)" and be alterd by client patch to be hostile to player + * @param botRole Role bot has + * @returns True if name should be simulated pscav + */ + protected shouldSimulatePlayerScav(botRole: string): boolean; /** * Get exp for kill by bot difficulty * @param experience Dict of difficulties and experience diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/RagfairOfferHelper.d.ts index 9dd5be3..0ff9c66 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/RagfairOfferHelper.d.ts @@ -91,6 +91,12 @@ export declare class RagfairOfferHelper { * @returns IRagfairOffer array */ getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcData: IPmcData): IRagfairOffer[]; + /** + * Get offers that have not exceeded buy limits + * @param possibleOffers offers to process + * @returns Offers + */ + protected getOffersInsideBuyRestrictionLimits(possibleOffers: IRagfairOffer[]): IRagfairOffer[]; /** * Check if offer is from trader standing the player does not have * @param offer Offer to check @@ -209,4 +215,10 @@ export declare class RagfairOfferHelper { * @returns True if in range */ protected itemQualityInRange(item: IItem, min: number, max: number): boolean; + /** + * Does this offer come from a trader + * @param offer Offer to check + * @returns True = from trader + */ + offerIsFromTrader(offer: IRagfairOffer): boolean; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/IBotBase.d.ts index d3fd87e..8609573 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/IBotBase.d.ts @@ -60,6 +60,7 @@ export interface IUnlockedInfo { export interface IInfo { EntryPoint: string; Nickname: string; + MainProfileNickname?: string; LowerNickname: string; Side: string; SquadInviteRestriction: boolean; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IInventoryConfig.d.ts index af0ec79..00ba5b1 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IInventoryConfig.d.ts @@ -10,6 +10,8 @@ export interface IInventoryConfig extends IBaseConfig { customMoneyTpls: string[]; /** Multipliers for skill gain when inside menus, NOT in-game */ skillGainMultiplers: Record; + /** Container Tpls that shoud be deprioritised when choosing where to take money from for payments */ + deprioritisedMoneyContainers: string[]; } export interface IRewardDetails { rewardCount: number; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IPmcConfig.d.ts index 2e68219..02c9c5b 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IPmcConfig.d.ts @@ -66,7 +66,9 @@ export interface IPmcTypes { bear: string; } export interface ISlotLootSettings { + /** Item Type whitelist */ whitelist: string[]; + /** item tpl blacklist */ blacklist: string[]; } export interface IMinMaxLootValue extends MinMax { diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IRagfairConfig.d.ts index 36122c5..805a6b2 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IRagfairConfig.d.ts @@ -75,6 +75,8 @@ export interface IDynamic { blacklist: IRagfairBlacklist; /** Dict of price limits keyed by item type */ unreasonableModPrices: Record; + /** Custom rouble prices for items to override values from prices.json */ + itemPriceOverrideRouble: Record; } export interface IPriceRanges { default: MinMax; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ISeasonalEventConfig.d.ts index 5e119fa..bf93685 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -6,6 +6,8 @@ export interface ISeasonalEventConfig extends IBaseConfig { enableSeasonalEventDetection: boolean; /** event / botType / equipSlot / itemid */ eventGear: Record>>>; + /** event / bot type / equipSlot / itemid */ + eventLoot: Record>>>; events: ISeasonalEvent[]; eventBotMapping: Record; eventBossSpawns: Record>; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/BotNameService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/BotNameService.d.ts index 056bd0f..349964d 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/services/BotNameService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/BotNameService.d.ts @@ -1,5 +1,6 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; @@ -38,10 +39,13 @@ export declare class BotNameService { */ generateUniqueBotNickname(botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails, botRole: string, uniqueRoles?: string[]): string; /** - * Should this bot have a name like "name (Pmc Name)" - * @param botRole Role bot has - * @returns True if name should be simulated pscav + * Add random PMC name to bots MainProfileNickname property + * @param bot Bot to update */ - protected shouldSimulatePlayerScavName(botRole: string): boolean; - protected addPlayerScavNameSimulationSuffix(nickname: string): string; + addRandomPmcNameToBotMainProfileNicknameProperty(bot: IBotBase): void; + /** + * Choose a random PMC name from bear or usec bot jsons + * @returns PMC name as string + */ + protected getRandomPMCName(): string; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/DatabaseService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/DatabaseService.d.ts index 934617a..73575b1 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/services/DatabaseService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/DatabaseService.d.ts @@ -85,7 +85,7 @@ export declare class DatabaseService { */ getCustomization(): Record; /** - * @returns assets/database/templates/items.json + * @returns assets/database/templates/handbook.json */ getHandbook(): IHandbookBase; /** @@ -101,7 +101,7 @@ export declare class DatabaseService { */ getProfiles(): IProfileTemplates; /** - * @returns assets/database/templates/items.json + * @returns assets/database/templates/quests.json */ getQuests(): Record; /** diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/InsuranceService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/InsuranceService.d.ts index ac9cff5..e52fa59 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/services/InsuranceService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/InsuranceService.d.ts @@ -62,14 +62,6 @@ export declare class InsuranceService { * @returns Timestamp to return items to player in seconds */ protected getInsuranceReturnTimestamp(pmcData: IPmcData, trader: ITraderBase): number; - /** - * Take the insurance item packages within a profile session and ensure that each of the items in that package are - * not orphaned from their parent ID. - * - * @param sessionID The session ID to update insurance equipment packages in. - * @returns void - */ - protected adoptOrphanedInsEquipment(sessionID: string): void; protected getMaxInsuranceStorageTime(traderBase: ITraderBase): number; /** * Store lost gear post-raid inside profile, ready for later code to pick it up and mail it @@ -127,10 +119,4 @@ export declare class InsuranceService { * @returns price in roubles */ getRoublePriceToInsureItemWithTrader(pmcData: IPmcData, inventoryItem: IItem, traderId: string): number; - /** - * Returns the ID that should be used for a root-level Item's parentId property value within in the context of insurance. - * @param sessionID Players id - * @returns The root item Id. - */ - getRootItemParentID(sessionID: string): string; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/PaymentService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/PaymentService.d.ts index f6ec79d..78fdfb6 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/services/PaymentService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/PaymentService.d.ts @@ -8,7 +8,9 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IProcessBuyTradeRequestData } from "@spt/models/eft/trade/IProcessBuyTradeRequestData"; import { IProcessSellTradeRequestData } from "@spt/models/eft/trade/IProcessSellTradeRequestData"; +import { IInventoryConfig } from "@spt/models/spt/config/IInventoryConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { HashUtil } from "@spt/utils/HashUtil"; @@ -24,7 +26,9 @@ export declare class PaymentService { protected inventoryHelper: InventoryHelper; protected localisationService: LocalisationService; protected paymentHelper: PaymentHelper; - constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper); + protected configServer: ConfigServer; + protected inventoryConfig: IInventoryConfig; + constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper, configServer: ConfigServer); /** * Take money and insert items into return to server request * @param pmcData Pmc profile diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/PostDbLoadService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/PostDbLoadService.d.ts index c9e4bbe..cc51311 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/services/PostDbLoadService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/PostDbLoadService.d.ts @@ -74,4 +74,6 @@ export declare class PostDbLoadService { */ protected validateQuestAssortUnlocksExist(): void; protected setAllDbItemsAsSellableOnFlea(): void; + protected addMissingTraderBuyRestrictionMaxValue(): void; + protected applyFleaPriceOverrides(): void; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/ProfileFixerService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/ProfileFixerService.d.ts index 4a3a5ff..cbbe1d0 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/services/ProfileFixerService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/ProfileFixerService.d.ts @@ -47,6 +47,12 @@ export declare class ProfileFixerService { * @param pmcProfile profile to check and fix */ checkForAndFixPmcProfileIssues(pmcProfile: IPmcData): void; + /** + * Resolve any dialogue attachments that were accidentally created using the player's equipment ID as + * the stash root object ID + * @param fullProfile + */ + checkForAndFixDialogueAttachments(fullProfile: ISptProfile): void; /** * Find issues in the scav profile data that may cause issues * @param scavProfile profile to check and fix diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/SeasonalEventService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/SeasonalEventService.d.ts index 446cccc..26b74ef 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/services/SeasonalEventService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/SeasonalEventService.d.ts @@ -88,6 +88,12 @@ export declare class SeasonalEventService { * @returns bots with equipment changes */ protected getEventBotGear(eventType: SeasonalEventType): Record>>; + /** + * Get a dictionary of loot changes to apply to bots for a specific event e.g. Christmas/Halloween + * @param eventName Name of event to get gear changes for + * @returns bots with loot changes + */ + protected getEventBotLoot(eventType: SeasonalEventType): Record>>; /** * Get the dates each seasonal event starts and ends at * @returns Record with event name + start/end date @@ -108,7 +114,7 @@ export declare class SeasonalEventService { /** * Store active events inside class array property `currentlyActiveEvents` + set class properties: christmasEventActive/halloweenEventActive */ - protected cacheActiveEvents(): void; + cacheActiveEvents(): void; /** * Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER * @returns Season enum value @@ -171,6 +177,11 @@ export declare class SeasonalEventService { * @param eventName Name of the event to read equipment in from config */ protected addEventGearToBots(eventType: SeasonalEventType): void; + /** + * Read in data from seasonalEvents.json and add found loot items to bots + * @param eventName Name of the event to read loot in from config + */ + protected addEventLootToBots(eventType: SeasonalEventType): void; /** * Add pumpkin loot boxes to scavs */ diff --git a/TypeScript/17AsyncImporterWithDependency2/types/utils/App.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/utils/App.d.ts index db46d2c..0e4850e 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/utils/App.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/utils/App.d.ts @@ -4,10 +4,10 @@ import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { HttpServer } from "@spt/servers/HttpServer"; -import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { EncodingUtil } from "@spt/utils/EncodingUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; +import { DatabaseService } from "@spt/services/DatabaseService"; export declare class App { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/utils/ProgressWriter.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/utils/ProgressWriter.d.ts new file mode 100644 index 0000000..2641d3a --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/utils/ProgressWriter.d.ts @@ -0,0 +1,13 @@ +export declare class ProgressWriter { + private count; + private total?; + private done; + private barFillChar; + private barEmptyChar; + private maxBarLength; + constructor(total: number, maxBarLength?: number, barFillChar?: string, barEmptyChar?: string); + /** + * Increment the progress counter and update the progress bar display. + */ + increment(): void; +} diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/generators/BotGenerator.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/generators/BotGenerator.d.ts index 2c7bba6..a2291f4 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/generators/BotGenerator.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/generators/BotGenerator.d.ts @@ -5,6 +5,7 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { MinMax } from "@spt/models/common/MinMax"; +import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase"; import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; @@ -47,9 +48,10 @@ export declare class BotGenerator { * @param role e.g. assault / pmcbot * @param difficulty easy/normal/hard/impossible * @param botTemplate base bot template to use (e.g. assault/pmcbot) - * @returns + * profile PMC profile of player generating pscav + * @returns IBotBase */ - generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase; + generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType, profile: IPmcData): IBotBase; /** * Create 1 bot of the type/side/difficulty defined in botGenerationDetails * @param sessionId Session id @@ -79,6 +81,12 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; + /** + * Should this bot have a name like "name (Pmc Name)" and be alterd by client patch to be hostile to player + * @param botRole Role bot has + * @returns True if name should be simulated pscav + */ + protected shouldSimulatePlayerScav(botRole: string): boolean; /** * Get exp for kill by bot difficulty * @param experience Dict of difficulties and experience diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/helpers/RagfairOfferHelper.d.ts index 9dd5be3..0ff9c66 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/helpers/RagfairOfferHelper.d.ts @@ -91,6 +91,12 @@ export declare class RagfairOfferHelper { * @returns IRagfairOffer array */ getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcData: IPmcData): IRagfairOffer[]; + /** + * Get offers that have not exceeded buy limits + * @param possibleOffers offers to process + * @returns Offers + */ + protected getOffersInsideBuyRestrictionLimits(possibleOffers: IRagfairOffer[]): IRagfairOffer[]; /** * Check if offer is from trader standing the player does not have * @param offer Offer to check @@ -209,4 +215,10 @@ export declare class RagfairOfferHelper { * @returns True if in range */ protected itemQualityInRange(item: IItem, min: number, max: number): boolean; + /** + * Does this offer come from a trader + * @param offer Offer to check + * @returns True = from trader + */ + offerIsFromTrader(offer: IRagfairOffer): boolean; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/common/tables/IBotBase.d.ts index d3fd87e..8609573 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/eft/common/tables/IBotBase.d.ts @@ -60,6 +60,7 @@ export interface IUnlockedInfo { export interface IInfo { EntryPoint: string; Nickname: string; + MainProfileNickname?: string; LowerNickname: string; Side: string; SquadInviteRestriction: boolean; diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IInventoryConfig.d.ts index af0ec79..00ba5b1 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IInventoryConfig.d.ts @@ -10,6 +10,8 @@ export interface IInventoryConfig extends IBaseConfig { customMoneyTpls: string[]; /** Multipliers for skill gain when inside menus, NOT in-game */ skillGainMultiplers: Record; + /** Container Tpls that shoud be deprioritised when choosing where to take money from for payments */ + deprioritisedMoneyContainers: string[]; } export interface IRewardDetails { rewardCount: number; diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IPmcConfig.d.ts index 2e68219..02c9c5b 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IPmcConfig.d.ts @@ -66,7 +66,9 @@ export interface IPmcTypes { bear: string; } export interface ISlotLootSettings { + /** Item Type whitelist */ whitelist: string[]; + /** item tpl blacklist */ blacklist: string[]; } export interface IMinMaxLootValue extends MinMax { diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IRagfairConfig.d.ts index 36122c5..805a6b2 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/IRagfairConfig.d.ts @@ -75,6 +75,8 @@ export interface IDynamic { blacklist: IRagfairBlacklist; /** Dict of price limits keyed by item type */ unreasonableModPrices: Record; + /** Custom rouble prices for items to override values from prices.json */ + itemPriceOverrideRouble: Record; } export interface IPriceRanges { default: MinMax; diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/ISeasonalEventConfig.d.ts index 5e119fa..bf93685 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -6,6 +6,8 @@ export interface ISeasonalEventConfig extends IBaseConfig { enableSeasonalEventDetection: boolean; /** event / botType / equipSlot / itemid */ eventGear: Record>>>; + /** event / bot type / equipSlot / itemid */ + eventLoot: Record>>>; events: ISeasonalEvent[]; eventBotMapping: Record; eventBossSpawns: Record>; diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/services/BotNameService.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/services/BotNameService.d.ts index 056bd0f..349964d 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/services/BotNameService.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/services/BotNameService.d.ts @@ -1,5 +1,6 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; @@ -38,10 +39,13 @@ export declare class BotNameService { */ generateUniqueBotNickname(botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails, botRole: string, uniqueRoles?: string[]): string; /** - * Should this bot have a name like "name (Pmc Name)" - * @param botRole Role bot has - * @returns True if name should be simulated pscav + * Add random PMC name to bots MainProfileNickname property + * @param bot Bot to update */ - protected shouldSimulatePlayerScavName(botRole: string): boolean; - protected addPlayerScavNameSimulationSuffix(nickname: string): string; + addRandomPmcNameToBotMainProfileNicknameProperty(bot: IBotBase): void; + /** + * Choose a random PMC name from bear or usec bot jsons + * @returns PMC name as string + */ + protected getRandomPMCName(): string; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/services/DatabaseService.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/services/DatabaseService.d.ts index 934617a..73575b1 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/services/DatabaseService.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/services/DatabaseService.d.ts @@ -85,7 +85,7 @@ export declare class DatabaseService { */ getCustomization(): Record; /** - * @returns assets/database/templates/items.json + * @returns assets/database/templates/handbook.json */ getHandbook(): IHandbookBase; /** @@ -101,7 +101,7 @@ export declare class DatabaseService { */ getProfiles(): IProfileTemplates; /** - * @returns assets/database/templates/items.json + * @returns assets/database/templates/quests.json */ getQuests(): Record; /** diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/services/InsuranceService.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/services/InsuranceService.d.ts index ac9cff5..e52fa59 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/services/InsuranceService.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/services/InsuranceService.d.ts @@ -62,14 +62,6 @@ export declare class InsuranceService { * @returns Timestamp to return items to player in seconds */ protected getInsuranceReturnTimestamp(pmcData: IPmcData, trader: ITraderBase): number; - /** - * Take the insurance item packages within a profile session and ensure that each of the items in that package are - * not orphaned from their parent ID. - * - * @param sessionID The session ID to update insurance equipment packages in. - * @returns void - */ - protected adoptOrphanedInsEquipment(sessionID: string): void; protected getMaxInsuranceStorageTime(traderBase: ITraderBase): number; /** * Store lost gear post-raid inside profile, ready for later code to pick it up and mail it @@ -127,10 +119,4 @@ export declare class InsuranceService { * @returns price in roubles */ getRoublePriceToInsureItemWithTrader(pmcData: IPmcData, inventoryItem: IItem, traderId: string): number; - /** - * Returns the ID that should be used for a root-level Item's parentId property value within in the context of insurance. - * @param sessionID Players id - * @returns The root item Id. - */ - getRootItemParentID(sessionID: string): string; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/services/PaymentService.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/services/PaymentService.d.ts index f6ec79d..78fdfb6 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/services/PaymentService.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/services/PaymentService.d.ts @@ -8,7 +8,9 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IProcessBuyTradeRequestData } from "@spt/models/eft/trade/IProcessBuyTradeRequestData"; import { IProcessSellTradeRequestData } from "@spt/models/eft/trade/IProcessSellTradeRequestData"; +import { IInventoryConfig } from "@spt/models/spt/config/IInventoryConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { HashUtil } from "@spt/utils/HashUtil"; @@ -24,7 +26,9 @@ export declare class PaymentService { protected inventoryHelper: InventoryHelper; protected localisationService: LocalisationService; protected paymentHelper: PaymentHelper; - constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper); + protected configServer: ConfigServer; + protected inventoryConfig: IInventoryConfig; + constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper, configServer: ConfigServer); /** * Take money and insert items into return to server request * @param pmcData Pmc profile diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/services/PostDbLoadService.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/services/PostDbLoadService.d.ts index c9e4bbe..cc51311 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/services/PostDbLoadService.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/services/PostDbLoadService.d.ts @@ -74,4 +74,6 @@ export declare class PostDbLoadService { */ protected validateQuestAssortUnlocksExist(): void; protected setAllDbItemsAsSellableOnFlea(): void; + protected addMissingTraderBuyRestrictionMaxValue(): void; + protected applyFleaPriceOverrides(): void; } diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/services/ProfileFixerService.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/services/ProfileFixerService.d.ts index 4a3a5ff..cbbe1d0 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/services/ProfileFixerService.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/services/ProfileFixerService.d.ts @@ -47,6 +47,12 @@ export declare class ProfileFixerService { * @param pmcProfile profile to check and fix */ checkForAndFixPmcProfileIssues(pmcProfile: IPmcData): void; + /** + * Resolve any dialogue attachments that were accidentally created using the player's equipment ID as + * the stash root object ID + * @param fullProfile + */ + checkForAndFixDialogueAttachments(fullProfile: ISptProfile): void; /** * Find issues in the scav profile data that may cause issues * @param scavProfile profile to check and fix diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/services/SeasonalEventService.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/services/SeasonalEventService.d.ts index 446cccc..26b74ef 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/services/SeasonalEventService.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/services/SeasonalEventService.d.ts @@ -88,6 +88,12 @@ export declare class SeasonalEventService { * @returns bots with equipment changes */ protected getEventBotGear(eventType: SeasonalEventType): Record>>; + /** + * Get a dictionary of loot changes to apply to bots for a specific event e.g. Christmas/Halloween + * @param eventName Name of event to get gear changes for + * @returns bots with loot changes + */ + protected getEventBotLoot(eventType: SeasonalEventType): Record>>; /** * Get the dates each seasonal event starts and ends at * @returns Record with event name + start/end date @@ -108,7 +114,7 @@ export declare class SeasonalEventService { /** * Store active events inside class array property `currentlyActiveEvents` + set class properties: christmasEventActive/halloweenEventActive */ - protected cacheActiveEvents(): void; + cacheActiveEvents(): void; /** * Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER * @returns Season enum value @@ -171,6 +177,11 @@ export declare class SeasonalEventService { * @param eventName Name of the event to read equipment in from config */ protected addEventGearToBots(eventType: SeasonalEventType): void; + /** + * Read in data from seasonalEvents.json and add found loot items to bots + * @param eventName Name of the event to read loot in from config + */ + protected addEventLootToBots(eventType: SeasonalEventType): void; /** * Add pumpkin loot boxes to scavs */ diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/utils/App.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/utils/App.d.ts index db46d2c..0e4850e 100644 --- a/TypeScript/18.1CustomItemServiceLootBox/types/utils/App.d.ts +++ b/TypeScript/18.1CustomItemServiceLootBox/types/utils/App.d.ts @@ -4,10 +4,10 @@ import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { HttpServer } from "@spt/servers/HttpServer"; -import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { EncodingUtil } from "@spt/utils/EncodingUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; +import { DatabaseService } from "@spt/services/DatabaseService"; export declare class App { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/18.1CustomItemServiceLootBox/types/utils/ProgressWriter.d.ts b/TypeScript/18.1CustomItemServiceLootBox/types/utils/ProgressWriter.d.ts new file mode 100644 index 0000000..2641d3a --- /dev/null +++ b/TypeScript/18.1CustomItemServiceLootBox/types/utils/ProgressWriter.d.ts @@ -0,0 +1,13 @@ +export declare class ProgressWriter { + private count; + private total?; + private done; + private barFillChar; + private barEmptyChar; + private maxBarLength; + constructor(total: number, maxBarLength?: number, barFillChar?: string, barEmptyChar?: string); + /** + * Increment the progress counter and update the progress bar display. + */ + increment(): void; +} diff --git a/TypeScript/18CustomItemService/types/generators/BotGenerator.d.ts b/TypeScript/18CustomItemService/types/generators/BotGenerator.d.ts index 2c7bba6..a2291f4 100644 --- a/TypeScript/18CustomItemService/types/generators/BotGenerator.d.ts +++ b/TypeScript/18CustomItemService/types/generators/BotGenerator.d.ts @@ -5,6 +5,7 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { MinMax } from "@spt/models/common/MinMax"; +import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase"; import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; @@ -47,9 +48,10 @@ export declare class BotGenerator { * @param role e.g. assault / pmcbot * @param difficulty easy/normal/hard/impossible * @param botTemplate base bot template to use (e.g. assault/pmcbot) - * @returns + * profile PMC profile of player generating pscav + * @returns IBotBase */ - generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase; + generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType, profile: IPmcData): IBotBase; /** * Create 1 bot of the type/side/difficulty defined in botGenerationDetails * @param sessionId Session id @@ -79,6 +81,12 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; + /** + * Should this bot have a name like "name (Pmc Name)" and be alterd by client patch to be hostile to player + * @param botRole Role bot has + * @returns True if name should be simulated pscav + */ + protected shouldSimulatePlayerScav(botRole: string): boolean; /** * Get exp for kill by bot difficulty * @param experience Dict of difficulties and experience diff --git a/TypeScript/18CustomItemService/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/RagfairOfferHelper.d.ts index 9dd5be3..0ff9c66 100644 --- a/TypeScript/18CustomItemService/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/RagfairOfferHelper.d.ts @@ -91,6 +91,12 @@ export declare class RagfairOfferHelper { * @returns IRagfairOffer array */ getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcData: IPmcData): IRagfairOffer[]; + /** + * Get offers that have not exceeded buy limits + * @param possibleOffers offers to process + * @returns Offers + */ + protected getOffersInsideBuyRestrictionLimits(possibleOffers: IRagfairOffer[]): IRagfairOffer[]; /** * Check if offer is from trader standing the player does not have * @param offer Offer to check @@ -209,4 +215,10 @@ export declare class RagfairOfferHelper { * @returns True if in range */ protected itemQualityInRange(item: IItem, min: number, max: number): boolean; + /** + * Does this offer come from a trader + * @param offer Offer to check + * @returns True = from trader + */ + offerIsFromTrader(offer: IRagfairOffer): boolean; } diff --git a/TypeScript/18CustomItemService/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/18CustomItemService/types/models/eft/common/tables/IBotBase.d.ts index d3fd87e..8609573 100644 --- a/TypeScript/18CustomItemService/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/common/tables/IBotBase.d.ts @@ -60,6 +60,7 @@ export interface IUnlockedInfo { export interface IInfo { EntryPoint: string; Nickname: string; + MainProfileNickname?: string; LowerNickname: string; Side: string; SquadInviteRestriction: boolean; diff --git a/TypeScript/18CustomItemService/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/18CustomItemService/types/models/spt/config/IInventoryConfig.d.ts index af0ec79..00ba5b1 100644 --- a/TypeScript/18CustomItemService/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/config/IInventoryConfig.d.ts @@ -10,6 +10,8 @@ export interface IInventoryConfig extends IBaseConfig { customMoneyTpls: string[]; /** Multipliers for skill gain when inside menus, NOT in-game */ skillGainMultiplers: Record; + /** Container Tpls that shoud be deprioritised when choosing where to take money from for payments */ + deprioritisedMoneyContainers: string[]; } export interface IRewardDetails { rewardCount: number; diff --git a/TypeScript/18CustomItemService/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/18CustomItemService/types/models/spt/config/IPmcConfig.d.ts index 2e68219..02c9c5b 100644 --- a/TypeScript/18CustomItemService/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/config/IPmcConfig.d.ts @@ -66,7 +66,9 @@ export interface IPmcTypes { bear: string; } export interface ISlotLootSettings { + /** Item Type whitelist */ whitelist: string[]; + /** item tpl blacklist */ blacklist: string[]; } export interface IMinMaxLootValue extends MinMax { diff --git a/TypeScript/18CustomItemService/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/18CustomItemService/types/models/spt/config/IRagfairConfig.d.ts index 36122c5..805a6b2 100644 --- a/TypeScript/18CustomItemService/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/config/IRagfairConfig.d.ts @@ -75,6 +75,8 @@ export interface IDynamic { blacklist: IRagfairBlacklist; /** Dict of price limits keyed by item type */ unreasonableModPrices: Record; + /** Custom rouble prices for items to override values from prices.json */ + itemPriceOverrideRouble: Record; } export interface IPriceRanges { default: MinMax; diff --git a/TypeScript/18CustomItemService/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/18CustomItemService/types/models/spt/config/ISeasonalEventConfig.d.ts index 5e119fa..bf93685 100644 --- a/TypeScript/18CustomItemService/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -6,6 +6,8 @@ export interface ISeasonalEventConfig extends IBaseConfig { enableSeasonalEventDetection: boolean; /** event / botType / equipSlot / itemid */ eventGear: Record>>>; + /** event / bot type / equipSlot / itemid */ + eventLoot: Record>>>; events: ISeasonalEvent[]; eventBotMapping: Record; eventBossSpawns: Record>; diff --git a/TypeScript/18CustomItemService/types/services/BotNameService.d.ts b/TypeScript/18CustomItemService/types/services/BotNameService.d.ts index 056bd0f..349964d 100644 --- a/TypeScript/18CustomItemService/types/services/BotNameService.d.ts +++ b/TypeScript/18CustomItemService/types/services/BotNameService.d.ts @@ -1,5 +1,6 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; @@ -38,10 +39,13 @@ export declare class BotNameService { */ generateUniqueBotNickname(botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails, botRole: string, uniqueRoles?: string[]): string; /** - * Should this bot have a name like "name (Pmc Name)" - * @param botRole Role bot has - * @returns True if name should be simulated pscav + * Add random PMC name to bots MainProfileNickname property + * @param bot Bot to update */ - protected shouldSimulatePlayerScavName(botRole: string): boolean; - protected addPlayerScavNameSimulationSuffix(nickname: string): string; + addRandomPmcNameToBotMainProfileNicknameProperty(bot: IBotBase): void; + /** + * Choose a random PMC name from bear or usec bot jsons + * @returns PMC name as string + */ + protected getRandomPMCName(): string; } diff --git a/TypeScript/18CustomItemService/types/services/DatabaseService.d.ts b/TypeScript/18CustomItemService/types/services/DatabaseService.d.ts index 934617a..73575b1 100644 --- a/TypeScript/18CustomItemService/types/services/DatabaseService.d.ts +++ b/TypeScript/18CustomItemService/types/services/DatabaseService.d.ts @@ -85,7 +85,7 @@ export declare class DatabaseService { */ getCustomization(): Record; /** - * @returns assets/database/templates/items.json + * @returns assets/database/templates/handbook.json */ getHandbook(): IHandbookBase; /** @@ -101,7 +101,7 @@ export declare class DatabaseService { */ getProfiles(): IProfileTemplates; /** - * @returns assets/database/templates/items.json + * @returns assets/database/templates/quests.json */ getQuests(): Record; /** diff --git a/TypeScript/18CustomItemService/types/services/InsuranceService.d.ts b/TypeScript/18CustomItemService/types/services/InsuranceService.d.ts index ac9cff5..e52fa59 100644 --- a/TypeScript/18CustomItemService/types/services/InsuranceService.d.ts +++ b/TypeScript/18CustomItemService/types/services/InsuranceService.d.ts @@ -62,14 +62,6 @@ export declare class InsuranceService { * @returns Timestamp to return items to player in seconds */ protected getInsuranceReturnTimestamp(pmcData: IPmcData, trader: ITraderBase): number; - /** - * Take the insurance item packages within a profile session and ensure that each of the items in that package are - * not orphaned from their parent ID. - * - * @param sessionID The session ID to update insurance equipment packages in. - * @returns void - */ - protected adoptOrphanedInsEquipment(sessionID: string): void; protected getMaxInsuranceStorageTime(traderBase: ITraderBase): number; /** * Store lost gear post-raid inside profile, ready for later code to pick it up and mail it @@ -127,10 +119,4 @@ export declare class InsuranceService { * @returns price in roubles */ getRoublePriceToInsureItemWithTrader(pmcData: IPmcData, inventoryItem: IItem, traderId: string): number; - /** - * Returns the ID that should be used for a root-level Item's parentId property value within in the context of insurance. - * @param sessionID Players id - * @returns The root item Id. - */ - getRootItemParentID(sessionID: string): string; } diff --git a/TypeScript/18CustomItemService/types/services/PaymentService.d.ts b/TypeScript/18CustomItemService/types/services/PaymentService.d.ts index f6ec79d..78fdfb6 100644 --- a/TypeScript/18CustomItemService/types/services/PaymentService.d.ts +++ b/TypeScript/18CustomItemService/types/services/PaymentService.d.ts @@ -8,7 +8,9 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IProcessBuyTradeRequestData } from "@spt/models/eft/trade/IProcessBuyTradeRequestData"; import { IProcessSellTradeRequestData } from "@spt/models/eft/trade/IProcessSellTradeRequestData"; +import { IInventoryConfig } from "@spt/models/spt/config/IInventoryConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { HashUtil } from "@spt/utils/HashUtil"; @@ -24,7 +26,9 @@ export declare class PaymentService { protected inventoryHelper: InventoryHelper; protected localisationService: LocalisationService; protected paymentHelper: PaymentHelper; - constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper); + protected configServer: ConfigServer; + protected inventoryConfig: IInventoryConfig; + constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper, configServer: ConfigServer); /** * Take money and insert items into return to server request * @param pmcData Pmc profile diff --git a/TypeScript/18CustomItemService/types/services/PostDbLoadService.d.ts b/TypeScript/18CustomItemService/types/services/PostDbLoadService.d.ts index c9e4bbe..cc51311 100644 --- a/TypeScript/18CustomItemService/types/services/PostDbLoadService.d.ts +++ b/TypeScript/18CustomItemService/types/services/PostDbLoadService.d.ts @@ -74,4 +74,6 @@ export declare class PostDbLoadService { */ protected validateQuestAssortUnlocksExist(): void; protected setAllDbItemsAsSellableOnFlea(): void; + protected addMissingTraderBuyRestrictionMaxValue(): void; + protected applyFleaPriceOverrides(): void; } diff --git a/TypeScript/18CustomItemService/types/services/ProfileFixerService.d.ts b/TypeScript/18CustomItemService/types/services/ProfileFixerService.d.ts index 4a3a5ff..cbbe1d0 100644 --- a/TypeScript/18CustomItemService/types/services/ProfileFixerService.d.ts +++ b/TypeScript/18CustomItemService/types/services/ProfileFixerService.d.ts @@ -47,6 +47,12 @@ export declare class ProfileFixerService { * @param pmcProfile profile to check and fix */ checkForAndFixPmcProfileIssues(pmcProfile: IPmcData): void; + /** + * Resolve any dialogue attachments that were accidentally created using the player's equipment ID as + * the stash root object ID + * @param fullProfile + */ + checkForAndFixDialogueAttachments(fullProfile: ISptProfile): void; /** * Find issues in the scav profile data that may cause issues * @param scavProfile profile to check and fix diff --git a/TypeScript/18CustomItemService/types/services/SeasonalEventService.d.ts b/TypeScript/18CustomItemService/types/services/SeasonalEventService.d.ts index 446cccc..26b74ef 100644 --- a/TypeScript/18CustomItemService/types/services/SeasonalEventService.d.ts +++ b/TypeScript/18CustomItemService/types/services/SeasonalEventService.d.ts @@ -88,6 +88,12 @@ export declare class SeasonalEventService { * @returns bots with equipment changes */ protected getEventBotGear(eventType: SeasonalEventType): Record>>; + /** + * Get a dictionary of loot changes to apply to bots for a specific event e.g. Christmas/Halloween + * @param eventName Name of event to get gear changes for + * @returns bots with loot changes + */ + protected getEventBotLoot(eventType: SeasonalEventType): Record>>; /** * Get the dates each seasonal event starts and ends at * @returns Record with event name + start/end date @@ -108,7 +114,7 @@ export declare class SeasonalEventService { /** * Store active events inside class array property `currentlyActiveEvents` + set class properties: christmasEventActive/halloweenEventActive */ - protected cacheActiveEvents(): void; + cacheActiveEvents(): void; /** * Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER * @returns Season enum value @@ -171,6 +177,11 @@ export declare class SeasonalEventService { * @param eventName Name of the event to read equipment in from config */ protected addEventGearToBots(eventType: SeasonalEventType): void; + /** + * Read in data from seasonalEvents.json and add found loot items to bots + * @param eventName Name of the event to read loot in from config + */ + protected addEventLootToBots(eventType: SeasonalEventType): void; /** * Add pumpkin loot boxes to scavs */ diff --git a/TypeScript/18CustomItemService/types/utils/App.d.ts b/TypeScript/18CustomItemService/types/utils/App.d.ts index db46d2c..0e4850e 100644 --- a/TypeScript/18CustomItemService/types/utils/App.d.ts +++ b/TypeScript/18CustomItemService/types/utils/App.d.ts @@ -4,10 +4,10 @@ import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { HttpServer } from "@spt/servers/HttpServer"; -import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { EncodingUtil } from "@spt/utils/EncodingUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; +import { DatabaseService } from "@spt/services/DatabaseService"; export declare class App { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/18CustomItemService/types/utils/ProgressWriter.d.ts b/TypeScript/18CustomItemService/types/utils/ProgressWriter.d.ts new file mode 100644 index 0000000..2641d3a --- /dev/null +++ b/TypeScript/18CustomItemService/types/utils/ProgressWriter.d.ts @@ -0,0 +1,13 @@ +export declare class ProgressWriter { + private count; + private total?; + private done; + private barFillChar; + private barEmptyChar; + private maxBarLength; + constructor(total: number, maxBarLength?: number, barFillChar?: string, barEmptyChar?: string); + /** + * Increment the progress counter and update the progress bar display. + */ + increment(): void; +} diff --git a/TypeScript/19UseExternalLibraries/types/generators/BotGenerator.d.ts b/TypeScript/19UseExternalLibraries/types/generators/BotGenerator.d.ts index 2c7bba6..a2291f4 100644 --- a/TypeScript/19UseExternalLibraries/types/generators/BotGenerator.d.ts +++ b/TypeScript/19UseExternalLibraries/types/generators/BotGenerator.d.ts @@ -5,6 +5,7 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { MinMax } from "@spt/models/common/MinMax"; +import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase"; import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; @@ -47,9 +48,10 @@ export declare class BotGenerator { * @param role e.g. assault / pmcbot * @param difficulty easy/normal/hard/impossible * @param botTemplate base bot template to use (e.g. assault/pmcbot) - * @returns + * profile PMC profile of player generating pscav + * @returns IBotBase */ - generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase; + generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType, profile: IPmcData): IBotBase; /** * Create 1 bot of the type/side/difficulty defined in botGenerationDetails * @param sessionId Session id @@ -79,6 +81,12 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; + /** + * Should this bot have a name like "name (Pmc Name)" and be alterd by client patch to be hostile to player + * @param botRole Role bot has + * @returns True if name should be simulated pscav + */ + protected shouldSimulatePlayerScav(botRole: string): boolean; /** * Get exp for kill by bot difficulty * @param experience Dict of difficulties and experience diff --git a/TypeScript/19UseExternalLibraries/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/19UseExternalLibraries/types/helpers/RagfairOfferHelper.d.ts index 9dd5be3..0ff9c66 100644 --- a/TypeScript/19UseExternalLibraries/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/19UseExternalLibraries/types/helpers/RagfairOfferHelper.d.ts @@ -91,6 +91,12 @@ export declare class RagfairOfferHelper { * @returns IRagfairOffer array */ getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcData: IPmcData): IRagfairOffer[]; + /** + * Get offers that have not exceeded buy limits + * @param possibleOffers offers to process + * @returns Offers + */ + protected getOffersInsideBuyRestrictionLimits(possibleOffers: IRagfairOffer[]): IRagfairOffer[]; /** * Check if offer is from trader standing the player does not have * @param offer Offer to check @@ -209,4 +215,10 @@ export declare class RagfairOfferHelper { * @returns True if in range */ protected itemQualityInRange(item: IItem, min: number, max: number): boolean; + /** + * Does this offer come from a trader + * @param offer Offer to check + * @returns True = from trader + */ + offerIsFromTrader(offer: IRagfairOffer): boolean; } diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/common/tables/IBotBase.d.ts index d3fd87e..8609573 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/common/tables/IBotBase.d.ts @@ -60,6 +60,7 @@ export interface IUnlockedInfo { export interface IInfo { EntryPoint: string; Nickname: string; + MainProfileNickname?: string; LowerNickname: string; Side: string; SquadInviteRestriction: boolean; diff --git a/TypeScript/19UseExternalLibraries/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/config/IInventoryConfig.d.ts index af0ec79..00ba5b1 100644 --- a/TypeScript/19UseExternalLibraries/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/spt/config/IInventoryConfig.d.ts @@ -10,6 +10,8 @@ export interface IInventoryConfig extends IBaseConfig { customMoneyTpls: string[]; /** Multipliers for skill gain when inside menus, NOT in-game */ skillGainMultiplers: Record; + /** Container Tpls that shoud be deprioritised when choosing where to take money from for payments */ + deprioritisedMoneyContainers: string[]; } export interface IRewardDetails { rewardCount: number; diff --git a/TypeScript/19UseExternalLibraries/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/config/IPmcConfig.d.ts index 2e68219..02c9c5b 100644 --- a/TypeScript/19UseExternalLibraries/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/spt/config/IPmcConfig.d.ts @@ -66,7 +66,9 @@ export interface IPmcTypes { bear: string; } export interface ISlotLootSettings { + /** Item Type whitelist */ whitelist: string[]; + /** item tpl blacklist */ blacklist: string[]; } export interface IMinMaxLootValue extends MinMax { diff --git a/TypeScript/19UseExternalLibraries/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/config/IRagfairConfig.d.ts index 36122c5..805a6b2 100644 --- a/TypeScript/19UseExternalLibraries/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/spt/config/IRagfairConfig.d.ts @@ -75,6 +75,8 @@ export interface IDynamic { blacklist: IRagfairBlacklist; /** Dict of price limits keyed by item type */ unreasonableModPrices: Record; + /** Custom rouble prices for items to override values from prices.json */ + itemPriceOverrideRouble: Record; } export interface IPriceRanges { default: MinMax; diff --git a/TypeScript/19UseExternalLibraries/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/config/ISeasonalEventConfig.d.ts index 5e119fa..bf93685 100644 --- a/TypeScript/19UseExternalLibraries/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -6,6 +6,8 @@ export interface ISeasonalEventConfig extends IBaseConfig { enableSeasonalEventDetection: boolean; /** event / botType / equipSlot / itemid */ eventGear: Record>>>; + /** event / bot type / equipSlot / itemid */ + eventLoot: Record>>>; events: ISeasonalEvent[]; eventBotMapping: Record; eventBossSpawns: Record>; diff --git a/TypeScript/19UseExternalLibraries/types/services/BotNameService.d.ts b/TypeScript/19UseExternalLibraries/types/services/BotNameService.d.ts index 056bd0f..349964d 100644 --- a/TypeScript/19UseExternalLibraries/types/services/BotNameService.d.ts +++ b/TypeScript/19UseExternalLibraries/types/services/BotNameService.d.ts @@ -1,5 +1,6 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; @@ -38,10 +39,13 @@ export declare class BotNameService { */ generateUniqueBotNickname(botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails, botRole: string, uniqueRoles?: string[]): string; /** - * Should this bot have a name like "name (Pmc Name)" - * @param botRole Role bot has - * @returns True if name should be simulated pscav + * Add random PMC name to bots MainProfileNickname property + * @param bot Bot to update */ - protected shouldSimulatePlayerScavName(botRole: string): boolean; - protected addPlayerScavNameSimulationSuffix(nickname: string): string; + addRandomPmcNameToBotMainProfileNicknameProperty(bot: IBotBase): void; + /** + * Choose a random PMC name from bear or usec bot jsons + * @returns PMC name as string + */ + protected getRandomPMCName(): string; } diff --git a/TypeScript/19UseExternalLibraries/types/services/DatabaseService.d.ts b/TypeScript/19UseExternalLibraries/types/services/DatabaseService.d.ts index 934617a..73575b1 100644 --- a/TypeScript/19UseExternalLibraries/types/services/DatabaseService.d.ts +++ b/TypeScript/19UseExternalLibraries/types/services/DatabaseService.d.ts @@ -85,7 +85,7 @@ export declare class DatabaseService { */ getCustomization(): Record; /** - * @returns assets/database/templates/items.json + * @returns assets/database/templates/handbook.json */ getHandbook(): IHandbookBase; /** @@ -101,7 +101,7 @@ export declare class DatabaseService { */ getProfiles(): IProfileTemplates; /** - * @returns assets/database/templates/items.json + * @returns assets/database/templates/quests.json */ getQuests(): Record; /** diff --git a/TypeScript/19UseExternalLibraries/types/services/InsuranceService.d.ts b/TypeScript/19UseExternalLibraries/types/services/InsuranceService.d.ts index ac9cff5..e52fa59 100644 --- a/TypeScript/19UseExternalLibraries/types/services/InsuranceService.d.ts +++ b/TypeScript/19UseExternalLibraries/types/services/InsuranceService.d.ts @@ -62,14 +62,6 @@ export declare class InsuranceService { * @returns Timestamp to return items to player in seconds */ protected getInsuranceReturnTimestamp(pmcData: IPmcData, trader: ITraderBase): number; - /** - * Take the insurance item packages within a profile session and ensure that each of the items in that package are - * not orphaned from their parent ID. - * - * @param sessionID The session ID to update insurance equipment packages in. - * @returns void - */ - protected adoptOrphanedInsEquipment(sessionID: string): void; protected getMaxInsuranceStorageTime(traderBase: ITraderBase): number; /** * Store lost gear post-raid inside profile, ready for later code to pick it up and mail it @@ -127,10 +119,4 @@ export declare class InsuranceService { * @returns price in roubles */ getRoublePriceToInsureItemWithTrader(pmcData: IPmcData, inventoryItem: IItem, traderId: string): number; - /** - * Returns the ID that should be used for a root-level Item's parentId property value within in the context of insurance. - * @param sessionID Players id - * @returns The root item Id. - */ - getRootItemParentID(sessionID: string): string; } diff --git a/TypeScript/19UseExternalLibraries/types/services/PaymentService.d.ts b/TypeScript/19UseExternalLibraries/types/services/PaymentService.d.ts index f6ec79d..78fdfb6 100644 --- a/TypeScript/19UseExternalLibraries/types/services/PaymentService.d.ts +++ b/TypeScript/19UseExternalLibraries/types/services/PaymentService.d.ts @@ -8,7 +8,9 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IProcessBuyTradeRequestData } from "@spt/models/eft/trade/IProcessBuyTradeRequestData"; import { IProcessSellTradeRequestData } from "@spt/models/eft/trade/IProcessSellTradeRequestData"; +import { IInventoryConfig } from "@spt/models/spt/config/IInventoryConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { HashUtil } from "@spt/utils/HashUtil"; @@ -24,7 +26,9 @@ export declare class PaymentService { protected inventoryHelper: InventoryHelper; protected localisationService: LocalisationService; protected paymentHelper: PaymentHelper; - constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper); + protected configServer: ConfigServer; + protected inventoryConfig: IInventoryConfig; + constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper, configServer: ConfigServer); /** * Take money and insert items into return to server request * @param pmcData Pmc profile diff --git a/TypeScript/19UseExternalLibraries/types/services/PostDbLoadService.d.ts b/TypeScript/19UseExternalLibraries/types/services/PostDbLoadService.d.ts index c9e4bbe..cc51311 100644 --- a/TypeScript/19UseExternalLibraries/types/services/PostDbLoadService.d.ts +++ b/TypeScript/19UseExternalLibraries/types/services/PostDbLoadService.d.ts @@ -74,4 +74,6 @@ export declare class PostDbLoadService { */ protected validateQuestAssortUnlocksExist(): void; protected setAllDbItemsAsSellableOnFlea(): void; + protected addMissingTraderBuyRestrictionMaxValue(): void; + protected applyFleaPriceOverrides(): void; } diff --git a/TypeScript/19UseExternalLibraries/types/services/ProfileFixerService.d.ts b/TypeScript/19UseExternalLibraries/types/services/ProfileFixerService.d.ts index 4a3a5ff..cbbe1d0 100644 --- a/TypeScript/19UseExternalLibraries/types/services/ProfileFixerService.d.ts +++ b/TypeScript/19UseExternalLibraries/types/services/ProfileFixerService.d.ts @@ -47,6 +47,12 @@ export declare class ProfileFixerService { * @param pmcProfile profile to check and fix */ checkForAndFixPmcProfileIssues(pmcProfile: IPmcData): void; + /** + * Resolve any dialogue attachments that were accidentally created using the player's equipment ID as + * the stash root object ID + * @param fullProfile + */ + checkForAndFixDialogueAttachments(fullProfile: ISptProfile): void; /** * Find issues in the scav profile data that may cause issues * @param scavProfile profile to check and fix diff --git a/TypeScript/19UseExternalLibraries/types/services/SeasonalEventService.d.ts b/TypeScript/19UseExternalLibraries/types/services/SeasonalEventService.d.ts index 446cccc..26b74ef 100644 --- a/TypeScript/19UseExternalLibraries/types/services/SeasonalEventService.d.ts +++ b/TypeScript/19UseExternalLibraries/types/services/SeasonalEventService.d.ts @@ -88,6 +88,12 @@ export declare class SeasonalEventService { * @returns bots with equipment changes */ protected getEventBotGear(eventType: SeasonalEventType): Record>>; + /** + * Get a dictionary of loot changes to apply to bots for a specific event e.g. Christmas/Halloween + * @param eventName Name of event to get gear changes for + * @returns bots with loot changes + */ + protected getEventBotLoot(eventType: SeasonalEventType): Record>>; /** * Get the dates each seasonal event starts and ends at * @returns Record with event name + start/end date @@ -108,7 +114,7 @@ export declare class SeasonalEventService { /** * Store active events inside class array property `currentlyActiveEvents` + set class properties: christmasEventActive/halloweenEventActive */ - protected cacheActiveEvents(): void; + cacheActiveEvents(): void; /** * Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER * @returns Season enum value @@ -171,6 +177,11 @@ export declare class SeasonalEventService { * @param eventName Name of the event to read equipment in from config */ protected addEventGearToBots(eventType: SeasonalEventType): void; + /** + * Read in data from seasonalEvents.json and add found loot items to bots + * @param eventName Name of the event to read loot in from config + */ + protected addEventLootToBots(eventType: SeasonalEventType): void; /** * Add pumpkin loot boxes to scavs */ diff --git a/TypeScript/19UseExternalLibraries/types/utils/App.d.ts b/TypeScript/19UseExternalLibraries/types/utils/App.d.ts index db46d2c..0e4850e 100644 --- a/TypeScript/19UseExternalLibraries/types/utils/App.d.ts +++ b/TypeScript/19UseExternalLibraries/types/utils/App.d.ts @@ -4,10 +4,10 @@ import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { HttpServer } from "@spt/servers/HttpServer"; -import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { EncodingUtil } from "@spt/utils/EncodingUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; +import { DatabaseService } from "@spt/services/DatabaseService"; export declare class App { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/19UseExternalLibraries/types/utils/ProgressWriter.d.ts b/TypeScript/19UseExternalLibraries/types/utils/ProgressWriter.d.ts new file mode 100644 index 0000000..2641d3a --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/utils/ProgressWriter.d.ts @@ -0,0 +1,13 @@ +export declare class ProgressWriter { + private count; + private total?; + private done; + private barFillChar; + private barEmptyChar; + private maxBarLength; + constructor(total: number, maxBarLength?: number, barFillChar?: string, barEmptyChar?: string); + /** + * Increment the progress counter and update the progress bar display. + */ + increment(): void; +} diff --git a/TypeScript/1LogToConsole/types/generators/BotGenerator.d.ts b/TypeScript/1LogToConsole/types/generators/BotGenerator.d.ts index 2c7bba6..a2291f4 100644 --- a/TypeScript/1LogToConsole/types/generators/BotGenerator.d.ts +++ b/TypeScript/1LogToConsole/types/generators/BotGenerator.d.ts @@ -5,6 +5,7 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { MinMax } from "@spt/models/common/MinMax"; +import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase"; import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; @@ -47,9 +48,10 @@ export declare class BotGenerator { * @param role e.g. assault / pmcbot * @param difficulty easy/normal/hard/impossible * @param botTemplate base bot template to use (e.g. assault/pmcbot) - * @returns + * profile PMC profile of player generating pscav + * @returns IBotBase */ - generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase; + generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType, profile: IPmcData): IBotBase; /** * Create 1 bot of the type/side/difficulty defined in botGenerationDetails * @param sessionId Session id @@ -79,6 +81,12 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; + /** + * Should this bot have a name like "name (Pmc Name)" and be alterd by client patch to be hostile to player + * @param botRole Role bot has + * @returns True if name should be simulated pscav + */ + protected shouldSimulatePlayerScav(botRole: string): boolean; /** * Get exp for kill by bot difficulty * @param experience Dict of difficulties and experience diff --git a/TypeScript/1LogToConsole/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/RagfairOfferHelper.d.ts index 9dd5be3..0ff9c66 100644 --- a/TypeScript/1LogToConsole/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/RagfairOfferHelper.d.ts @@ -91,6 +91,12 @@ export declare class RagfairOfferHelper { * @returns IRagfairOffer array */ getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcData: IPmcData): IRagfairOffer[]; + /** + * Get offers that have not exceeded buy limits + * @param possibleOffers offers to process + * @returns Offers + */ + protected getOffersInsideBuyRestrictionLimits(possibleOffers: IRagfairOffer[]): IRagfairOffer[]; /** * Check if offer is from trader standing the player does not have * @param offer Offer to check @@ -209,4 +215,10 @@ export declare class RagfairOfferHelper { * @returns True if in range */ protected itemQualityInRange(item: IItem, min: number, max: number): boolean; + /** + * Does this offer come from a trader + * @param offer Offer to check + * @returns True = from trader + */ + offerIsFromTrader(offer: IRagfairOffer): boolean; } diff --git a/TypeScript/1LogToConsole/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/1LogToConsole/types/models/eft/common/tables/IBotBase.d.ts index d3fd87e..8609573 100644 --- a/TypeScript/1LogToConsole/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/common/tables/IBotBase.d.ts @@ -60,6 +60,7 @@ export interface IUnlockedInfo { export interface IInfo { EntryPoint: string; Nickname: string; + MainProfileNickname?: string; LowerNickname: string; Side: string; SquadInviteRestriction: boolean; diff --git a/TypeScript/1LogToConsole/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/1LogToConsole/types/models/spt/config/IInventoryConfig.d.ts index af0ec79..00ba5b1 100644 --- a/TypeScript/1LogToConsole/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/config/IInventoryConfig.d.ts @@ -10,6 +10,8 @@ export interface IInventoryConfig extends IBaseConfig { customMoneyTpls: string[]; /** Multipliers for skill gain when inside menus, NOT in-game */ skillGainMultiplers: Record; + /** Container Tpls that shoud be deprioritised when choosing where to take money from for payments */ + deprioritisedMoneyContainers: string[]; } export interface IRewardDetails { rewardCount: number; diff --git a/TypeScript/1LogToConsole/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/1LogToConsole/types/models/spt/config/IPmcConfig.d.ts index 2e68219..02c9c5b 100644 --- a/TypeScript/1LogToConsole/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/config/IPmcConfig.d.ts @@ -66,7 +66,9 @@ export interface IPmcTypes { bear: string; } export interface ISlotLootSettings { + /** Item Type whitelist */ whitelist: string[]; + /** item tpl blacklist */ blacklist: string[]; } export interface IMinMaxLootValue extends MinMax { diff --git a/TypeScript/1LogToConsole/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/1LogToConsole/types/models/spt/config/IRagfairConfig.d.ts index 36122c5..805a6b2 100644 --- a/TypeScript/1LogToConsole/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/config/IRagfairConfig.d.ts @@ -75,6 +75,8 @@ export interface IDynamic { blacklist: IRagfairBlacklist; /** Dict of price limits keyed by item type */ unreasonableModPrices: Record; + /** Custom rouble prices for items to override values from prices.json */ + itemPriceOverrideRouble: Record; } export interface IPriceRanges { default: MinMax; diff --git a/TypeScript/1LogToConsole/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/1LogToConsole/types/models/spt/config/ISeasonalEventConfig.d.ts index 5e119fa..bf93685 100644 --- a/TypeScript/1LogToConsole/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -6,6 +6,8 @@ export interface ISeasonalEventConfig extends IBaseConfig { enableSeasonalEventDetection: boolean; /** event / botType / equipSlot / itemid */ eventGear: Record>>>; + /** event / bot type / equipSlot / itemid */ + eventLoot: Record>>>; events: ISeasonalEvent[]; eventBotMapping: Record; eventBossSpawns: Record>; diff --git a/TypeScript/1LogToConsole/types/services/BotNameService.d.ts b/TypeScript/1LogToConsole/types/services/BotNameService.d.ts index 056bd0f..349964d 100644 --- a/TypeScript/1LogToConsole/types/services/BotNameService.d.ts +++ b/TypeScript/1LogToConsole/types/services/BotNameService.d.ts @@ -1,5 +1,6 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; @@ -38,10 +39,13 @@ export declare class BotNameService { */ generateUniqueBotNickname(botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails, botRole: string, uniqueRoles?: string[]): string; /** - * Should this bot have a name like "name (Pmc Name)" - * @param botRole Role bot has - * @returns True if name should be simulated pscav + * Add random PMC name to bots MainProfileNickname property + * @param bot Bot to update */ - protected shouldSimulatePlayerScavName(botRole: string): boolean; - protected addPlayerScavNameSimulationSuffix(nickname: string): string; + addRandomPmcNameToBotMainProfileNicknameProperty(bot: IBotBase): void; + /** + * Choose a random PMC name from bear or usec bot jsons + * @returns PMC name as string + */ + protected getRandomPMCName(): string; } diff --git a/TypeScript/1LogToConsole/types/services/DatabaseService.d.ts b/TypeScript/1LogToConsole/types/services/DatabaseService.d.ts index 934617a..73575b1 100644 --- a/TypeScript/1LogToConsole/types/services/DatabaseService.d.ts +++ b/TypeScript/1LogToConsole/types/services/DatabaseService.d.ts @@ -85,7 +85,7 @@ export declare class DatabaseService { */ getCustomization(): Record; /** - * @returns assets/database/templates/items.json + * @returns assets/database/templates/handbook.json */ getHandbook(): IHandbookBase; /** @@ -101,7 +101,7 @@ export declare class DatabaseService { */ getProfiles(): IProfileTemplates; /** - * @returns assets/database/templates/items.json + * @returns assets/database/templates/quests.json */ getQuests(): Record; /** diff --git a/TypeScript/1LogToConsole/types/services/InsuranceService.d.ts b/TypeScript/1LogToConsole/types/services/InsuranceService.d.ts index ac9cff5..e52fa59 100644 --- a/TypeScript/1LogToConsole/types/services/InsuranceService.d.ts +++ b/TypeScript/1LogToConsole/types/services/InsuranceService.d.ts @@ -62,14 +62,6 @@ export declare class InsuranceService { * @returns Timestamp to return items to player in seconds */ protected getInsuranceReturnTimestamp(pmcData: IPmcData, trader: ITraderBase): number; - /** - * Take the insurance item packages within a profile session and ensure that each of the items in that package are - * not orphaned from their parent ID. - * - * @param sessionID The session ID to update insurance equipment packages in. - * @returns void - */ - protected adoptOrphanedInsEquipment(sessionID: string): void; protected getMaxInsuranceStorageTime(traderBase: ITraderBase): number; /** * Store lost gear post-raid inside profile, ready for later code to pick it up and mail it @@ -127,10 +119,4 @@ export declare class InsuranceService { * @returns price in roubles */ getRoublePriceToInsureItemWithTrader(pmcData: IPmcData, inventoryItem: IItem, traderId: string): number; - /** - * Returns the ID that should be used for a root-level Item's parentId property value within in the context of insurance. - * @param sessionID Players id - * @returns The root item Id. - */ - getRootItemParentID(sessionID: string): string; } diff --git a/TypeScript/1LogToConsole/types/services/PaymentService.d.ts b/TypeScript/1LogToConsole/types/services/PaymentService.d.ts index f6ec79d..78fdfb6 100644 --- a/TypeScript/1LogToConsole/types/services/PaymentService.d.ts +++ b/TypeScript/1LogToConsole/types/services/PaymentService.d.ts @@ -8,7 +8,9 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IProcessBuyTradeRequestData } from "@spt/models/eft/trade/IProcessBuyTradeRequestData"; import { IProcessSellTradeRequestData } from "@spt/models/eft/trade/IProcessSellTradeRequestData"; +import { IInventoryConfig } from "@spt/models/spt/config/IInventoryConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { HashUtil } from "@spt/utils/HashUtil"; @@ -24,7 +26,9 @@ export declare class PaymentService { protected inventoryHelper: InventoryHelper; protected localisationService: LocalisationService; protected paymentHelper: PaymentHelper; - constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper); + protected configServer: ConfigServer; + protected inventoryConfig: IInventoryConfig; + constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper, configServer: ConfigServer); /** * Take money and insert items into return to server request * @param pmcData Pmc profile diff --git a/TypeScript/1LogToConsole/types/services/PostDbLoadService.d.ts b/TypeScript/1LogToConsole/types/services/PostDbLoadService.d.ts index c9e4bbe..cc51311 100644 --- a/TypeScript/1LogToConsole/types/services/PostDbLoadService.d.ts +++ b/TypeScript/1LogToConsole/types/services/PostDbLoadService.d.ts @@ -74,4 +74,6 @@ export declare class PostDbLoadService { */ protected validateQuestAssortUnlocksExist(): void; protected setAllDbItemsAsSellableOnFlea(): void; + protected addMissingTraderBuyRestrictionMaxValue(): void; + protected applyFleaPriceOverrides(): void; } diff --git a/TypeScript/1LogToConsole/types/services/ProfileFixerService.d.ts b/TypeScript/1LogToConsole/types/services/ProfileFixerService.d.ts index 4a3a5ff..cbbe1d0 100644 --- a/TypeScript/1LogToConsole/types/services/ProfileFixerService.d.ts +++ b/TypeScript/1LogToConsole/types/services/ProfileFixerService.d.ts @@ -47,6 +47,12 @@ export declare class ProfileFixerService { * @param pmcProfile profile to check and fix */ checkForAndFixPmcProfileIssues(pmcProfile: IPmcData): void; + /** + * Resolve any dialogue attachments that were accidentally created using the player's equipment ID as + * the stash root object ID + * @param fullProfile + */ + checkForAndFixDialogueAttachments(fullProfile: ISptProfile): void; /** * Find issues in the scav profile data that may cause issues * @param scavProfile profile to check and fix diff --git a/TypeScript/1LogToConsole/types/services/SeasonalEventService.d.ts b/TypeScript/1LogToConsole/types/services/SeasonalEventService.d.ts index 446cccc..26b74ef 100644 --- a/TypeScript/1LogToConsole/types/services/SeasonalEventService.d.ts +++ b/TypeScript/1LogToConsole/types/services/SeasonalEventService.d.ts @@ -88,6 +88,12 @@ export declare class SeasonalEventService { * @returns bots with equipment changes */ protected getEventBotGear(eventType: SeasonalEventType): Record>>; + /** + * Get a dictionary of loot changes to apply to bots for a specific event e.g. Christmas/Halloween + * @param eventName Name of event to get gear changes for + * @returns bots with loot changes + */ + protected getEventBotLoot(eventType: SeasonalEventType): Record>>; /** * Get the dates each seasonal event starts and ends at * @returns Record with event name + start/end date @@ -108,7 +114,7 @@ export declare class SeasonalEventService { /** * Store active events inside class array property `currentlyActiveEvents` + set class properties: christmasEventActive/halloweenEventActive */ - protected cacheActiveEvents(): void; + cacheActiveEvents(): void; /** * Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER * @returns Season enum value @@ -171,6 +177,11 @@ export declare class SeasonalEventService { * @param eventName Name of the event to read equipment in from config */ protected addEventGearToBots(eventType: SeasonalEventType): void; + /** + * Read in data from seasonalEvents.json and add found loot items to bots + * @param eventName Name of the event to read loot in from config + */ + protected addEventLootToBots(eventType: SeasonalEventType): void; /** * Add pumpkin loot boxes to scavs */ diff --git a/TypeScript/1LogToConsole/types/utils/App.d.ts b/TypeScript/1LogToConsole/types/utils/App.d.ts index db46d2c..0e4850e 100644 --- a/TypeScript/1LogToConsole/types/utils/App.d.ts +++ b/TypeScript/1LogToConsole/types/utils/App.d.ts @@ -4,10 +4,10 @@ import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { HttpServer } from "@spt/servers/HttpServer"; -import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { EncodingUtil } from "@spt/utils/EncodingUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; +import { DatabaseService } from "@spt/services/DatabaseService"; export declare class App { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/1LogToConsole/types/utils/ProgressWriter.d.ts b/TypeScript/1LogToConsole/types/utils/ProgressWriter.d.ts new file mode 100644 index 0000000..2641d3a --- /dev/null +++ b/TypeScript/1LogToConsole/types/utils/ProgressWriter.d.ts @@ -0,0 +1,13 @@ +export declare class ProgressWriter { + private count; + private total?; + private done; + private barFillChar; + private barEmptyChar; + private maxBarLength; + constructor(total: number, maxBarLength?: number, barFillChar?: string, barEmptyChar?: string); + /** + * Increment the progress counter and update the progress bar display. + */ + increment(): void; +} diff --git a/TypeScript/20CustomChatBot/types/generators/BotGenerator.d.ts b/TypeScript/20CustomChatBot/types/generators/BotGenerator.d.ts index 2c7bba6..a2291f4 100644 --- a/TypeScript/20CustomChatBot/types/generators/BotGenerator.d.ts +++ b/TypeScript/20CustomChatBot/types/generators/BotGenerator.d.ts @@ -5,6 +5,7 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { MinMax } from "@spt/models/common/MinMax"; +import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase"; import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; @@ -47,9 +48,10 @@ export declare class BotGenerator { * @param role e.g. assault / pmcbot * @param difficulty easy/normal/hard/impossible * @param botTemplate base bot template to use (e.g. assault/pmcbot) - * @returns + * profile PMC profile of player generating pscav + * @returns IBotBase */ - generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase; + generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType, profile: IPmcData): IBotBase; /** * Create 1 bot of the type/side/difficulty defined in botGenerationDetails * @param sessionId Session id @@ -79,6 +81,12 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; + /** + * Should this bot have a name like "name (Pmc Name)" and be alterd by client patch to be hostile to player + * @param botRole Role bot has + * @returns True if name should be simulated pscav + */ + protected shouldSimulatePlayerScav(botRole: string): boolean; /** * Get exp for kill by bot difficulty * @param experience Dict of difficulties and experience diff --git a/TypeScript/20CustomChatBot/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/20CustomChatBot/types/helpers/RagfairOfferHelper.d.ts index 9dd5be3..0ff9c66 100644 --- a/TypeScript/20CustomChatBot/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/20CustomChatBot/types/helpers/RagfairOfferHelper.d.ts @@ -91,6 +91,12 @@ export declare class RagfairOfferHelper { * @returns IRagfairOffer array */ getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcData: IPmcData): IRagfairOffer[]; + /** + * Get offers that have not exceeded buy limits + * @param possibleOffers offers to process + * @returns Offers + */ + protected getOffersInsideBuyRestrictionLimits(possibleOffers: IRagfairOffer[]): IRagfairOffer[]; /** * Check if offer is from trader standing the player does not have * @param offer Offer to check @@ -209,4 +215,10 @@ export declare class RagfairOfferHelper { * @returns True if in range */ protected itemQualityInRange(item: IItem, min: number, max: number): boolean; + /** + * Does this offer come from a trader + * @param offer Offer to check + * @returns True = from trader + */ + offerIsFromTrader(offer: IRagfairOffer): boolean; } diff --git a/TypeScript/20CustomChatBot/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/20CustomChatBot/types/models/eft/common/tables/IBotBase.d.ts index d3fd87e..8609573 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/common/tables/IBotBase.d.ts @@ -60,6 +60,7 @@ export interface IUnlockedInfo { export interface IInfo { EntryPoint: string; Nickname: string; + MainProfileNickname?: string; LowerNickname: string; Side: string; SquadInviteRestriction: boolean; diff --git a/TypeScript/20CustomChatBot/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/20CustomChatBot/types/models/spt/config/IInventoryConfig.d.ts index af0ec79..00ba5b1 100644 --- a/TypeScript/20CustomChatBot/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/20CustomChatBot/types/models/spt/config/IInventoryConfig.d.ts @@ -10,6 +10,8 @@ export interface IInventoryConfig extends IBaseConfig { customMoneyTpls: string[]; /** Multipliers for skill gain when inside menus, NOT in-game */ skillGainMultiplers: Record; + /** Container Tpls that shoud be deprioritised when choosing where to take money from for payments */ + deprioritisedMoneyContainers: string[]; } export interface IRewardDetails { rewardCount: number; diff --git a/TypeScript/20CustomChatBot/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/20CustomChatBot/types/models/spt/config/IPmcConfig.d.ts index 2e68219..02c9c5b 100644 --- a/TypeScript/20CustomChatBot/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/20CustomChatBot/types/models/spt/config/IPmcConfig.d.ts @@ -66,7 +66,9 @@ export interface IPmcTypes { bear: string; } export interface ISlotLootSettings { + /** Item Type whitelist */ whitelist: string[]; + /** item tpl blacklist */ blacklist: string[]; } export interface IMinMaxLootValue extends MinMax { diff --git a/TypeScript/20CustomChatBot/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/20CustomChatBot/types/models/spt/config/IRagfairConfig.d.ts index 36122c5..805a6b2 100644 --- a/TypeScript/20CustomChatBot/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/20CustomChatBot/types/models/spt/config/IRagfairConfig.d.ts @@ -75,6 +75,8 @@ export interface IDynamic { blacklist: IRagfairBlacklist; /** Dict of price limits keyed by item type */ unreasonableModPrices: Record; + /** Custom rouble prices for items to override values from prices.json */ + itemPriceOverrideRouble: Record; } export interface IPriceRanges { default: MinMax; diff --git a/TypeScript/20CustomChatBot/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/20CustomChatBot/types/models/spt/config/ISeasonalEventConfig.d.ts index 5e119fa..bf93685 100644 --- a/TypeScript/20CustomChatBot/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/20CustomChatBot/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -6,6 +6,8 @@ export interface ISeasonalEventConfig extends IBaseConfig { enableSeasonalEventDetection: boolean; /** event / botType / equipSlot / itemid */ eventGear: Record>>>; + /** event / bot type / equipSlot / itemid */ + eventLoot: Record>>>; events: ISeasonalEvent[]; eventBotMapping: Record; eventBossSpawns: Record>; diff --git a/TypeScript/20CustomChatBot/types/services/BotNameService.d.ts b/TypeScript/20CustomChatBot/types/services/BotNameService.d.ts index 056bd0f..349964d 100644 --- a/TypeScript/20CustomChatBot/types/services/BotNameService.d.ts +++ b/TypeScript/20CustomChatBot/types/services/BotNameService.d.ts @@ -1,5 +1,6 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; @@ -38,10 +39,13 @@ export declare class BotNameService { */ generateUniqueBotNickname(botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails, botRole: string, uniqueRoles?: string[]): string; /** - * Should this bot have a name like "name (Pmc Name)" - * @param botRole Role bot has - * @returns True if name should be simulated pscav + * Add random PMC name to bots MainProfileNickname property + * @param bot Bot to update */ - protected shouldSimulatePlayerScavName(botRole: string): boolean; - protected addPlayerScavNameSimulationSuffix(nickname: string): string; + addRandomPmcNameToBotMainProfileNicknameProperty(bot: IBotBase): void; + /** + * Choose a random PMC name from bear or usec bot jsons + * @returns PMC name as string + */ + protected getRandomPMCName(): string; } diff --git a/TypeScript/20CustomChatBot/types/services/DatabaseService.d.ts b/TypeScript/20CustomChatBot/types/services/DatabaseService.d.ts index 934617a..73575b1 100644 --- a/TypeScript/20CustomChatBot/types/services/DatabaseService.d.ts +++ b/TypeScript/20CustomChatBot/types/services/DatabaseService.d.ts @@ -85,7 +85,7 @@ export declare class DatabaseService { */ getCustomization(): Record; /** - * @returns assets/database/templates/items.json + * @returns assets/database/templates/handbook.json */ getHandbook(): IHandbookBase; /** @@ -101,7 +101,7 @@ export declare class DatabaseService { */ getProfiles(): IProfileTemplates; /** - * @returns assets/database/templates/items.json + * @returns assets/database/templates/quests.json */ getQuests(): Record; /** diff --git a/TypeScript/20CustomChatBot/types/services/InsuranceService.d.ts b/TypeScript/20CustomChatBot/types/services/InsuranceService.d.ts index ac9cff5..e52fa59 100644 --- a/TypeScript/20CustomChatBot/types/services/InsuranceService.d.ts +++ b/TypeScript/20CustomChatBot/types/services/InsuranceService.d.ts @@ -62,14 +62,6 @@ export declare class InsuranceService { * @returns Timestamp to return items to player in seconds */ protected getInsuranceReturnTimestamp(pmcData: IPmcData, trader: ITraderBase): number; - /** - * Take the insurance item packages within a profile session and ensure that each of the items in that package are - * not orphaned from their parent ID. - * - * @param sessionID The session ID to update insurance equipment packages in. - * @returns void - */ - protected adoptOrphanedInsEquipment(sessionID: string): void; protected getMaxInsuranceStorageTime(traderBase: ITraderBase): number; /** * Store lost gear post-raid inside profile, ready for later code to pick it up and mail it @@ -127,10 +119,4 @@ export declare class InsuranceService { * @returns price in roubles */ getRoublePriceToInsureItemWithTrader(pmcData: IPmcData, inventoryItem: IItem, traderId: string): number; - /** - * Returns the ID that should be used for a root-level Item's parentId property value within in the context of insurance. - * @param sessionID Players id - * @returns The root item Id. - */ - getRootItemParentID(sessionID: string): string; } diff --git a/TypeScript/20CustomChatBot/types/services/PaymentService.d.ts b/TypeScript/20CustomChatBot/types/services/PaymentService.d.ts index f6ec79d..78fdfb6 100644 --- a/TypeScript/20CustomChatBot/types/services/PaymentService.d.ts +++ b/TypeScript/20CustomChatBot/types/services/PaymentService.d.ts @@ -8,7 +8,9 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IProcessBuyTradeRequestData } from "@spt/models/eft/trade/IProcessBuyTradeRequestData"; import { IProcessSellTradeRequestData } from "@spt/models/eft/trade/IProcessSellTradeRequestData"; +import { IInventoryConfig } from "@spt/models/spt/config/IInventoryConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { HashUtil } from "@spt/utils/HashUtil"; @@ -24,7 +26,9 @@ export declare class PaymentService { protected inventoryHelper: InventoryHelper; protected localisationService: LocalisationService; protected paymentHelper: PaymentHelper; - constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper); + protected configServer: ConfigServer; + protected inventoryConfig: IInventoryConfig; + constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper, configServer: ConfigServer); /** * Take money and insert items into return to server request * @param pmcData Pmc profile diff --git a/TypeScript/20CustomChatBot/types/services/PostDbLoadService.d.ts b/TypeScript/20CustomChatBot/types/services/PostDbLoadService.d.ts index c9e4bbe..cc51311 100644 --- a/TypeScript/20CustomChatBot/types/services/PostDbLoadService.d.ts +++ b/TypeScript/20CustomChatBot/types/services/PostDbLoadService.d.ts @@ -74,4 +74,6 @@ export declare class PostDbLoadService { */ protected validateQuestAssortUnlocksExist(): void; protected setAllDbItemsAsSellableOnFlea(): void; + protected addMissingTraderBuyRestrictionMaxValue(): void; + protected applyFleaPriceOverrides(): void; } diff --git a/TypeScript/20CustomChatBot/types/services/ProfileFixerService.d.ts b/TypeScript/20CustomChatBot/types/services/ProfileFixerService.d.ts index 4a3a5ff..cbbe1d0 100644 --- a/TypeScript/20CustomChatBot/types/services/ProfileFixerService.d.ts +++ b/TypeScript/20CustomChatBot/types/services/ProfileFixerService.d.ts @@ -47,6 +47,12 @@ export declare class ProfileFixerService { * @param pmcProfile profile to check and fix */ checkForAndFixPmcProfileIssues(pmcProfile: IPmcData): void; + /** + * Resolve any dialogue attachments that were accidentally created using the player's equipment ID as + * the stash root object ID + * @param fullProfile + */ + checkForAndFixDialogueAttachments(fullProfile: ISptProfile): void; /** * Find issues in the scav profile data that may cause issues * @param scavProfile profile to check and fix diff --git a/TypeScript/20CustomChatBot/types/services/SeasonalEventService.d.ts b/TypeScript/20CustomChatBot/types/services/SeasonalEventService.d.ts index 446cccc..26b74ef 100644 --- a/TypeScript/20CustomChatBot/types/services/SeasonalEventService.d.ts +++ b/TypeScript/20CustomChatBot/types/services/SeasonalEventService.d.ts @@ -88,6 +88,12 @@ export declare class SeasonalEventService { * @returns bots with equipment changes */ protected getEventBotGear(eventType: SeasonalEventType): Record>>; + /** + * Get a dictionary of loot changes to apply to bots for a specific event e.g. Christmas/Halloween + * @param eventName Name of event to get gear changes for + * @returns bots with loot changes + */ + protected getEventBotLoot(eventType: SeasonalEventType): Record>>; /** * Get the dates each seasonal event starts and ends at * @returns Record with event name + start/end date @@ -108,7 +114,7 @@ export declare class SeasonalEventService { /** * Store active events inside class array property `currentlyActiveEvents` + set class properties: christmasEventActive/halloweenEventActive */ - protected cacheActiveEvents(): void; + cacheActiveEvents(): void; /** * Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER * @returns Season enum value @@ -171,6 +177,11 @@ export declare class SeasonalEventService { * @param eventName Name of the event to read equipment in from config */ protected addEventGearToBots(eventType: SeasonalEventType): void; + /** + * Read in data from seasonalEvents.json and add found loot items to bots + * @param eventName Name of the event to read loot in from config + */ + protected addEventLootToBots(eventType: SeasonalEventType): void; /** * Add pumpkin loot boxes to scavs */ diff --git a/TypeScript/20CustomChatBot/types/utils/App.d.ts b/TypeScript/20CustomChatBot/types/utils/App.d.ts index db46d2c..0e4850e 100644 --- a/TypeScript/20CustomChatBot/types/utils/App.d.ts +++ b/TypeScript/20CustomChatBot/types/utils/App.d.ts @@ -4,10 +4,10 @@ import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { HttpServer } from "@spt/servers/HttpServer"; -import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { EncodingUtil } from "@spt/utils/EncodingUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; +import { DatabaseService } from "@spt/services/DatabaseService"; export declare class App { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/20CustomChatBot/types/utils/ProgressWriter.d.ts b/TypeScript/20CustomChatBot/types/utils/ProgressWriter.d.ts new file mode 100644 index 0000000..2641d3a --- /dev/null +++ b/TypeScript/20CustomChatBot/types/utils/ProgressWriter.d.ts @@ -0,0 +1,13 @@ +export declare class ProgressWriter { + private count; + private total?; + private done; + private barFillChar; + private barEmptyChar; + private maxBarLength; + constructor(total: number, maxBarLength?: number, barFillChar?: string, barEmptyChar?: string); + /** + * Increment the progress counter and update the progress bar display. + */ + increment(): void; +} diff --git a/TypeScript/21CustomCommandoCommand/types/generators/BotGenerator.d.ts b/TypeScript/21CustomCommandoCommand/types/generators/BotGenerator.d.ts index 2c7bba6..a2291f4 100644 --- a/TypeScript/21CustomCommandoCommand/types/generators/BotGenerator.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/generators/BotGenerator.d.ts @@ -5,6 +5,7 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { MinMax } from "@spt/models/common/MinMax"; +import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase"; import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; @@ -47,9 +48,10 @@ export declare class BotGenerator { * @param role e.g. assault / pmcbot * @param difficulty easy/normal/hard/impossible * @param botTemplate base bot template to use (e.g. assault/pmcbot) - * @returns + * profile PMC profile of player generating pscav + * @returns IBotBase */ - generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase; + generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType, profile: IPmcData): IBotBase; /** * Create 1 bot of the type/side/difficulty defined in botGenerationDetails * @param sessionId Session id @@ -79,6 +81,12 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; + /** + * Should this bot have a name like "name (Pmc Name)" and be alterd by client patch to be hostile to player + * @param botRole Role bot has + * @returns True if name should be simulated pscav + */ + protected shouldSimulatePlayerScav(botRole: string): boolean; /** * Get exp for kill by bot difficulty * @param experience Dict of difficulties and experience diff --git a/TypeScript/21CustomCommandoCommand/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/21CustomCommandoCommand/types/helpers/RagfairOfferHelper.d.ts index 9dd5be3..0ff9c66 100644 --- a/TypeScript/21CustomCommandoCommand/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/helpers/RagfairOfferHelper.d.ts @@ -91,6 +91,12 @@ export declare class RagfairOfferHelper { * @returns IRagfairOffer array */ getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcData: IPmcData): IRagfairOffer[]; + /** + * Get offers that have not exceeded buy limits + * @param possibleOffers offers to process + * @returns Offers + */ + protected getOffersInsideBuyRestrictionLimits(possibleOffers: IRagfairOffer[]): IRagfairOffer[]; /** * Check if offer is from trader standing the player does not have * @param offer Offer to check @@ -209,4 +215,10 @@ export declare class RagfairOfferHelper { * @returns True if in range */ protected itemQualityInRange(item: IItem, min: number, max: number): boolean; + /** + * Does this offer come from a trader + * @param offer Offer to check + * @returns True = from trader + */ + offerIsFromTrader(offer: IRagfairOffer): boolean; } diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/common/tables/IBotBase.d.ts index d3fd87e..8609573 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/common/tables/IBotBase.d.ts @@ -60,6 +60,7 @@ export interface IUnlockedInfo { export interface IInfo { EntryPoint: string; Nickname: string; + MainProfileNickname?: string; LowerNickname: string; Side: string; SquadInviteRestriction: boolean; diff --git a/TypeScript/21CustomCommandoCommand/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/21CustomCommandoCommand/types/models/spt/config/IInventoryConfig.d.ts index af0ec79..00ba5b1 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/spt/config/IInventoryConfig.d.ts @@ -10,6 +10,8 @@ export interface IInventoryConfig extends IBaseConfig { customMoneyTpls: string[]; /** Multipliers for skill gain when inside menus, NOT in-game */ skillGainMultiplers: Record; + /** Container Tpls that shoud be deprioritised when choosing where to take money from for payments */ + deprioritisedMoneyContainers: string[]; } export interface IRewardDetails { rewardCount: number; diff --git a/TypeScript/21CustomCommandoCommand/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/21CustomCommandoCommand/types/models/spt/config/IPmcConfig.d.ts index 2e68219..02c9c5b 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/spt/config/IPmcConfig.d.ts @@ -66,7 +66,9 @@ export interface IPmcTypes { bear: string; } export interface ISlotLootSettings { + /** Item Type whitelist */ whitelist: string[]; + /** item tpl blacklist */ blacklist: string[]; } export interface IMinMaxLootValue extends MinMax { diff --git a/TypeScript/21CustomCommandoCommand/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/21CustomCommandoCommand/types/models/spt/config/IRagfairConfig.d.ts index 36122c5..805a6b2 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/spt/config/IRagfairConfig.d.ts @@ -75,6 +75,8 @@ export interface IDynamic { blacklist: IRagfairBlacklist; /** Dict of price limits keyed by item type */ unreasonableModPrices: Record; + /** Custom rouble prices for items to override values from prices.json */ + itemPriceOverrideRouble: Record; } export interface IPriceRanges { default: MinMax; diff --git a/TypeScript/21CustomCommandoCommand/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/21CustomCommandoCommand/types/models/spt/config/ISeasonalEventConfig.d.ts index 5e119fa..bf93685 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -6,6 +6,8 @@ export interface ISeasonalEventConfig extends IBaseConfig { enableSeasonalEventDetection: boolean; /** event / botType / equipSlot / itemid */ eventGear: Record>>>; + /** event / bot type / equipSlot / itemid */ + eventLoot: Record>>>; events: ISeasonalEvent[]; eventBotMapping: Record; eventBossSpawns: Record>; diff --git a/TypeScript/21CustomCommandoCommand/types/services/BotNameService.d.ts b/TypeScript/21CustomCommandoCommand/types/services/BotNameService.d.ts index 056bd0f..349964d 100644 --- a/TypeScript/21CustomCommandoCommand/types/services/BotNameService.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/services/BotNameService.d.ts @@ -1,5 +1,6 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; @@ -38,10 +39,13 @@ export declare class BotNameService { */ generateUniqueBotNickname(botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails, botRole: string, uniqueRoles?: string[]): string; /** - * Should this bot have a name like "name (Pmc Name)" - * @param botRole Role bot has - * @returns True if name should be simulated pscav + * Add random PMC name to bots MainProfileNickname property + * @param bot Bot to update */ - protected shouldSimulatePlayerScavName(botRole: string): boolean; - protected addPlayerScavNameSimulationSuffix(nickname: string): string; + addRandomPmcNameToBotMainProfileNicknameProperty(bot: IBotBase): void; + /** + * Choose a random PMC name from bear or usec bot jsons + * @returns PMC name as string + */ + protected getRandomPMCName(): string; } diff --git a/TypeScript/21CustomCommandoCommand/types/services/DatabaseService.d.ts b/TypeScript/21CustomCommandoCommand/types/services/DatabaseService.d.ts index 934617a..73575b1 100644 --- a/TypeScript/21CustomCommandoCommand/types/services/DatabaseService.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/services/DatabaseService.d.ts @@ -85,7 +85,7 @@ export declare class DatabaseService { */ getCustomization(): Record; /** - * @returns assets/database/templates/items.json + * @returns assets/database/templates/handbook.json */ getHandbook(): IHandbookBase; /** @@ -101,7 +101,7 @@ export declare class DatabaseService { */ getProfiles(): IProfileTemplates; /** - * @returns assets/database/templates/items.json + * @returns assets/database/templates/quests.json */ getQuests(): Record; /** diff --git a/TypeScript/21CustomCommandoCommand/types/services/InsuranceService.d.ts b/TypeScript/21CustomCommandoCommand/types/services/InsuranceService.d.ts index ac9cff5..e52fa59 100644 --- a/TypeScript/21CustomCommandoCommand/types/services/InsuranceService.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/services/InsuranceService.d.ts @@ -62,14 +62,6 @@ export declare class InsuranceService { * @returns Timestamp to return items to player in seconds */ protected getInsuranceReturnTimestamp(pmcData: IPmcData, trader: ITraderBase): number; - /** - * Take the insurance item packages within a profile session and ensure that each of the items in that package are - * not orphaned from their parent ID. - * - * @param sessionID The session ID to update insurance equipment packages in. - * @returns void - */ - protected adoptOrphanedInsEquipment(sessionID: string): void; protected getMaxInsuranceStorageTime(traderBase: ITraderBase): number; /** * Store lost gear post-raid inside profile, ready for later code to pick it up and mail it @@ -127,10 +119,4 @@ export declare class InsuranceService { * @returns price in roubles */ getRoublePriceToInsureItemWithTrader(pmcData: IPmcData, inventoryItem: IItem, traderId: string): number; - /** - * Returns the ID that should be used for a root-level Item's parentId property value within in the context of insurance. - * @param sessionID Players id - * @returns The root item Id. - */ - getRootItemParentID(sessionID: string): string; } diff --git a/TypeScript/21CustomCommandoCommand/types/services/PaymentService.d.ts b/TypeScript/21CustomCommandoCommand/types/services/PaymentService.d.ts index f6ec79d..78fdfb6 100644 --- a/TypeScript/21CustomCommandoCommand/types/services/PaymentService.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/services/PaymentService.d.ts @@ -8,7 +8,9 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IProcessBuyTradeRequestData } from "@spt/models/eft/trade/IProcessBuyTradeRequestData"; import { IProcessSellTradeRequestData } from "@spt/models/eft/trade/IProcessSellTradeRequestData"; +import { IInventoryConfig } from "@spt/models/spt/config/IInventoryConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { HashUtil } from "@spt/utils/HashUtil"; @@ -24,7 +26,9 @@ export declare class PaymentService { protected inventoryHelper: InventoryHelper; protected localisationService: LocalisationService; protected paymentHelper: PaymentHelper; - constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper); + protected configServer: ConfigServer; + protected inventoryConfig: IInventoryConfig; + constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper, configServer: ConfigServer); /** * Take money and insert items into return to server request * @param pmcData Pmc profile diff --git a/TypeScript/21CustomCommandoCommand/types/services/PostDbLoadService.d.ts b/TypeScript/21CustomCommandoCommand/types/services/PostDbLoadService.d.ts index c9e4bbe..cc51311 100644 --- a/TypeScript/21CustomCommandoCommand/types/services/PostDbLoadService.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/services/PostDbLoadService.d.ts @@ -74,4 +74,6 @@ export declare class PostDbLoadService { */ protected validateQuestAssortUnlocksExist(): void; protected setAllDbItemsAsSellableOnFlea(): void; + protected addMissingTraderBuyRestrictionMaxValue(): void; + protected applyFleaPriceOverrides(): void; } diff --git a/TypeScript/21CustomCommandoCommand/types/services/ProfileFixerService.d.ts b/TypeScript/21CustomCommandoCommand/types/services/ProfileFixerService.d.ts index 4a3a5ff..cbbe1d0 100644 --- a/TypeScript/21CustomCommandoCommand/types/services/ProfileFixerService.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/services/ProfileFixerService.d.ts @@ -47,6 +47,12 @@ export declare class ProfileFixerService { * @param pmcProfile profile to check and fix */ checkForAndFixPmcProfileIssues(pmcProfile: IPmcData): void; + /** + * Resolve any dialogue attachments that were accidentally created using the player's equipment ID as + * the stash root object ID + * @param fullProfile + */ + checkForAndFixDialogueAttachments(fullProfile: ISptProfile): void; /** * Find issues in the scav profile data that may cause issues * @param scavProfile profile to check and fix diff --git a/TypeScript/21CustomCommandoCommand/types/services/SeasonalEventService.d.ts b/TypeScript/21CustomCommandoCommand/types/services/SeasonalEventService.d.ts index 446cccc..26b74ef 100644 --- a/TypeScript/21CustomCommandoCommand/types/services/SeasonalEventService.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/services/SeasonalEventService.d.ts @@ -88,6 +88,12 @@ export declare class SeasonalEventService { * @returns bots with equipment changes */ protected getEventBotGear(eventType: SeasonalEventType): Record>>; + /** + * Get a dictionary of loot changes to apply to bots for a specific event e.g. Christmas/Halloween + * @param eventName Name of event to get gear changes for + * @returns bots with loot changes + */ + protected getEventBotLoot(eventType: SeasonalEventType): Record>>; /** * Get the dates each seasonal event starts and ends at * @returns Record with event name + start/end date @@ -108,7 +114,7 @@ export declare class SeasonalEventService { /** * Store active events inside class array property `currentlyActiveEvents` + set class properties: christmasEventActive/halloweenEventActive */ - protected cacheActiveEvents(): void; + cacheActiveEvents(): void; /** * Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER * @returns Season enum value @@ -171,6 +177,11 @@ export declare class SeasonalEventService { * @param eventName Name of the event to read equipment in from config */ protected addEventGearToBots(eventType: SeasonalEventType): void; + /** + * Read in data from seasonalEvents.json and add found loot items to bots + * @param eventName Name of the event to read loot in from config + */ + protected addEventLootToBots(eventType: SeasonalEventType): void; /** * Add pumpkin loot boxes to scavs */ diff --git a/TypeScript/21CustomCommandoCommand/types/utils/App.d.ts b/TypeScript/21CustomCommandoCommand/types/utils/App.d.ts index db46d2c..0e4850e 100644 --- a/TypeScript/21CustomCommandoCommand/types/utils/App.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/utils/App.d.ts @@ -4,10 +4,10 @@ import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { HttpServer } from "@spt/servers/HttpServer"; -import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { EncodingUtil } from "@spt/utils/EncodingUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; +import { DatabaseService } from "@spt/services/DatabaseService"; export declare class App { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/21CustomCommandoCommand/types/utils/ProgressWriter.d.ts b/TypeScript/21CustomCommandoCommand/types/utils/ProgressWriter.d.ts new file mode 100644 index 0000000..2641d3a --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/utils/ProgressWriter.d.ts @@ -0,0 +1,13 @@ +export declare class ProgressWriter { + private count; + private total?; + private done; + private barFillChar; + private barEmptyChar; + private maxBarLength; + constructor(total: number, maxBarLength?: number, barFillChar?: string, barEmptyChar?: string); + /** + * Increment the progress counter and update the progress bar display. + */ + increment(): void; +} diff --git a/TypeScript/22CustomSptCommand/types/generators/BotGenerator.d.ts b/TypeScript/22CustomSptCommand/types/generators/BotGenerator.d.ts index 2c7bba6..a2291f4 100644 --- a/TypeScript/22CustomSptCommand/types/generators/BotGenerator.d.ts +++ b/TypeScript/22CustomSptCommand/types/generators/BotGenerator.d.ts @@ -5,6 +5,7 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { MinMax } from "@spt/models/common/MinMax"; +import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase"; import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; @@ -47,9 +48,10 @@ export declare class BotGenerator { * @param role e.g. assault / pmcbot * @param difficulty easy/normal/hard/impossible * @param botTemplate base bot template to use (e.g. assault/pmcbot) - * @returns + * profile PMC profile of player generating pscav + * @returns IBotBase */ - generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase; + generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType, profile: IPmcData): IBotBase; /** * Create 1 bot of the type/side/difficulty defined in botGenerationDetails * @param sessionId Session id @@ -79,6 +81,12 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; + /** + * Should this bot have a name like "name (Pmc Name)" and be alterd by client patch to be hostile to player + * @param botRole Role bot has + * @returns True if name should be simulated pscav + */ + protected shouldSimulatePlayerScav(botRole: string): boolean; /** * Get exp for kill by bot difficulty * @param experience Dict of difficulties and experience diff --git a/TypeScript/22CustomSptCommand/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/22CustomSptCommand/types/helpers/RagfairOfferHelper.d.ts index 9dd5be3..0ff9c66 100644 --- a/TypeScript/22CustomSptCommand/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/22CustomSptCommand/types/helpers/RagfairOfferHelper.d.ts @@ -91,6 +91,12 @@ export declare class RagfairOfferHelper { * @returns IRagfairOffer array */ getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcData: IPmcData): IRagfairOffer[]; + /** + * Get offers that have not exceeded buy limits + * @param possibleOffers offers to process + * @returns Offers + */ + protected getOffersInsideBuyRestrictionLimits(possibleOffers: IRagfairOffer[]): IRagfairOffer[]; /** * Check if offer is from trader standing the player does not have * @param offer Offer to check @@ -209,4 +215,10 @@ export declare class RagfairOfferHelper { * @returns True if in range */ protected itemQualityInRange(item: IItem, min: number, max: number): boolean; + /** + * Does this offer come from a trader + * @param offer Offer to check + * @returns True = from trader + */ + offerIsFromTrader(offer: IRagfairOffer): boolean; } diff --git a/TypeScript/22CustomSptCommand/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/22CustomSptCommand/types/models/eft/common/tables/IBotBase.d.ts index d3fd87e..8609573 100644 --- a/TypeScript/22CustomSptCommand/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/eft/common/tables/IBotBase.d.ts @@ -60,6 +60,7 @@ export interface IUnlockedInfo { export interface IInfo { EntryPoint: string; Nickname: string; + MainProfileNickname?: string; LowerNickname: string; Side: string; SquadInviteRestriction: boolean; diff --git a/TypeScript/22CustomSptCommand/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/config/IInventoryConfig.d.ts index af0ec79..00ba5b1 100644 --- a/TypeScript/22CustomSptCommand/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/spt/config/IInventoryConfig.d.ts @@ -10,6 +10,8 @@ export interface IInventoryConfig extends IBaseConfig { customMoneyTpls: string[]; /** Multipliers for skill gain when inside menus, NOT in-game */ skillGainMultiplers: Record; + /** Container Tpls that shoud be deprioritised when choosing where to take money from for payments */ + deprioritisedMoneyContainers: string[]; } export interface IRewardDetails { rewardCount: number; diff --git a/TypeScript/22CustomSptCommand/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/config/IPmcConfig.d.ts index 2e68219..02c9c5b 100644 --- a/TypeScript/22CustomSptCommand/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/spt/config/IPmcConfig.d.ts @@ -66,7 +66,9 @@ export interface IPmcTypes { bear: string; } export interface ISlotLootSettings { + /** Item Type whitelist */ whitelist: string[]; + /** item tpl blacklist */ blacklist: string[]; } export interface IMinMaxLootValue extends MinMax { diff --git a/TypeScript/22CustomSptCommand/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/config/IRagfairConfig.d.ts index 36122c5..805a6b2 100644 --- a/TypeScript/22CustomSptCommand/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/spt/config/IRagfairConfig.d.ts @@ -75,6 +75,8 @@ export interface IDynamic { blacklist: IRagfairBlacklist; /** Dict of price limits keyed by item type */ unreasonableModPrices: Record; + /** Custom rouble prices for items to override values from prices.json */ + itemPriceOverrideRouble: Record; } export interface IPriceRanges { default: MinMax; diff --git a/TypeScript/22CustomSptCommand/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/22CustomSptCommand/types/models/spt/config/ISeasonalEventConfig.d.ts index 5e119fa..bf93685 100644 --- a/TypeScript/22CustomSptCommand/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/22CustomSptCommand/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -6,6 +6,8 @@ export interface ISeasonalEventConfig extends IBaseConfig { enableSeasonalEventDetection: boolean; /** event / botType / equipSlot / itemid */ eventGear: Record>>>; + /** event / bot type / equipSlot / itemid */ + eventLoot: Record>>>; events: ISeasonalEvent[]; eventBotMapping: Record; eventBossSpawns: Record>; diff --git a/TypeScript/22CustomSptCommand/types/services/BotNameService.d.ts b/TypeScript/22CustomSptCommand/types/services/BotNameService.d.ts index 056bd0f..349964d 100644 --- a/TypeScript/22CustomSptCommand/types/services/BotNameService.d.ts +++ b/TypeScript/22CustomSptCommand/types/services/BotNameService.d.ts @@ -1,5 +1,6 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; @@ -38,10 +39,13 @@ export declare class BotNameService { */ generateUniqueBotNickname(botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails, botRole: string, uniqueRoles?: string[]): string; /** - * Should this bot have a name like "name (Pmc Name)" - * @param botRole Role bot has - * @returns True if name should be simulated pscav + * Add random PMC name to bots MainProfileNickname property + * @param bot Bot to update */ - protected shouldSimulatePlayerScavName(botRole: string): boolean; - protected addPlayerScavNameSimulationSuffix(nickname: string): string; + addRandomPmcNameToBotMainProfileNicknameProperty(bot: IBotBase): void; + /** + * Choose a random PMC name from bear or usec bot jsons + * @returns PMC name as string + */ + protected getRandomPMCName(): string; } diff --git a/TypeScript/22CustomSptCommand/types/services/DatabaseService.d.ts b/TypeScript/22CustomSptCommand/types/services/DatabaseService.d.ts index 934617a..73575b1 100644 --- a/TypeScript/22CustomSptCommand/types/services/DatabaseService.d.ts +++ b/TypeScript/22CustomSptCommand/types/services/DatabaseService.d.ts @@ -85,7 +85,7 @@ export declare class DatabaseService { */ getCustomization(): Record; /** - * @returns assets/database/templates/items.json + * @returns assets/database/templates/handbook.json */ getHandbook(): IHandbookBase; /** @@ -101,7 +101,7 @@ export declare class DatabaseService { */ getProfiles(): IProfileTemplates; /** - * @returns assets/database/templates/items.json + * @returns assets/database/templates/quests.json */ getQuests(): Record; /** diff --git a/TypeScript/22CustomSptCommand/types/services/InsuranceService.d.ts b/TypeScript/22CustomSptCommand/types/services/InsuranceService.d.ts index ac9cff5..e52fa59 100644 --- a/TypeScript/22CustomSptCommand/types/services/InsuranceService.d.ts +++ b/TypeScript/22CustomSptCommand/types/services/InsuranceService.d.ts @@ -62,14 +62,6 @@ export declare class InsuranceService { * @returns Timestamp to return items to player in seconds */ protected getInsuranceReturnTimestamp(pmcData: IPmcData, trader: ITraderBase): number; - /** - * Take the insurance item packages within a profile session and ensure that each of the items in that package are - * not orphaned from their parent ID. - * - * @param sessionID The session ID to update insurance equipment packages in. - * @returns void - */ - protected adoptOrphanedInsEquipment(sessionID: string): void; protected getMaxInsuranceStorageTime(traderBase: ITraderBase): number; /** * Store lost gear post-raid inside profile, ready for later code to pick it up and mail it @@ -127,10 +119,4 @@ export declare class InsuranceService { * @returns price in roubles */ getRoublePriceToInsureItemWithTrader(pmcData: IPmcData, inventoryItem: IItem, traderId: string): number; - /** - * Returns the ID that should be used for a root-level Item's parentId property value within in the context of insurance. - * @param sessionID Players id - * @returns The root item Id. - */ - getRootItemParentID(sessionID: string): string; } diff --git a/TypeScript/22CustomSptCommand/types/services/PaymentService.d.ts b/TypeScript/22CustomSptCommand/types/services/PaymentService.d.ts index f6ec79d..78fdfb6 100644 --- a/TypeScript/22CustomSptCommand/types/services/PaymentService.d.ts +++ b/TypeScript/22CustomSptCommand/types/services/PaymentService.d.ts @@ -8,7 +8,9 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IProcessBuyTradeRequestData } from "@spt/models/eft/trade/IProcessBuyTradeRequestData"; import { IProcessSellTradeRequestData } from "@spt/models/eft/trade/IProcessSellTradeRequestData"; +import { IInventoryConfig } from "@spt/models/spt/config/IInventoryConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { HashUtil } from "@spt/utils/HashUtil"; @@ -24,7 +26,9 @@ export declare class PaymentService { protected inventoryHelper: InventoryHelper; protected localisationService: LocalisationService; protected paymentHelper: PaymentHelper; - constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper); + protected configServer: ConfigServer; + protected inventoryConfig: IInventoryConfig; + constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper, configServer: ConfigServer); /** * Take money and insert items into return to server request * @param pmcData Pmc profile diff --git a/TypeScript/22CustomSptCommand/types/services/PostDbLoadService.d.ts b/TypeScript/22CustomSptCommand/types/services/PostDbLoadService.d.ts index c9e4bbe..cc51311 100644 --- a/TypeScript/22CustomSptCommand/types/services/PostDbLoadService.d.ts +++ b/TypeScript/22CustomSptCommand/types/services/PostDbLoadService.d.ts @@ -74,4 +74,6 @@ export declare class PostDbLoadService { */ protected validateQuestAssortUnlocksExist(): void; protected setAllDbItemsAsSellableOnFlea(): void; + protected addMissingTraderBuyRestrictionMaxValue(): void; + protected applyFleaPriceOverrides(): void; } diff --git a/TypeScript/22CustomSptCommand/types/services/ProfileFixerService.d.ts b/TypeScript/22CustomSptCommand/types/services/ProfileFixerService.d.ts index 4a3a5ff..cbbe1d0 100644 --- a/TypeScript/22CustomSptCommand/types/services/ProfileFixerService.d.ts +++ b/TypeScript/22CustomSptCommand/types/services/ProfileFixerService.d.ts @@ -47,6 +47,12 @@ export declare class ProfileFixerService { * @param pmcProfile profile to check and fix */ checkForAndFixPmcProfileIssues(pmcProfile: IPmcData): void; + /** + * Resolve any dialogue attachments that were accidentally created using the player's equipment ID as + * the stash root object ID + * @param fullProfile + */ + checkForAndFixDialogueAttachments(fullProfile: ISptProfile): void; /** * Find issues in the scav profile data that may cause issues * @param scavProfile profile to check and fix diff --git a/TypeScript/22CustomSptCommand/types/services/SeasonalEventService.d.ts b/TypeScript/22CustomSptCommand/types/services/SeasonalEventService.d.ts index 446cccc..26b74ef 100644 --- a/TypeScript/22CustomSptCommand/types/services/SeasonalEventService.d.ts +++ b/TypeScript/22CustomSptCommand/types/services/SeasonalEventService.d.ts @@ -88,6 +88,12 @@ export declare class SeasonalEventService { * @returns bots with equipment changes */ protected getEventBotGear(eventType: SeasonalEventType): Record>>; + /** + * Get a dictionary of loot changes to apply to bots for a specific event e.g. Christmas/Halloween + * @param eventName Name of event to get gear changes for + * @returns bots with loot changes + */ + protected getEventBotLoot(eventType: SeasonalEventType): Record>>; /** * Get the dates each seasonal event starts and ends at * @returns Record with event name + start/end date @@ -108,7 +114,7 @@ export declare class SeasonalEventService { /** * Store active events inside class array property `currentlyActiveEvents` + set class properties: christmasEventActive/halloweenEventActive */ - protected cacheActiveEvents(): void; + cacheActiveEvents(): void; /** * Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER * @returns Season enum value @@ -171,6 +177,11 @@ export declare class SeasonalEventService { * @param eventName Name of the event to read equipment in from config */ protected addEventGearToBots(eventType: SeasonalEventType): void; + /** + * Read in data from seasonalEvents.json and add found loot items to bots + * @param eventName Name of the event to read loot in from config + */ + protected addEventLootToBots(eventType: SeasonalEventType): void; /** * Add pumpkin loot boxes to scavs */ diff --git a/TypeScript/22CustomSptCommand/types/utils/App.d.ts b/TypeScript/22CustomSptCommand/types/utils/App.d.ts index db46d2c..0e4850e 100644 --- a/TypeScript/22CustomSptCommand/types/utils/App.d.ts +++ b/TypeScript/22CustomSptCommand/types/utils/App.d.ts @@ -4,10 +4,10 @@ import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { HttpServer } from "@spt/servers/HttpServer"; -import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { EncodingUtil } from "@spt/utils/EncodingUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; +import { DatabaseService } from "@spt/services/DatabaseService"; export declare class App { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/22CustomSptCommand/types/utils/ProgressWriter.d.ts b/TypeScript/22CustomSptCommand/types/utils/ProgressWriter.d.ts new file mode 100644 index 0000000..2641d3a --- /dev/null +++ b/TypeScript/22CustomSptCommand/types/utils/ProgressWriter.d.ts @@ -0,0 +1,13 @@ +export declare class ProgressWriter { + private count; + private total?; + private done; + private barFillChar; + private barEmptyChar; + private maxBarLength; + constructor(total: number, maxBarLength?: number, barFillChar?: string, barEmptyChar?: string); + /** + * Increment the progress counter and update the progress bar display. + */ + increment(): void; +} diff --git a/TypeScript/23CustomAbstractChatBot/types/generators/BotGenerator.d.ts b/TypeScript/23CustomAbstractChatBot/types/generators/BotGenerator.d.ts index 2c7bba6..a2291f4 100644 --- a/TypeScript/23CustomAbstractChatBot/types/generators/BotGenerator.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/generators/BotGenerator.d.ts @@ -5,6 +5,7 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { MinMax } from "@spt/models/common/MinMax"; +import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase"; import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; @@ -47,9 +48,10 @@ export declare class BotGenerator { * @param role e.g. assault / pmcbot * @param difficulty easy/normal/hard/impossible * @param botTemplate base bot template to use (e.g. assault/pmcbot) - * @returns + * profile PMC profile of player generating pscav + * @returns IBotBase */ - generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase; + generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType, profile: IPmcData): IBotBase; /** * Create 1 bot of the type/side/difficulty defined in botGenerationDetails * @param sessionId Session id @@ -79,6 +81,12 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; + /** + * Should this bot have a name like "name (Pmc Name)" and be alterd by client patch to be hostile to player + * @param botRole Role bot has + * @returns True if name should be simulated pscav + */ + protected shouldSimulatePlayerScav(botRole: string): boolean; /** * Get exp for kill by bot difficulty * @param experience Dict of difficulties and experience diff --git a/TypeScript/23CustomAbstractChatBot/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/23CustomAbstractChatBot/types/helpers/RagfairOfferHelper.d.ts index 9dd5be3..0ff9c66 100644 --- a/TypeScript/23CustomAbstractChatBot/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/helpers/RagfairOfferHelper.d.ts @@ -91,6 +91,12 @@ export declare class RagfairOfferHelper { * @returns IRagfairOffer array */ getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcData: IPmcData): IRagfairOffer[]; + /** + * Get offers that have not exceeded buy limits + * @param possibleOffers offers to process + * @returns Offers + */ + protected getOffersInsideBuyRestrictionLimits(possibleOffers: IRagfairOffer[]): IRagfairOffer[]; /** * Check if offer is from trader standing the player does not have * @param offer Offer to check @@ -209,4 +215,10 @@ export declare class RagfairOfferHelper { * @returns True if in range */ protected itemQualityInRange(item: IItem, min: number, max: number): boolean; + /** + * Does this offer come from a trader + * @param offer Offer to check + * @returns True = from trader + */ + offerIsFromTrader(offer: IRagfairOffer): boolean; } diff --git a/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/IBotBase.d.ts index d3fd87e..8609573 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/eft/common/tables/IBotBase.d.ts @@ -60,6 +60,7 @@ export interface IUnlockedInfo { export interface IInfo { EntryPoint: string; Nickname: string; + MainProfileNickname?: string; LowerNickname: string; Side: string; SquadInviteRestriction: boolean; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IInventoryConfig.d.ts index af0ec79..00ba5b1 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IInventoryConfig.d.ts @@ -10,6 +10,8 @@ export interface IInventoryConfig extends IBaseConfig { customMoneyTpls: string[]; /** Multipliers for skill gain when inside menus, NOT in-game */ skillGainMultiplers: Record; + /** Container Tpls that shoud be deprioritised when choosing where to take money from for payments */ + deprioritisedMoneyContainers: string[]; } export interface IRewardDetails { rewardCount: number; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IPmcConfig.d.ts index 2e68219..02c9c5b 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IPmcConfig.d.ts @@ -66,7 +66,9 @@ export interface IPmcTypes { bear: string; } export interface ISlotLootSettings { + /** Item Type whitelist */ whitelist: string[]; + /** item tpl blacklist */ blacklist: string[]; } export interface IMinMaxLootValue extends MinMax { diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IRagfairConfig.d.ts index 36122c5..805a6b2 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/IRagfairConfig.d.ts @@ -75,6 +75,8 @@ export interface IDynamic { blacklist: IRagfairBlacklist; /** Dict of price limits keyed by item type */ unreasonableModPrices: Record; + /** Custom rouble prices for items to override values from prices.json */ + itemPriceOverrideRouble: Record; } export interface IPriceRanges { default: MinMax; diff --git a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/ISeasonalEventConfig.d.ts index 5e119fa..bf93685 100644 --- a/TypeScript/23CustomAbstractChatBot/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -6,6 +6,8 @@ export interface ISeasonalEventConfig extends IBaseConfig { enableSeasonalEventDetection: boolean; /** event / botType / equipSlot / itemid */ eventGear: Record>>>; + /** event / bot type / equipSlot / itemid */ + eventLoot: Record>>>; events: ISeasonalEvent[]; eventBotMapping: Record; eventBossSpawns: Record>; diff --git a/TypeScript/23CustomAbstractChatBot/types/services/BotNameService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/BotNameService.d.ts index 056bd0f..349964d 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/BotNameService.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/BotNameService.d.ts @@ -1,5 +1,6 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; @@ -38,10 +39,13 @@ export declare class BotNameService { */ generateUniqueBotNickname(botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails, botRole: string, uniqueRoles?: string[]): string; /** - * Should this bot have a name like "name (Pmc Name)" - * @param botRole Role bot has - * @returns True if name should be simulated pscav + * Add random PMC name to bots MainProfileNickname property + * @param bot Bot to update */ - protected shouldSimulatePlayerScavName(botRole: string): boolean; - protected addPlayerScavNameSimulationSuffix(nickname: string): string; + addRandomPmcNameToBotMainProfileNicknameProperty(bot: IBotBase): void; + /** + * Choose a random PMC name from bear or usec bot jsons + * @returns PMC name as string + */ + protected getRandomPMCName(): string; } diff --git a/TypeScript/23CustomAbstractChatBot/types/services/DatabaseService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/DatabaseService.d.ts index 934617a..73575b1 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/DatabaseService.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/DatabaseService.d.ts @@ -85,7 +85,7 @@ export declare class DatabaseService { */ getCustomization(): Record; /** - * @returns assets/database/templates/items.json + * @returns assets/database/templates/handbook.json */ getHandbook(): IHandbookBase; /** @@ -101,7 +101,7 @@ export declare class DatabaseService { */ getProfiles(): IProfileTemplates; /** - * @returns assets/database/templates/items.json + * @returns assets/database/templates/quests.json */ getQuests(): Record; /** diff --git a/TypeScript/23CustomAbstractChatBot/types/services/InsuranceService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/InsuranceService.d.ts index ac9cff5..e52fa59 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/InsuranceService.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/InsuranceService.d.ts @@ -62,14 +62,6 @@ export declare class InsuranceService { * @returns Timestamp to return items to player in seconds */ protected getInsuranceReturnTimestamp(pmcData: IPmcData, trader: ITraderBase): number; - /** - * Take the insurance item packages within a profile session and ensure that each of the items in that package are - * not orphaned from their parent ID. - * - * @param sessionID The session ID to update insurance equipment packages in. - * @returns void - */ - protected adoptOrphanedInsEquipment(sessionID: string): void; protected getMaxInsuranceStorageTime(traderBase: ITraderBase): number; /** * Store lost gear post-raid inside profile, ready for later code to pick it up and mail it @@ -127,10 +119,4 @@ export declare class InsuranceService { * @returns price in roubles */ getRoublePriceToInsureItemWithTrader(pmcData: IPmcData, inventoryItem: IItem, traderId: string): number; - /** - * Returns the ID that should be used for a root-level Item's parentId property value within in the context of insurance. - * @param sessionID Players id - * @returns The root item Id. - */ - getRootItemParentID(sessionID: string): string; } diff --git a/TypeScript/23CustomAbstractChatBot/types/services/PaymentService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/PaymentService.d.ts index f6ec79d..78fdfb6 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/PaymentService.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/PaymentService.d.ts @@ -8,7 +8,9 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IProcessBuyTradeRequestData } from "@spt/models/eft/trade/IProcessBuyTradeRequestData"; import { IProcessSellTradeRequestData } from "@spt/models/eft/trade/IProcessSellTradeRequestData"; +import { IInventoryConfig } from "@spt/models/spt/config/IInventoryConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { HashUtil } from "@spt/utils/HashUtil"; @@ -24,7 +26,9 @@ export declare class PaymentService { protected inventoryHelper: InventoryHelper; protected localisationService: LocalisationService; protected paymentHelper: PaymentHelper; - constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper); + protected configServer: ConfigServer; + protected inventoryConfig: IInventoryConfig; + constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper, configServer: ConfigServer); /** * Take money and insert items into return to server request * @param pmcData Pmc profile diff --git a/TypeScript/23CustomAbstractChatBot/types/services/PostDbLoadService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/PostDbLoadService.d.ts index c9e4bbe..cc51311 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/PostDbLoadService.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/PostDbLoadService.d.ts @@ -74,4 +74,6 @@ export declare class PostDbLoadService { */ protected validateQuestAssortUnlocksExist(): void; protected setAllDbItemsAsSellableOnFlea(): void; + protected addMissingTraderBuyRestrictionMaxValue(): void; + protected applyFleaPriceOverrides(): void; } diff --git a/TypeScript/23CustomAbstractChatBot/types/services/ProfileFixerService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/ProfileFixerService.d.ts index 4a3a5ff..cbbe1d0 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/ProfileFixerService.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/ProfileFixerService.d.ts @@ -47,6 +47,12 @@ export declare class ProfileFixerService { * @param pmcProfile profile to check and fix */ checkForAndFixPmcProfileIssues(pmcProfile: IPmcData): void; + /** + * Resolve any dialogue attachments that were accidentally created using the player's equipment ID as + * the stash root object ID + * @param fullProfile + */ + checkForAndFixDialogueAttachments(fullProfile: ISptProfile): void; /** * Find issues in the scav profile data that may cause issues * @param scavProfile profile to check and fix diff --git a/TypeScript/23CustomAbstractChatBot/types/services/SeasonalEventService.d.ts b/TypeScript/23CustomAbstractChatBot/types/services/SeasonalEventService.d.ts index 446cccc..26b74ef 100644 --- a/TypeScript/23CustomAbstractChatBot/types/services/SeasonalEventService.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/services/SeasonalEventService.d.ts @@ -88,6 +88,12 @@ export declare class SeasonalEventService { * @returns bots with equipment changes */ protected getEventBotGear(eventType: SeasonalEventType): Record>>; + /** + * Get a dictionary of loot changes to apply to bots for a specific event e.g. Christmas/Halloween + * @param eventName Name of event to get gear changes for + * @returns bots with loot changes + */ + protected getEventBotLoot(eventType: SeasonalEventType): Record>>; /** * Get the dates each seasonal event starts and ends at * @returns Record with event name + start/end date @@ -108,7 +114,7 @@ export declare class SeasonalEventService { /** * Store active events inside class array property `currentlyActiveEvents` + set class properties: christmasEventActive/halloweenEventActive */ - protected cacheActiveEvents(): void; + cacheActiveEvents(): void; /** * Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER * @returns Season enum value @@ -171,6 +177,11 @@ export declare class SeasonalEventService { * @param eventName Name of the event to read equipment in from config */ protected addEventGearToBots(eventType: SeasonalEventType): void; + /** + * Read in data from seasonalEvents.json and add found loot items to bots + * @param eventName Name of the event to read loot in from config + */ + protected addEventLootToBots(eventType: SeasonalEventType): void; /** * Add pumpkin loot boxes to scavs */ diff --git a/TypeScript/23CustomAbstractChatBot/types/utils/App.d.ts b/TypeScript/23CustomAbstractChatBot/types/utils/App.d.ts index db46d2c..0e4850e 100644 --- a/TypeScript/23CustomAbstractChatBot/types/utils/App.d.ts +++ b/TypeScript/23CustomAbstractChatBot/types/utils/App.d.ts @@ -4,10 +4,10 @@ import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { HttpServer } from "@spt/servers/HttpServer"; -import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { EncodingUtil } from "@spt/utils/EncodingUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; +import { DatabaseService } from "@spt/services/DatabaseService"; export declare class App { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/23CustomAbstractChatBot/types/utils/ProgressWriter.d.ts b/TypeScript/23CustomAbstractChatBot/types/utils/ProgressWriter.d.ts new file mode 100644 index 0000000..2641d3a --- /dev/null +++ b/TypeScript/23CustomAbstractChatBot/types/utils/ProgressWriter.d.ts @@ -0,0 +1,13 @@ +export declare class ProgressWriter { + private count; + private total?; + private done; + private barFillChar; + private barEmptyChar; + private maxBarLength; + constructor(total: number, maxBarLength?: number, barFillChar?: string, barEmptyChar?: string); + /** + * Increment the progress counter and update the progress bar display. + */ + increment(): void; +} diff --git a/TypeScript/24WebSocket/types/generators/BotGenerator.d.ts b/TypeScript/24WebSocket/types/generators/BotGenerator.d.ts index 2c7bba6..a2291f4 100644 --- a/TypeScript/24WebSocket/types/generators/BotGenerator.d.ts +++ b/TypeScript/24WebSocket/types/generators/BotGenerator.d.ts @@ -5,6 +5,7 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { MinMax } from "@spt/models/common/MinMax"; +import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase"; import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; @@ -47,9 +48,10 @@ export declare class BotGenerator { * @param role e.g. assault / pmcbot * @param difficulty easy/normal/hard/impossible * @param botTemplate base bot template to use (e.g. assault/pmcbot) - * @returns + * profile PMC profile of player generating pscav + * @returns IBotBase */ - generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase; + generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType, profile: IPmcData): IBotBase; /** * Create 1 bot of the type/side/difficulty defined in botGenerationDetails * @param sessionId Session id @@ -79,6 +81,12 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; + /** + * Should this bot have a name like "name (Pmc Name)" and be alterd by client patch to be hostile to player + * @param botRole Role bot has + * @returns True if name should be simulated pscav + */ + protected shouldSimulatePlayerScav(botRole: string): boolean; /** * Get exp for kill by bot difficulty * @param experience Dict of difficulties and experience diff --git a/TypeScript/24WebSocket/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/24WebSocket/types/helpers/RagfairOfferHelper.d.ts index 9dd5be3..0ff9c66 100644 --- a/TypeScript/24WebSocket/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/24WebSocket/types/helpers/RagfairOfferHelper.d.ts @@ -91,6 +91,12 @@ export declare class RagfairOfferHelper { * @returns IRagfairOffer array */ getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcData: IPmcData): IRagfairOffer[]; + /** + * Get offers that have not exceeded buy limits + * @param possibleOffers offers to process + * @returns Offers + */ + protected getOffersInsideBuyRestrictionLimits(possibleOffers: IRagfairOffer[]): IRagfairOffer[]; /** * Check if offer is from trader standing the player does not have * @param offer Offer to check @@ -209,4 +215,10 @@ export declare class RagfairOfferHelper { * @returns True if in range */ protected itemQualityInRange(item: IItem, min: number, max: number): boolean; + /** + * Does this offer come from a trader + * @param offer Offer to check + * @returns True = from trader + */ + offerIsFromTrader(offer: IRagfairOffer): boolean; } diff --git a/TypeScript/24WebSocket/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/24WebSocket/types/models/eft/common/tables/IBotBase.d.ts index d3fd87e..8609573 100644 --- a/TypeScript/24WebSocket/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/24WebSocket/types/models/eft/common/tables/IBotBase.d.ts @@ -60,6 +60,7 @@ export interface IUnlockedInfo { export interface IInfo { EntryPoint: string; Nickname: string; + MainProfileNickname?: string; LowerNickname: string; Side: string; SquadInviteRestriction: boolean; diff --git a/TypeScript/24WebSocket/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/24WebSocket/types/models/spt/config/IInventoryConfig.d.ts index af0ec79..00ba5b1 100644 --- a/TypeScript/24WebSocket/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/config/IInventoryConfig.d.ts @@ -10,6 +10,8 @@ export interface IInventoryConfig extends IBaseConfig { customMoneyTpls: string[]; /** Multipliers for skill gain when inside menus, NOT in-game */ skillGainMultiplers: Record; + /** Container Tpls that shoud be deprioritised when choosing where to take money from for payments */ + deprioritisedMoneyContainers: string[]; } export interface IRewardDetails { rewardCount: number; diff --git a/TypeScript/24WebSocket/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/24WebSocket/types/models/spt/config/IPmcConfig.d.ts index 2e68219..02c9c5b 100644 --- a/TypeScript/24WebSocket/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/config/IPmcConfig.d.ts @@ -66,7 +66,9 @@ export interface IPmcTypes { bear: string; } export interface ISlotLootSettings { + /** Item Type whitelist */ whitelist: string[]; + /** item tpl blacklist */ blacklist: string[]; } export interface IMinMaxLootValue extends MinMax { diff --git a/TypeScript/24WebSocket/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/24WebSocket/types/models/spt/config/IRagfairConfig.d.ts index 36122c5..805a6b2 100644 --- a/TypeScript/24WebSocket/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/config/IRagfairConfig.d.ts @@ -75,6 +75,8 @@ export interface IDynamic { blacklist: IRagfairBlacklist; /** Dict of price limits keyed by item type */ unreasonableModPrices: Record; + /** Custom rouble prices for items to override values from prices.json */ + itemPriceOverrideRouble: Record; } export interface IPriceRanges { default: MinMax; diff --git a/TypeScript/24WebSocket/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/24WebSocket/types/models/spt/config/ISeasonalEventConfig.d.ts index 5e119fa..bf93685 100644 --- a/TypeScript/24WebSocket/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/24WebSocket/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -6,6 +6,8 @@ export interface ISeasonalEventConfig extends IBaseConfig { enableSeasonalEventDetection: boolean; /** event / botType / equipSlot / itemid */ eventGear: Record>>>; + /** event / bot type / equipSlot / itemid */ + eventLoot: Record>>>; events: ISeasonalEvent[]; eventBotMapping: Record; eventBossSpawns: Record>; diff --git a/TypeScript/24WebSocket/types/services/BotNameService.d.ts b/TypeScript/24WebSocket/types/services/BotNameService.d.ts index 056bd0f..349964d 100644 --- a/TypeScript/24WebSocket/types/services/BotNameService.d.ts +++ b/TypeScript/24WebSocket/types/services/BotNameService.d.ts @@ -1,5 +1,6 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; @@ -38,10 +39,13 @@ export declare class BotNameService { */ generateUniqueBotNickname(botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails, botRole: string, uniqueRoles?: string[]): string; /** - * Should this bot have a name like "name (Pmc Name)" - * @param botRole Role bot has - * @returns True if name should be simulated pscav + * Add random PMC name to bots MainProfileNickname property + * @param bot Bot to update */ - protected shouldSimulatePlayerScavName(botRole: string): boolean; - protected addPlayerScavNameSimulationSuffix(nickname: string): string; + addRandomPmcNameToBotMainProfileNicknameProperty(bot: IBotBase): void; + /** + * Choose a random PMC name from bear or usec bot jsons + * @returns PMC name as string + */ + protected getRandomPMCName(): string; } diff --git a/TypeScript/24WebSocket/types/services/DatabaseService.d.ts b/TypeScript/24WebSocket/types/services/DatabaseService.d.ts index 934617a..73575b1 100644 --- a/TypeScript/24WebSocket/types/services/DatabaseService.d.ts +++ b/TypeScript/24WebSocket/types/services/DatabaseService.d.ts @@ -85,7 +85,7 @@ export declare class DatabaseService { */ getCustomization(): Record; /** - * @returns assets/database/templates/items.json + * @returns assets/database/templates/handbook.json */ getHandbook(): IHandbookBase; /** @@ -101,7 +101,7 @@ export declare class DatabaseService { */ getProfiles(): IProfileTemplates; /** - * @returns assets/database/templates/items.json + * @returns assets/database/templates/quests.json */ getQuests(): Record; /** diff --git a/TypeScript/24WebSocket/types/services/InsuranceService.d.ts b/TypeScript/24WebSocket/types/services/InsuranceService.d.ts index ac9cff5..e52fa59 100644 --- a/TypeScript/24WebSocket/types/services/InsuranceService.d.ts +++ b/TypeScript/24WebSocket/types/services/InsuranceService.d.ts @@ -62,14 +62,6 @@ export declare class InsuranceService { * @returns Timestamp to return items to player in seconds */ protected getInsuranceReturnTimestamp(pmcData: IPmcData, trader: ITraderBase): number; - /** - * Take the insurance item packages within a profile session and ensure that each of the items in that package are - * not orphaned from their parent ID. - * - * @param sessionID The session ID to update insurance equipment packages in. - * @returns void - */ - protected adoptOrphanedInsEquipment(sessionID: string): void; protected getMaxInsuranceStorageTime(traderBase: ITraderBase): number; /** * Store lost gear post-raid inside profile, ready for later code to pick it up and mail it @@ -127,10 +119,4 @@ export declare class InsuranceService { * @returns price in roubles */ getRoublePriceToInsureItemWithTrader(pmcData: IPmcData, inventoryItem: IItem, traderId: string): number; - /** - * Returns the ID that should be used for a root-level Item's parentId property value within in the context of insurance. - * @param sessionID Players id - * @returns The root item Id. - */ - getRootItemParentID(sessionID: string): string; } diff --git a/TypeScript/24WebSocket/types/services/PaymentService.d.ts b/TypeScript/24WebSocket/types/services/PaymentService.d.ts index f6ec79d..78fdfb6 100644 --- a/TypeScript/24WebSocket/types/services/PaymentService.d.ts +++ b/TypeScript/24WebSocket/types/services/PaymentService.d.ts @@ -8,7 +8,9 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IProcessBuyTradeRequestData } from "@spt/models/eft/trade/IProcessBuyTradeRequestData"; import { IProcessSellTradeRequestData } from "@spt/models/eft/trade/IProcessSellTradeRequestData"; +import { IInventoryConfig } from "@spt/models/spt/config/IInventoryConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { HashUtil } from "@spt/utils/HashUtil"; @@ -24,7 +26,9 @@ export declare class PaymentService { protected inventoryHelper: InventoryHelper; protected localisationService: LocalisationService; protected paymentHelper: PaymentHelper; - constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper); + protected configServer: ConfigServer; + protected inventoryConfig: IInventoryConfig; + constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper, configServer: ConfigServer); /** * Take money and insert items into return to server request * @param pmcData Pmc profile diff --git a/TypeScript/24WebSocket/types/services/PostDbLoadService.d.ts b/TypeScript/24WebSocket/types/services/PostDbLoadService.d.ts index c9e4bbe..cc51311 100644 --- a/TypeScript/24WebSocket/types/services/PostDbLoadService.d.ts +++ b/TypeScript/24WebSocket/types/services/PostDbLoadService.d.ts @@ -74,4 +74,6 @@ export declare class PostDbLoadService { */ protected validateQuestAssortUnlocksExist(): void; protected setAllDbItemsAsSellableOnFlea(): void; + protected addMissingTraderBuyRestrictionMaxValue(): void; + protected applyFleaPriceOverrides(): void; } diff --git a/TypeScript/24WebSocket/types/services/ProfileFixerService.d.ts b/TypeScript/24WebSocket/types/services/ProfileFixerService.d.ts index 4a3a5ff..cbbe1d0 100644 --- a/TypeScript/24WebSocket/types/services/ProfileFixerService.d.ts +++ b/TypeScript/24WebSocket/types/services/ProfileFixerService.d.ts @@ -47,6 +47,12 @@ export declare class ProfileFixerService { * @param pmcProfile profile to check and fix */ checkForAndFixPmcProfileIssues(pmcProfile: IPmcData): void; + /** + * Resolve any dialogue attachments that were accidentally created using the player's equipment ID as + * the stash root object ID + * @param fullProfile + */ + checkForAndFixDialogueAttachments(fullProfile: ISptProfile): void; /** * Find issues in the scav profile data that may cause issues * @param scavProfile profile to check and fix diff --git a/TypeScript/24WebSocket/types/services/SeasonalEventService.d.ts b/TypeScript/24WebSocket/types/services/SeasonalEventService.d.ts index 446cccc..26b74ef 100644 --- a/TypeScript/24WebSocket/types/services/SeasonalEventService.d.ts +++ b/TypeScript/24WebSocket/types/services/SeasonalEventService.d.ts @@ -88,6 +88,12 @@ export declare class SeasonalEventService { * @returns bots with equipment changes */ protected getEventBotGear(eventType: SeasonalEventType): Record>>; + /** + * Get a dictionary of loot changes to apply to bots for a specific event e.g. Christmas/Halloween + * @param eventName Name of event to get gear changes for + * @returns bots with loot changes + */ + protected getEventBotLoot(eventType: SeasonalEventType): Record>>; /** * Get the dates each seasonal event starts and ends at * @returns Record with event name + start/end date @@ -108,7 +114,7 @@ export declare class SeasonalEventService { /** * Store active events inside class array property `currentlyActiveEvents` + set class properties: christmasEventActive/halloweenEventActive */ - protected cacheActiveEvents(): void; + cacheActiveEvents(): void; /** * Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER * @returns Season enum value @@ -171,6 +177,11 @@ export declare class SeasonalEventService { * @param eventName Name of the event to read equipment in from config */ protected addEventGearToBots(eventType: SeasonalEventType): void; + /** + * Read in data from seasonalEvents.json and add found loot items to bots + * @param eventName Name of the event to read loot in from config + */ + protected addEventLootToBots(eventType: SeasonalEventType): void; /** * Add pumpkin loot boxes to scavs */ diff --git a/TypeScript/24WebSocket/types/utils/App.d.ts b/TypeScript/24WebSocket/types/utils/App.d.ts index db46d2c..0e4850e 100644 --- a/TypeScript/24WebSocket/types/utils/App.d.ts +++ b/TypeScript/24WebSocket/types/utils/App.d.ts @@ -4,10 +4,10 @@ import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { HttpServer } from "@spt/servers/HttpServer"; -import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { EncodingUtil } from "@spt/utils/EncodingUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; +import { DatabaseService } from "@spt/services/DatabaseService"; export declare class App { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/24WebSocket/types/utils/ProgressWriter.d.ts b/TypeScript/24WebSocket/types/utils/ProgressWriter.d.ts new file mode 100644 index 0000000..2641d3a --- /dev/null +++ b/TypeScript/24WebSocket/types/utils/ProgressWriter.d.ts @@ -0,0 +1,13 @@ +export declare class ProgressWriter { + private count; + private total?; + private done; + private barFillChar; + private barEmptyChar; + private maxBarLength; + constructor(total: number, maxBarLength?: number, barFillChar?: string, barEmptyChar?: string); + /** + * Increment the progress counter and update the progress bar display. + */ + increment(): void; +} diff --git a/TypeScript/2EditDatabase/types/generators/BotGenerator.d.ts b/TypeScript/2EditDatabase/types/generators/BotGenerator.d.ts index 2c7bba6..a2291f4 100644 --- a/TypeScript/2EditDatabase/types/generators/BotGenerator.d.ts +++ b/TypeScript/2EditDatabase/types/generators/BotGenerator.d.ts @@ -5,6 +5,7 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { MinMax } from "@spt/models/common/MinMax"; +import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase"; import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; @@ -47,9 +48,10 @@ export declare class BotGenerator { * @param role e.g. assault / pmcbot * @param difficulty easy/normal/hard/impossible * @param botTemplate base bot template to use (e.g. assault/pmcbot) - * @returns + * profile PMC profile of player generating pscav + * @returns IBotBase */ - generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase; + generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType, profile: IPmcData): IBotBase; /** * Create 1 bot of the type/side/difficulty defined in botGenerationDetails * @param sessionId Session id @@ -79,6 +81,12 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; + /** + * Should this bot have a name like "name (Pmc Name)" and be alterd by client patch to be hostile to player + * @param botRole Role bot has + * @returns True if name should be simulated pscav + */ + protected shouldSimulatePlayerScav(botRole: string): boolean; /** * Get exp for kill by bot difficulty * @param experience Dict of difficulties and experience diff --git a/TypeScript/2EditDatabase/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/RagfairOfferHelper.d.ts index 9dd5be3..0ff9c66 100644 --- a/TypeScript/2EditDatabase/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/RagfairOfferHelper.d.ts @@ -91,6 +91,12 @@ export declare class RagfairOfferHelper { * @returns IRagfairOffer array */ getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcData: IPmcData): IRagfairOffer[]; + /** + * Get offers that have not exceeded buy limits + * @param possibleOffers offers to process + * @returns Offers + */ + protected getOffersInsideBuyRestrictionLimits(possibleOffers: IRagfairOffer[]): IRagfairOffer[]; /** * Check if offer is from trader standing the player does not have * @param offer Offer to check @@ -209,4 +215,10 @@ export declare class RagfairOfferHelper { * @returns True if in range */ protected itemQualityInRange(item: IItem, min: number, max: number): boolean; + /** + * Does this offer come from a trader + * @param offer Offer to check + * @returns True = from trader + */ + offerIsFromTrader(offer: IRagfairOffer): boolean; } diff --git a/TypeScript/2EditDatabase/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/2EditDatabase/types/models/eft/common/tables/IBotBase.d.ts index d3fd87e..8609573 100644 --- a/TypeScript/2EditDatabase/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/common/tables/IBotBase.d.ts @@ -60,6 +60,7 @@ export interface IUnlockedInfo { export interface IInfo { EntryPoint: string; Nickname: string; + MainProfileNickname?: string; LowerNickname: string; Side: string; SquadInviteRestriction: boolean; diff --git a/TypeScript/2EditDatabase/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/2EditDatabase/types/models/spt/config/IInventoryConfig.d.ts index af0ec79..00ba5b1 100644 --- a/TypeScript/2EditDatabase/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/config/IInventoryConfig.d.ts @@ -10,6 +10,8 @@ export interface IInventoryConfig extends IBaseConfig { customMoneyTpls: string[]; /** Multipliers for skill gain when inside menus, NOT in-game */ skillGainMultiplers: Record; + /** Container Tpls that shoud be deprioritised when choosing where to take money from for payments */ + deprioritisedMoneyContainers: string[]; } export interface IRewardDetails { rewardCount: number; diff --git a/TypeScript/2EditDatabase/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/2EditDatabase/types/models/spt/config/IPmcConfig.d.ts index 2e68219..02c9c5b 100644 --- a/TypeScript/2EditDatabase/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/config/IPmcConfig.d.ts @@ -66,7 +66,9 @@ export interface IPmcTypes { bear: string; } export interface ISlotLootSettings { + /** Item Type whitelist */ whitelist: string[]; + /** item tpl blacklist */ blacklist: string[]; } export interface IMinMaxLootValue extends MinMax { diff --git a/TypeScript/2EditDatabase/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/2EditDatabase/types/models/spt/config/IRagfairConfig.d.ts index 36122c5..805a6b2 100644 --- a/TypeScript/2EditDatabase/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/config/IRagfairConfig.d.ts @@ -75,6 +75,8 @@ export interface IDynamic { blacklist: IRagfairBlacklist; /** Dict of price limits keyed by item type */ unreasonableModPrices: Record; + /** Custom rouble prices for items to override values from prices.json */ + itemPriceOverrideRouble: Record; } export interface IPriceRanges { default: MinMax; diff --git a/TypeScript/2EditDatabase/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/2EditDatabase/types/models/spt/config/ISeasonalEventConfig.d.ts index 5e119fa..bf93685 100644 --- a/TypeScript/2EditDatabase/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -6,6 +6,8 @@ export interface ISeasonalEventConfig extends IBaseConfig { enableSeasonalEventDetection: boolean; /** event / botType / equipSlot / itemid */ eventGear: Record>>>; + /** event / bot type / equipSlot / itemid */ + eventLoot: Record>>>; events: ISeasonalEvent[]; eventBotMapping: Record; eventBossSpawns: Record>; diff --git a/TypeScript/2EditDatabase/types/services/BotNameService.d.ts b/TypeScript/2EditDatabase/types/services/BotNameService.d.ts index 056bd0f..349964d 100644 --- a/TypeScript/2EditDatabase/types/services/BotNameService.d.ts +++ b/TypeScript/2EditDatabase/types/services/BotNameService.d.ts @@ -1,5 +1,6 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; @@ -38,10 +39,13 @@ export declare class BotNameService { */ generateUniqueBotNickname(botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails, botRole: string, uniqueRoles?: string[]): string; /** - * Should this bot have a name like "name (Pmc Name)" - * @param botRole Role bot has - * @returns True if name should be simulated pscav + * Add random PMC name to bots MainProfileNickname property + * @param bot Bot to update */ - protected shouldSimulatePlayerScavName(botRole: string): boolean; - protected addPlayerScavNameSimulationSuffix(nickname: string): string; + addRandomPmcNameToBotMainProfileNicknameProperty(bot: IBotBase): void; + /** + * Choose a random PMC name from bear or usec bot jsons + * @returns PMC name as string + */ + protected getRandomPMCName(): string; } diff --git a/TypeScript/2EditDatabase/types/services/DatabaseService.d.ts b/TypeScript/2EditDatabase/types/services/DatabaseService.d.ts index 934617a..73575b1 100644 --- a/TypeScript/2EditDatabase/types/services/DatabaseService.d.ts +++ b/TypeScript/2EditDatabase/types/services/DatabaseService.d.ts @@ -85,7 +85,7 @@ export declare class DatabaseService { */ getCustomization(): Record; /** - * @returns assets/database/templates/items.json + * @returns assets/database/templates/handbook.json */ getHandbook(): IHandbookBase; /** @@ -101,7 +101,7 @@ export declare class DatabaseService { */ getProfiles(): IProfileTemplates; /** - * @returns assets/database/templates/items.json + * @returns assets/database/templates/quests.json */ getQuests(): Record; /** diff --git a/TypeScript/2EditDatabase/types/services/InsuranceService.d.ts b/TypeScript/2EditDatabase/types/services/InsuranceService.d.ts index ac9cff5..e52fa59 100644 --- a/TypeScript/2EditDatabase/types/services/InsuranceService.d.ts +++ b/TypeScript/2EditDatabase/types/services/InsuranceService.d.ts @@ -62,14 +62,6 @@ export declare class InsuranceService { * @returns Timestamp to return items to player in seconds */ protected getInsuranceReturnTimestamp(pmcData: IPmcData, trader: ITraderBase): number; - /** - * Take the insurance item packages within a profile session and ensure that each of the items in that package are - * not orphaned from their parent ID. - * - * @param sessionID The session ID to update insurance equipment packages in. - * @returns void - */ - protected adoptOrphanedInsEquipment(sessionID: string): void; protected getMaxInsuranceStorageTime(traderBase: ITraderBase): number; /** * Store lost gear post-raid inside profile, ready for later code to pick it up and mail it @@ -127,10 +119,4 @@ export declare class InsuranceService { * @returns price in roubles */ getRoublePriceToInsureItemWithTrader(pmcData: IPmcData, inventoryItem: IItem, traderId: string): number; - /** - * Returns the ID that should be used for a root-level Item's parentId property value within in the context of insurance. - * @param sessionID Players id - * @returns The root item Id. - */ - getRootItemParentID(sessionID: string): string; } diff --git a/TypeScript/2EditDatabase/types/services/PaymentService.d.ts b/TypeScript/2EditDatabase/types/services/PaymentService.d.ts index f6ec79d..78fdfb6 100644 --- a/TypeScript/2EditDatabase/types/services/PaymentService.d.ts +++ b/TypeScript/2EditDatabase/types/services/PaymentService.d.ts @@ -8,7 +8,9 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IProcessBuyTradeRequestData } from "@spt/models/eft/trade/IProcessBuyTradeRequestData"; import { IProcessSellTradeRequestData } from "@spt/models/eft/trade/IProcessSellTradeRequestData"; +import { IInventoryConfig } from "@spt/models/spt/config/IInventoryConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { HashUtil } from "@spt/utils/HashUtil"; @@ -24,7 +26,9 @@ export declare class PaymentService { protected inventoryHelper: InventoryHelper; protected localisationService: LocalisationService; protected paymentHelper: PaymentHelper; - constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper); + protected configServer: ConfigServer; + protected inventoryConfig: IInventoryConfig; + constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper, configServer: ConfigServer); /** * Take money and insert items into return to server request * @param pmcData Pmc profile diff --git a/TypeScript/2EditDatabase/types/services/PostDbLoadService.d.ts b/TypeScript/2EditDatabase/types/services/PostDbLoadService.d.ts index c9e4bbe..cc51311 100644 --- a/TypeScript/2EditDatabase/types/services/PostDbLoadService.d.ts +++ b/TypeScript/2EditDatabase/types/services/PostDbLoadService.d.ts @@ -74,4 +74,6 @@ export declare class PostDbLoadService { */ protected validateQuestAssortUnlocksExist(): void; protected setAllDbItemsAsSellableOnFlea(): void; + protected addMissingTraderBuyRestrictionMaxValue(): void; + protected applyFleaPriceOverrides(): void; } diff --git a/TypeScript/2EditDatabase/types/services/ProfileFixerService.d.ts b/TypeScript/2EditDatabase/types/services/ProfileFixerService.d.ts index 4a3a5ff..cbbe1d0 100644 --- a/TypeScript/2EditDatabase/types/services/ProfileFixerService.d.ts +++ b/TypeScript/2EditDatabase/types/services/ProfileFixerService.d.ts @@ -47,6 +47,12 @@ export declare class ProfileFixerService { * @param pmcProfile profile to check and fix */ checkForAndFixPmcProfileIssues(pmcProfile: IPmcData): void; + /** + * Resolve any dialogue attachments that were accidentally created using the player's equipment ID as + * the stash root object ID + * @param fullProfile + */ + checkForAndFixDialogueAttachments(fullProfile: ISptProfile): void; /** * Find issues in the scav profile data that may cause issues * @param scavProfile profile to check and fix diff --git a/TypeScript/2EditDatabase/types/services/SeasonalEventService.d.ts b/TypeScript/2EditDatabase/types/services/SeasonalEventService.d.ts index 446cccc..26b74ef 100644 --- a/TypeScript/2EditDatabase/types/services/SeasonalEventService.d.ts +++ b/TypeScript/2EditDatabase/types/services/SeasonalEventService.d.ts @@ -88,6 +88,12 @@ export declare class SeasonalEventService { * @returns bots with equipment changes */ protected getEventBotGear(eventType: SeasonalEventType): Record>>; + /** + * Get a dictionary of loot changes to apply to bots for a specific event e.g. Christmas/Halloween + * @param eventName Name of event to get gear changes for + * @returns bots with loot changes + */ + protected getEventBotLoot(eventType: SeasonalEventType): Record>>; /** * Get the dates each seasonal event starts and ends at * @returns Record with event name + start/end date @@ -108,7 +114,7 @@ export declare class SeasonalEventService { /** * Store active events inside class array property `currentlyActiveEvents` + set class properties: christmasEventActive/halloweenEventActive */ - protected cacheActiveEvents(): void; + cacheActiveEvents(): void; /** * Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER * @returns Season enum value @@ -171,6 +177,11 @@ export declare class SeasonalEventService { * @param eventName Name of the event to read equipment in from config */ protected addEventGearToBots(eventType: SeasonalEventType): void; + /** + * Read in data from seasonalEvents.json and add found loot items to bots + * @param eventName Name of the event to read loot in from config + */ + protected addEventLootToBots(eventType: SeasonalEventType): void; /** * Add pumpkin loot boxes to scavs */ diff --git a/TypeScript/2EditDatabase/types/utils/App.d.ts b/TypeScript/2EditDatabase/types/utils/App.d.ts index db46d2c..0e4850e 100644 --- a/TypeScript/2EditDatabase/types/utils/App.d.ts +++ b/TypeScript/2EditDatabase/types/utils/App.d.ts @@ -4,10 +4,10 @@ import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { HttpServer } from "@spt/servers/HttpServer"; -import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { EncodingUtil } from "@spt/utils/EncodingUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; +import { DatabaseService } from "@spt/services/DatabaseService"; export declare class App { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/2EditDatabase/types/utils/ProgressWriter.d.ts b/TypeScript/2EditDatabase/types/utils/ProgressWriter.d.ts new file mode 100644 index 0000000..2641d3a --- /dev/null +++ b/TypeScript/2EditDatabase/types/utils/ProgressWriter.d.ts @@ -0,0 +1,13 @@ +export declare class ProgressWriter { + private count; + private total?; + private done; + private barFillChar; + private barEmptyChar; + private maxBarLength; + constructor(total: number, maxBarLength?: number, barFillChar?: string, barEmptyChar?: string); + /** + * Increment the progress counter and update the progress bar display. + */ + increment(): void; +} diff --git a/TypeScript/3GetSptConfigFile/types/generators/BotGenerator.d.ts b/TypeScript/3GetSptConfigFile/types/generators/BotGenerator.d.ts index 2c7bba6..a2291f4 100644 --- a/TypeScript/3GetSptConfigFile/types/generators/BotGenerator.d.ts +++ b/TypeScript/3GetSptConfigFile/types/generators/BotGenerator.d.ts @@ -5,6 +5,7 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { MinMax } from "@spt/models/common/MinMax"; +import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase"; import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; @@ -47,9 +48,10 @@ export declare class BotGenerator { * @param role e.g. assault / pmcbot * @param difficulty easy/normal/hard/impossible * @param botTemplate base bot template to use (e.g. assault/pmcbot) - * @returns + * profile PMC profile of player generating pscav + * @returns IBotBase */ - generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase; + generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType, profile: IPmcData): IBotBase; /** * Create 1 bot of the type/side/difficulty defined in botGenerationDetails * @param sessionId Session id @@ -79,6 +81,12 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; + /** + * Should this bot have a name like "name (Pmc Name)" and be alterd by client patch to be hostile to player + * @param botRole Role bot has + * @returns True if name should be simulated pscav + */ + protected shouldSimulatePlayerScav(botRole: string): boolean; /** * Get exp for kill by bot difficulty * @param experience Dict of difficulties and experience diff --git a/TypeScript/3GetSptConfigFile/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/RagfairOfferHelper.d.ts index 9dd5be3..0ff9c66 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/RagfairOfferHelper.d.ts @@ -91,6 +91,12 @@ export declare class RagfairOfferHelper { * @returns IRagfairOffer array */ getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcData: IPmcData): IRagfairOffer[]; + /** + * Get offers that have not exceeded buy limits + * @param possibleOffers offers to process + * @returns Offers + */ + protected getOffersInsideBuyRestrictionLimits(possibleOffers: IRagfairOffer[]): IRagfairOffer[]; /** * Check if offer is from trader standing the player does not have * @param offer Offer to check @@ -209,4 +215,10 @@ export declare class RagfairOfferHelper { * @returns True if in range */ protected itemQualityInRange(item: IItem, min: number, max: number): boolean; + /** + * Does this offer come from a trader + * @param offer Offer to check + * @returns True = from trader + */ + offerIsFromTrader(offer: IRagfairOffer): boolean; } diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/IBotBase.d.ts index d3fd87e..8609573 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/IBotBase.d.ts @@ -60,6 +60,7 @@ export interface IUnlockedInfo { export interface IInfo { EntryPoint: string; Nickname: string; + MainProfileNickname?: string; LowerNickname: string; Side: string; SquadInviteRestriction: boolean; diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/config/IInventoryConfig.d.ts index af0ec79..00ba5b1 100644 --- a/TypeScript/3GetSptConfigFile/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/spt/config/IInventoryConfig.d.ts @@ -10,6 +10,8 @@ export interface IInventoryConfig extends IBaseConfig { customMoneyTpls: string[]; /** Multipliers for skill gain when inside menus, NOT in-game */ skillGainMultiplers: Record; + /** Container Tpls that shoud be deprioritised when choosing where to take money from for payments */ + deprioritisedMoneyContainers: string[]; } export interface IRewardDetails { rewardCount: number; diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/config/IPmcConfig.d.ts index 2e68219..02c9c5b 100644 --- a/TypeScript/3GetSptConfigFile/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/spt/config/IPmcConfig.d.ts @@ -66,7 +66,9 @@ export interface IPmcTypes { bear: string; } export interface ISlotLootSettings { + /** Item Type whitelist */ whitelist: string[]; + /** item tpl blacklist */ blacklist: string[]; } export interface IMinMaxLootValue extends MinMax { diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/config/IRagfairConfig.d.ts index 36122c5..805a6b2 100644 --- a/TypeScript/3GetSptConfigFile/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/spt/config/IRagfairConfig.d.ts @@ -75,6 +75,8 @@ export interface IDynamic { blacklist: IRagfairBlacklist; /** Dict of price limits keyed by item type */ unreasonableModPrices: Record; + /** Custom rouble prices for items to override values from prices.json */ + itemPriceOverrideRouble: Record; } export interface IPriceRanges { default: MinMax; diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/config/ISeasonalEventConfig.d.ts index 5e119fa..bf93685 100644 --- a/TypeScript/3GetSptConfigFile/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -6,6 +6,8 @@ export interface ISeasonalEventConfig extends IBaseConfig { enableSeasonalEventDetection: boolean; /** event / botType / equipSlot / itemid */ eventGear: Record>>>; + /** event / bot type / equipSlot / itemid */ + eventLoot: Record>>>; events: ISeasonalEvent[]; eventBotMapping: Record; eventBossSpawns: Record>; diff --git a/TypeScript/3GetSptConfigFile/types/services/BotNameService.d.ts b/TypeScript/3GetSptConfigFile/types/services/BotNameService.d.ts index 056bd0f..349964d 100644 --- a/TypeScript/3GetSptConfigFile/types/services/BotNameService.d.ts +++ b/TypeScript/3GetSptConfigFile/types/services/BotNameService.d.ts @@ -1,5 +1,6 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; @@ -38,10 +39,13 @@ export declare class BotNameService { */ generateUniqueBotNickname(botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails, botRole: string, uniqueRoles?: string[]): string; /** - * Should this bot have a name like "name (Pmc Name)" - * @param botRole Role bot has - * @returns True if name should be simulated pscav + * Add random PMC name to bots MainProfileNickname property + * @param bot Bot to update */ - protected shouldSimulatePlayerScavName(botRole: string): boolean; - protected addPlayerScavNameSimulationSuffix(nickname: string): string; + addRandomPmcNameToBotMainProfileNicknameProperty(bot: IBotBase): void; + /** + * Choose a random PMC name from bear or usec bot jsons + * @returns PMC name as string + */ + protected getRandomPMCName(): string; } diff --git a/TypeScript/3GetSptConfigFile/types/services/DatabaseService.d.ts b/TypeScript/3GetSptConfigFile/types/services/DatabaseService.d.ts index 934617a..73575b1 100644 --- a/TypeScript/3GetSptConfigFile/types/services/DatabaseService.d.ts +++ b/TypeScript/3GetSptConfigFile/types/services/DatabaseService.d.ts @@ -85,7 +85,7 @@ export declare class DatabaseService { */ getCustomization(): Record; /** - * @returns assets/database/templates/items.json + * @returns assets/database/templates/handbook.json */ getHandbook(): IHandbookBase; /** @@ -101,7 +101,7 @@ export declare class DatabaseService { */ getProfiles(): IProfileTemplates; /** - * @returns assets/database/templates/items.json + * @returns assets/database/templates/quests.json */ getQuests(): Record; /** diff --git a/TypeScript/3GetSptConfigFile/types/services/InsuranceService.d.ts b/TypeScript/3GetSptConfigFile/types/services/InsuranceService.d.ts index ac9cff5..e52fa59 100644 --- a/TypeScript/3GetSptConfigFile/types/services/InsuranceService.d.ts +++ b/TypeScript/3GetSptConfigFile/types/services/InsuranceService.d.ts @@ -62,14 +62,6 @@ export declare class InsuranceService { * @returns Timestamp to return items to player in seconds */ protected getInsuranceReturnTimestamp(pmcData: IPmcData, trader: ITraderBase): number; - /** - * Take the insurance item packages within a profile session and ensure that each of the items in that package are - * not orphaned from their parent ID. - * - * @param sessionID The session ID to update insurance equipment packages in. - * @returns void - */ - protected adoptOrphanedInsEquipment(sessionID: string): void; protected getMaxInsuranceStorageTime(traderBase: ITraderBase): number; /** * Store lost gear post-raid inside profile, ready for later code to pick it up and mail it @@ -127,10 +119,4 @@ export declare class InsuranceService { * @returns price in roubles */ getRoublePriceToInsureItemWithTrader(pmcData: IPmcData, inventoryItem: IItem, traderId: string): number; - /** - * Returns the ID that should be used for a root-level Item's parentId property value within in the context of insurance. - * @param sessionID Players id - * @returns The root item Id. - */ - getRootItemParentID(sessionID: string): string; } diff --git a/TypeScript/3GetSptConfigFile/types/services/PaymentService.d.ts b/TypeScript/3GetSptConfigFile/types/services/PaymentService.d.ts index f6ec79d..78fdfb6 100644 --- a/TypeScript/3GetSptConfigFile/types/services/PaymentService.d.ts +++ b/TypeScript/3GetSptConfigFile/types/services/PaymentService.d.ts @@ -8,7 +8,9 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IProcessBuyTradeRequestData } from "@spt/models/eft/trade/IProcessBuyTradeRequestData"; import { IProcessSellTradeRequestData } from "@spt/models/eft/trade/IProcessSellTradeRequestData"; +import { IInventoryConfig } from "@spt/models/spt/config/IInventoryConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { HashUtil } from "@spt/utils/HashUtil"; @@ -24,7 +26,9 @@ export declare class PaymentService { protected inventoryHelper: InventoryHelper; protected localisationService: LocalisationService; protected paymentHelper: PaymentHelper; - constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper); + protected configServer: ConfigServer; + protected inventoryConfig: IInventoryConfig; + constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper, configServer: ConfigServer); /** * Take money and insert items into return to server request * @param pmcData Pmc profile diff --git a/TypeScript/3GetSptConfigFile/types/services/PostDbLoadService.d.ts b/TypeScript/3GetSptConfigFile/types/services/PostDbLoadService.d.ts index c9e4bbe..cc51311 100644 --- a/TypeScript/3GetSptConfigFile/types/services/PostDbLoadService.d.ts +++ b/TypeScript/3GetSptConfigFile/types/services/PostDbLoadService.d.ts @@ -74,4 +74,6 @@ export declare class PostDbLoadService { */ protected validateQuestAssortUnlocksExist(): void; protected setAllDbItemsAsSellableOnFlea(): void; + protected addMissingTraderBuyRestrictionMaxValue(): void; + protected applyFleaPriceOverrides(): void; } diff --git a/TypeScript/3GetSptConfigFile/types/services/ProfileFixerService.d.ts b/TypeScript/3GetSptConfigFile/types/services/ProfileFixerService.d.ts index 4a3a5ff..cbbe1d0 100644 --- a/TypeScript/3GetSptConfigFile/types/services/ProfileFixerService.d.ts +++ b/TypeScript/3GetSptConfigFile/types/services/ProfileFixerService.d.ts @@ -47,6 +47,12 @@ export declare class ProfileFixerService { * @param pmcProfile profile to check and fix */ checkForAndFixPmcProfileIssues(pmcProfile: IPmcData): void; + /** + * Resolve any dialogue attachments that were accidentally created using the player's equipment ID as + * the stash root object ID + * @param fullProfile + */ + checkForAndFixDialogueAttachments(fullProfile: ISptProfile): void; /** * Find issues in the scav profile data that may cause issues * @param scavProfile profile to check and fix diff --git a/TypeScript/3GetSptConfigFile/types/services/SeasonalEventService.d.ts b/TypeScript/3GetSptConfigFile/types/services/SeasonalEventService.d.ts index 446cccc..26b74ef 100644 --- a/TypeScript/3GetSptConfigFile/types/services/SeasonalEventService.d.ts +++ b/TypeScript/3GetSptConfigFile/types/services/SeasonalEventService.d.ts @@ -88,6 +88,12 @@ export declare class SeasonalEventService { * @returns bots with equipment changes */ protected getEventBotGear(eventType: SeasonalEventType): Record>>; + /** + * Get a dictionary of loot changes to apply to bots for a specific event e.g. Christmas/Halloween + * @param eventName Name of event to get gear changes for + * @returns bots with loot changes + */ + protected getEventBotLoot(eventType: SeasonalEventType): Record>>; /** * Get the dates each seasonal event starts and ends at * @returns Record with event name + start/end date @@ -108,7 +114,7 @@ export declare class SeasonalEventService { /** * Store active events inside class array property `currentlyActiveEvents` + set class properties: christmasEventActive/halloweenEventActive */ - protected cacheActiveEvents(): void; + cacheActiveEvents(): void; /** * Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER * @returns Season enum value @@ -171,6 +177,11 @@ export declare class SeasonalEventService { * @param eventName Name of the event to read equipment in from config */ protected addEventGearToBots(eventType: SeasonalEventType): void; + /** + * Read in data from seasonalEvents.json and add found loot items to bots + * @param eventName Name of the event to read loot in from config + */ + protected addEventLootToBots(eventType: SeasonalEventType): void; /** * Add pumpkin loot boxes to scavs */ diff --git a/TypeScript/3GetSptConfigFile/types/utils/App.d.ts b/TypeScript/3GetSptConfigFile/types/utils/App.d.ts index db46d2c..0e4850e 100644 --- a/TypeScript/3GetSptConfigFile/types/utils/App.d.ts +++ b/TypeScript/3GetSptConfigFile/types/utils/App.d.ts @@ -4,10 +4,10 @@ import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { HttpServer } from "@spt/servers/HttpServer"; -import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { EncodingUtil } from "@spt/utils/EncodingUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; +import { DatabaseService } from "@spt/services/DatabaseService"; export declare class App { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/3GetSptConfigFile/types/utils/ProgressWriter.d.ts b/TypeScript/3GetSptConfigFile/types/utils/ProgressWriter.d.ts new file mode 100644 index 0000000..2641d3a --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/utils/ProgressWriter.d.ts @@ -0,0 +1,13 @@ +export declare class ProgressWriter { + private count; + private total?; + private done; + private barFillChar; + private barEmptyChar; + private maxBarLength; + constructor(total: number, maxBarLength?: number, barFillChar?: string, barEmptyChar?: string); + /** + * Increment the progress counter and update the progress bar display. + */ + increment(): void; +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotGenerator.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotGenerator.d.ts index 2c7bba6..a2291f4 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotGenerator.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotGenerator.d.ts @@ -5,6 +5,7 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { MinMax } from "@spt/models/common/MinMax"; +import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase"; import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; @@ -47,9 +48,10 @@ export declare class BotGenerator { * @param role e.g. assault / pmcbot * @param difficulty easy/normal/hard/impossible * @param botTemplate base bot template to use (e.g. assault/pmcbot) - * @returns + * profile PMC profile of player generating pscav + * @returns IBotBase */ - generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase; + generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType, profile: IPmcData): IBotBase; /** * Create 1 bot of the type/side/difficulty defined in botGenerationDetails * @param sessionId Session id @@ -79,6 +81,12 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; + /** + * Should this bot have a name like "name (Pmc Name)" and be alterd by client patch to be hostile to player + * @param botRole Role bot has + * @returns True if name should be simulated pscav + */ + protected shouldSimulatePlayerScav(botRole: string): boolean; /** * Get exp for kill by bot difficulty * @param experience Dict of difficulties and experience diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/RagfairOfferHelper.d.ts index 9dd5be3..0ff9c66 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/RagfairOfferHelper.d.ts @@ -91,6 +91,12 @@ export declare class RagfairOfferHelper { * @returns IRagfairOffer array */ getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcData: IPmcData): IRagfairOffer[]; + /** + * Get offers that have not exceeded buy limits + * @param possibleOffers offers to process + * @returns Offers + */ + protected getOffersInsideBuyRestrictionLimits(possibleOffers: IRagfairOffer[]): IRagfairOffer[]; /** * Check if offer is from trader standing the player does not have * @param offer Offer to check @@ -209,4 +215,10 @@ export declare class RagfairOfferHelper { * @returns True if in range */ protected itemQualityInRange(item: IItem, min: number, max: number): boolean; + /** + * Does this offer come from a trader + * @param offer Offer to check + * @returns True = from trader + */ + offerIsFromTrader(offer: IRagfairOffer): boolean; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/tables/IBotBase.d.ts index d3fd87e..8609573 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/tables/IBotBase.d.ts @@ -60,6 +60,7 @@ export interface IUnlockedInfo { export interface IInfo { EntryPoint: string; Nickname: string; + MainProfileNickname?: string; LowerNickname: string; Side: string; SquadInviteRestriction: boolean; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IInventoryConfig.d.ts index af0ec79..00ba5b1 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IInventoryConfig.d.ts @@ -10,6 +10,8 @@ export interface IInventoryConfig extends IBaseConfig { customMoneyTpls: string[]; /** Multipliers for skill gain when inside menus, NOT in-game */ skillGainMultiplers: Record; + /** Container Tpls that shoud be deprioritised when choosing where to take money from for payments */ + deprioritisedMoneyContainers: string[]; } export interface IRewardDetails { rewardCount: number; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IPmcConfig.d.ts index 2e68219..02c9c5b 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IPmcConfig.d.ts @@ -66,7 +66,9 @@ export interface IPmcTypes { bear: string; } export interface ISlotLootSettings { + /** Item Type whitelist */ whitelist: string[]; + /** item tpl blacklist */ blacklist: string[]; } export interface IMinMaxLootValue extends MinMax { diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IRagfairConfig.d.ts index 36122c5..805a6b2 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IRagfairConfig.d.ts @@ -75,6 +75,8 @@ export interface IDynamic { blacklist: IRagfairBlacklist; /** Dict of price limits keyed by item type */ unreasonableModPrices: Record; + /** Custom rouble prices for items to override values from prices.json */ + itemPriceOverrideRouble: Record; } export interface IPriceRanges { default: MinMax; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/ISeasonalEventConfig.d.ts index 5e119fa..bf93685 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -6,6 +6,8 @@ export interface ISeasonalEventConfig extends IBaseConfig { enableSeasonalEventDetection: boolean; /** event / botType / equipSlot / itemid */ eventGear: Record>>>; + /** event / bot type / equipSlot / itemid */ + eventLoot: Record>>>; events: ISeasonalEvent[]; eventBotMapping: Record; eventBossSpawns: Record>; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/BotNameService.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/BotNameService.d.ts index 056bd0f..349964d 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/BotNameService.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/BotNameService.d.ts @@ -1,5 +1,6 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; @@ -38,10 +39,13 @@ export declare class BotNameService { */ generateUniqueBotNickname(botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails, botRole: string, uniqueRoles?: string[]): string; /** - * Should this bot have a name like "name (Pmc Name)" - * @param botRole Role bot has - * @returns True if name should be simulated pscav + * Add random PMC name to bots MainProfileNickname property + * @param bot Bot to update */ - protected shouldSimulatePlayerScavName(botRole: string): boolean; - protected addPlayerScavNameSimulationSuffix(nickname: string): string; + addRandomPmcNameToBotMainProfileNicknameProperty(bot: IBotBase): void; + /** + * Choose a random PMC name from bear or usec bot jsons + * @returns PMC name as string + */ + protected getRandomPMCName(): string; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/DatabaseService.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/DatabaseService.d.ts index 934617a..73575b1 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/DatabaseService.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/DatabaseService.d.ts @@ -85,7 +85,7 @@ export declare class DatabaseService { */ getCustomization(): Record; /** - * @returns assets/database/templates/items.json + * @returns assets/database/templates/handbook.json */ getHandbook(): IHandbookBase; /** @@ -101,7 +101,7 @@ export declare class DatabaseService { */ getProfiles(): IProfileTemplates; /** - * @returns assets/database/templates/items.json + * @returns assets/database/templates/quests.json */ getQuests(): Record; /** diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/InsuranceService.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/InsuranceService.d.ts index ac9cff5..e52fa59 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/InsuranceService.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/InsuranceService.d.ts @@ -62,14 +62,6 @@ export declare class InsuranceService { * @returns Timestamp to return items to player in seconds */ protected getInsuranceReturnTimestamp(pmcData: IPmcData, trader: ITraderBase): number; - /** - * Take the insurance item packages within a profile session and ensure that each of the items in that package are - * not orphaned from their parent ID. - * - * @param sessionID The session ID to update insurance equipment packages in. - * @returns void - */ - protected adoptOrphanedInsEquipment(sessionID: string): void; protected getMaxInsuranceStorageTime(traderBase: ITraderBase): number; /** * Store lost gear post-raid inside profile, ready for later code to pick it up and mail it @@ -127,10 +119,4 @@ export declare class InsuranceService { * @returns price in roubles */ getRoublePriceToInsureItemWithTrader(pmcData: IPmcData, inventoryItem: IItem, traderId: string): number; - /** - * Returns the ID that should be used for a root-level Item's parentId property value within in the context of insurance. - * @param sessionID Players id - * @returns The root item Id. - */ - getRootItemParentID(sessionID: string): string; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/PaymentService.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/PaymentService.d.ts index f6ec79d..78fdfb6 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/PaymentService.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/PaymentService.d.ts @@ -8,7 +8,9 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IProcessBuyTradeRequestData } from "@spt/models/eft/trade/IProcessBuyTradeRequestData"; import { IProcessSellTradeRequestData } from "@spt/models/eft/trade/IProcessSellTradeRequestData"; +import { IInventoryConfig } from "@spt/models/spt/config/IInventoryConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { HashUtil } from "@spt/utils/HashUtil"; @@ -24,7 +26,9 @@ export declare class PaymentService { protected inventoryHelper: InventoryHelper; protected localisationService: LocalisationService; protected paymentHelper: PaymentHelper; - constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper); + protected configServer: ConfigServer; + protected inventoryConfig: IInventoryConfig; + constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper, configServer: ConfigServer); /** * Take money and insert items into return to server request * @param pmcData Pmc profile diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/PostDbLoadService.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/PostDbLoadService.d.ts index c9e4bbe..cc51311 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/PostDbLoadService.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/PostDbLoadService.d.ts @@ -74,4 +74,6 @@ export declare class PostDbLoadService { */ protected validateQuestAssortUnlocksExist(): void; protected setAllDbItemsAsSellableOnFlea(): void; + protected addMissingTraderBuyRestrictionMaxValue(): void; + protected applyFleaPriceOverrides(): void; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/ProfileFixerService.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/ProfileFixerService.d.ts index 4a3a5ff..cbbe1d0 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/ProfileFixerService.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/ProfileFixerService.d.ts @@ -47,6 +47,12 @@ export declare class ProfileFixerService { * @param pmcProfile profile to check and fix */ checkForAndFixPmcProfileIssues(pmcProfile: IPmcData): void; + /** + * Resolve any dialogue attachments that were accidentally created using the player's equipment ID as + * the stash root object ID + * @param fullProfile + */ + checkForAndFixDialogueAttachments(fullProfile: ISptProfile): void; /** * Find issues in the scav profile data that may cause issues * @param scavProfile profile to check and fix diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/SeasonalEventService.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/SeasonalEventService.d.ts index 446cccc..26b74ef 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/SeasonalEventService.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/SeasonalEventService.d.ts @@ -88,6 +88,12 @@ export declare class SeasonalEventService { * @returns bots with equipment changes */ protected getEventBotGear(eventType: SeasonalEventType): Record>>; + /** + * Get a dictionary of loot changes to apply to bots for a specific event e.g. Christmas/Halloween + * @param eventName Name of event to get gear changes for + * @returns bots with loot changes + */ + protected getEventBotLoot(eventType: SeasonalEventType): Record>>; /** * Get the dates each seasonal event starts and ends at * @returns Record with event name + start/end date @@ -108,7 +114,7 @@ export declare class SeasonalEventService { /** * Store active events inside class array property `currentlyActiveEvents` + set class properties: christmasEventActive/halloweenEventActive */ - protected cacheActiveEvents(): void; + cacheActiveEvents(): void; /** * Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER * @returns Season enum value @@ -171,6 +177,11 @@ export declare class SeasonalEventService { * @param eventName Name of the event to read equipment in from config */ protected addEventGearToBots(eventType: SeasonalEventType): void; + /** + * Read in data from seasonalEvents.json and add found loot items to bots + * @param eventName Name of the event to read loot in from config + */ + protected addEventLootToBots(eventType: SeasonalEventType): void; /** * Add pumpkin loot boxes to scavs */ diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/utils/App.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/utils/App.d.ts index db46d2c..0e4850e 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/utils/App.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/utils/App.d.ts @@ -4,10 +4,10 @@ import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { HttpServer } from "@spt/servers/HttpServer"; -import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { EncodingUtil } from "@spt/utils/EncodingUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; +import { DatabaseService } from "@spt/services/DatabaseService"; export declare class App { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/utils/ProgressWriter.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/utils/ProgressWriter.d.ts new file mode 100644 index 0000000..2641d3a --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/utils/ProgressWriter.d.ts @@ -0,0 +1,13 @@ +export declare class ProgressWriter { + private count; + private total?; + private done; + private barFillChar; + private barEmptyChar; + private maxBarLength; + constructor(total: number, maxBarLength?: number, barFillChar?: string, barEmptyChar?: string); + /** + * Increment the progress counter and update the progress bar display. + */ + increment(): void; +} diff --git a/TypeScript/4UseACustomConfigFile/types/generators/BotGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/BotGenerator.d.ts index 2c7bba6..a2291f4 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/BotGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/BotGenerator.d.ts @@ -5,6 +5,7 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { MinMax } from "@spt/models/common/MinMax"; +import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase"; import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; @@ -47,9 +48,10 @@ export declare class BotGenerator { * @param role e.g. assault / pmcbot * @param difficulty easy/normal/hard/impossible * @param botTemplate base bot template to use (e.g. assault/pmcbot) - * @returns + * profile PMC profile of player generating pscav + * @returns IBotBase */ - generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase; + generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType, profile: IPmcData): IBotBase; /** * Create 1 bot of the type/side/difficulty defined in botGenerationDetails * @param sessionId Session id @@ -79,6 +81,12 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; + /** + * Should this bot have a name like "name (Pmc Name)" and be alterd by client patch to be hostile to player + * @param botRole Role bot has + * @returns True if name should be simulated pscav + */ + protected shouldSimulatePlayerScav(botRole: string): boolean; /** * Get exp for kill by bot difficulty * @param experience Dict of difficulties and experience diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/RagfairOfferHelper.d.ts index 9dd5be3..0ff9c66 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/RagfairOfferHelper.d.ts @@ -91,6 +91,12 @@ export declare class RagfairOfferHelper { * @returns IRagfairOffer array */ getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcData: IPmcData): IRagfairOffer[]; + /** + * Get offers that have not exceeded buy limits + * @param possibleOffers offers to process + * @returns Offers + */ + protected getOffersInsideBuyRestrictionLimits(possibleOffers: IRagfairOffer[]): IRagfairOffer[]; /** * Check if offer is from trader standing the player does not have * @param offer Offer to check @@ -209,4 +215,10 @@ export declare class RagfairOfferHelper { * @returns True if in range */ protected itemQualityInRange(item: IItem, min: number, max: number): boolean; + /** + * Does this offer come from a trader + * @param offer Offer to check + * @returns True = from trader + */ + offerIsFromTrader(offer: IRagfairOffer): boolean; } diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/IBotBase.d.ts index d3fd87e..8609573 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/IBotBase.d.ts @@ -60,6 +60,7 @@ export interface IUnlockedInfo { export interface IInfo { EntryPoint: string; Nickname: string; + MainProfileNickname?: string; LowerNickname: string; Side: string; SquadInviteRestriction: boolean; diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IInventoryConfig.d.ts index af0ec79..00ba5b1 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IInventoryConfig.d.ts @@ -10,6 +10,8 @@ export interface IInventoryConfig extends IBaseConfig { customMoneyTpls: string[]; /** Multipliers for skill gain when inside menus, NOT in-game */ skillGainMultiplers: Record; + /** Container Tpls that shoud be deprioritised when choosing where to take money from for payments */ + deprioritisedMoneyContainers: string[]; } export interface IRewardDetails { rewardCount: number; diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IPmcConfig.d.ts index 2e68219..02c9c5b 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IPmcConfig.d.ts @@ -66,7 +66,9 @@ export interface IPmcTypes { bear: string; } export interface ISlotLootSettings { + /** Item Type whitelist */ whitelist: string[]; + /** item tpl blacklist */ blacklist: string[]; } export interface IMinMaxLootValue extends MinMax { diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IRagfairConfig.d.ts index 36122c5..805a6b2 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IRagfairConfig.d.ts @@ -75,6 +75,8 @@ export interface IDynamic { blacklist: IRagfairBlacklist; /** Dict of price limits keyed by item type */ unreasonableModPrices: Record; + /** Custom rouble prices for items to override values from prices.json */ + itemPriceOverrideRouble: Record; } export interface IPriceRanges { default: MinMax; diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/config/ISeasonalEventConfig.d.ts index 5e119fa..bf93685 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -6,6 +6,8 @@ export interface ISeasonalEventConfig extends IBaseConfig { enableSeasonalEventDetection: boolean; /** event / botType / equipSlot / itemid */ eventGear: Record>>>; + /** event / bot type / equipSlot / itemid */ + eventLoot: Record>>>; events: ISeasonalEvent[]; eventBotMapping: Record; eventBossSpawns: Record>; diff --git a/TypeScript/4UseACustomConfigFile/types/services/BotNameService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/BotNameService.d.ts index 056bd0f..349964d 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/BotNameService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/BotNameService.d.ts @@ -1,5 +1,6 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; @@ -38,10 +39,13 @@ export declare class BotNameService { */ generateUniqueBotNickname(botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails, botRole: string, uniqueRoles?: string[]): string; /** - * Should this bot have a name like "name (Pmc Name)" - * @param botRole Role bot has - * @returns True if name should be simulated pscav + * Add random PMC name to bots MainProfileNickname property + * @param bot Bot to update */ - protected shouldSimulatePlayerScavName(botRole: string): boolean; - protected addPlayerScavNameSimulationSuffix(nickname: string): string; + addRandomPmcNameToBotMainProfileNicknameProperty(bot: IBotBase): void; + /** + * Choose a random PMC name from bear or usec bot jsons + * @returns PMC name as string + */ + protected getRandomPMCName(): string; } diff --git a/TypeScript/4UseACustomConfigFile/types/services/DatabaseService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/DatabaseService.d.ts index 934617a..73575b1 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/DatabaseService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/DatabaseService.d.ts @@ -85,7 +85,7 @@ export declare class DatabaseService { */ getCustomization(): Record; /** - * @returns assets/database/templates/items.json + * @returns assets/database/templates/handbook.json */ getHandbook(): IHandbookBase; /** @@ -101,7 +101,7 @@ export declare class DatabaseService { */ getProfiles(): IProfileTemplates; /** - * @returns assets/database/templates/items.json + * @returns assets/database/templates/quests.json */ getQuests(): Record; /** diff --git a/TypeScript/4UseACustomConfigFile/types/services/InsuranceService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/InsuranceService.d.ts index ac9cff5..e52fa59 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/InsuranceService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/InsuranceService.d.ts @@ -62,14 +62,6 @@ export declare class InsuranceService { * @returns Timestamp to return items to player in seconds */ protected getInsuranceReturnTimestamp(pmcData: IPmcData, trader: ITraderBase): number; - /** - * Take the insurance item packages within a profile session and ensure that each of the items in that package are - * not orphaned from their parent ID. - * - * @param sessionID The session ID to update insurance equipment packages in. - * @returns void - */ - protected adoptOrphanedInsEquipment(sessionID: string): void; protected getMaxInsuranceStorageTime(traderBase: ITraderBase): number; /** * Store lost gear post-raid inside profile, ready for later code to pick it up and mail it @@ -127,10 +119,4 @@ export declare class InsuranceService { * @returns price in roubles */ getRoublePriceToInsureItemWithTrader(pmcData: IPmcData, inventoryItem: IItem, traderId: string): number; - /** - * Returns the ID that should be used for a root-level Item's parentId property value within in the context of insurance. - * @param sessionID Players id - * @returns The root item Id. - */ - getRootItemParentID(sessionID: string): string; } diff --git a/TypeScript/4UseACustomConfigFile/types/services/PaymentService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/PaymentService.d.ts index f6ec79d..78fdfb6 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/PaymentService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/PaymentService.d.ts @@ -8,7 +8,9 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IProcessBuyTradeRequestData } from "@spt/models/eft/trade/IProcessBuyTradeRequestData"; import { IProcessSellTradeRequestData } from "@spt/models/eft/trade/IProcessSellTradeRequestData"; +import { IInventoryConfig } from "@spt/models/spt/config/IInventoryConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { HashUtil } from "@spt/utils/HashUtil"; @@ -24,7 +26,9 @@ export declare class PaymentService { protected inventoryHelper: InventoryHelper; protected localisationService: LocalisationService; protected paymentHelper: PaymentHelper; - constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper); + protected configServer: ConfigServer; + protected inventoryConfig: IInventoryConfig; + constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper, configServer: ConfigServer); /** * Take money and insert items into return to server request * @param pmcData Pmc profile diff --git a/TypeScript/4UseACustomConfigFile/types/services/PostDbLoadService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/PostDbLoadService.d.ts index c9e4bbe..cc51311 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/PostDbLoadService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/PostDbLoadService.d.ts @@ -74,4 +74,6 @@ export declare class PostDbLoadService { */ protected validateQuestAssortUnlocksExist(): void; protected setAllDbItemsAsSellableOnFlea(): void; + protected addMissingTraderBuyRestrictionMaxValue(): void; + protected applyFleaPriceOverrides(): void; } diff --git a/TypeScript/4UseACustomConfigFile/types/services/ProfileFixerService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/ProfileFixerService.d.ts index 4a3a5ff..cbbe1d0 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/ProfileFixerService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/ProfileFixerService.d.ts @@ -47,6 +47,12 @@ export declare class ProfileFixerService { * @param pmcProfile profile to check and fix */ checkForAndFixPmcProfileIssues(pmcProfile: IPmcData): void; + /** + * Resolve any dialogue attachments that were accidentally created using the player's equipment ID as + * the stash root object ID + * @param fullProfile + */ + checkForAndFixDialogueAttachments(fullProfile: ISptProfile): void; /** * Find issues in the scav profile data that may cause issues * @param scavProfile profile to check and fix diff --git a/TypeScript/4UseACustomConfigFile/types/services/SeasonalEventService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/SeasonalEventService.d.ts index 446cccc..26b74ef 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/SeasonalEventService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/SeasonalEventService.d.ts @@ -88,6 +88,12 @@ export declare class SeasonalEventService { * @returns bots with equipment changes */ protected getEventBotGear(eventType: SeasonalEventType): Record>>; + /** + * Get a dictionary of loot changes to apply to bots for a specific event e.g. Christmas/Halloween + * @param eventName Name of event to get gear changes for + * @returns bots with loot changes + */ + protected getEventBotLoot(eventType: SeasonalEventType): Record>>; /** * Get the dates each seasonal event starts and ends at * @returns Record with event name + start/end date @@ -108,7 +114,7 @@ export declare class SeasonalEventService { /** * Store active events inside class array property `currentlyActiveEvents` + set class properties: christmasEventActive/halloweenEventActive */ - protected cacheActiveEvents(): void; + cacheActiveEvents(): void; /** * Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER * @returns Season enum value @@ -171,6 +177,11 @@ export declare class SeasonalEventService { * @param eventName Name of the event to read equipment in from config */ protected addEventGearToBots(eventType: SeasonalEventType): void; + /** + * Read in data from seasonalEvents.json and add found loot items to bots + * @param eventName Name of the event to read loot in from config + */ + protected addEventLootToBots(eventType: SeasonalEventType): void; /** * Add pumpkin loot boxes to scavs */ diff --git a/TypeScript/4UseACustomConfigFile/types/utils/App.d.ts b/TypeScript/4UseACustomConfigFile/types/utils/App.d.ts index db46d2c..0e4850e 100644 --- a/TypeScript/4UseACustomConfigFile/types/utils/App.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/utils/App.d.ts @@ -4,10 +4,10 @@ import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { HttpServer } from "@spt/servers/HttpServer"; -import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { EncodingUtil } from "@spt/utils/EncodingUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; +import { DatabaseService } from "@spt/services/DatabaseService"; export declare class App { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/4UseACustomConfigFile/types/utils/ProgressWriter.d.ts b/TypeScript/4UseACustomConfigFile/types/utils/ProgressWriter.d.ts new file mode 100644 index 0000000..2641d3a --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/utils/ProgressWriter.d.ts @@ -0,0 +1,13 @@ +export declare class ProgressWriter { + private count; + private total?; + private done; + private barFillChar; + private barEmptyChar; + private maxBarLength; + constructor(total: number, maxBarLength?: number, barFillChar?: string, barEmptyChar?: string); + /** + * Increment the progress counter and update the progress bar display. + */ + increment(): void; +} diff --git a/TypeScript/5ReplaceMethod/types/generators/BotGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/BotGenerator.d.ts index 2c7bba6..a2291f4 100644 --- a/TypeScript/5ReplaceMethod/types/generators/BotGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/BotGenerator.d.ts @@ -5,6 +5,7 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { MinMax } from "@spt/models/common/MinMax"; +import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase"; import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; @@ -47,9 +48,10 @@ export declare class BotGenerator { * @param role e.g. assault / pmcbot * @param difficulty easy/normal/hard/impossible * @param botTemplate base bot template to use (e.g. assault/pmcbot) - * @returns + * profile PMC profile of player generating pscav + * @returns IBotBase */ - generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase; + generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType, profile: IPmcData): IBotBase; /** * Create 1 bot of the type/side/difficulty defined in botGenerationDetails * @param sessionId Session id @@ -79,6 +81,12 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; + /** + * Should this bot have a name like "name (Pmc Name)" and be alterd by client patch to be hostile to player + * @param botRole Role bot has + * @returns True if name should be simulated pscav + */ + protected shouldSimulatePlayerScav(botRole: string): boolean; /** * Get exp for kill by bot difficulty * @param experience Dict of difficulties and experience diff --git a/TypeScript/5ReplaceMethod/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/RagfairOfferHelper.d.ts index 9dd5be3..0ff9c66 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/RagfairOfferHelper.d.ts @@ -91,6 +91,12 @@ export declare class RagfairOfferHelper { * @returns IRagfairOffer array */ getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcData: IPmcData): IRagfairOffer[]; + /** + * Get offers that have not exceeded buy limits + * @param possibleOffers offers to process + * @returns Offers + */ + protected getOffersInsideBuyRestrictionLimits(possibleOffers: IRagfairOffer[]): IRagfairOffer[]; /** * Check if offer is from trader standing the player does not have * @param offer Offer to check @@ -209,4 +215,10 @@ export declare class RagfairOfferHelper { * @returns True if in range */ protected itemQualityInRange(item: IItem, min: number, max: number): boolean; + /** + * Does this offer come from a trader + * @param offer Offer to check + * @returns True = from trader + */ + offerIsFromTrader(offer: IRagfairOffer): boolean; } diff --git a/TypeScript/5ReplaceMethod/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/common/tables/IBotBase.d.ts index d3fd87e..8609573 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/common/tables/IBotBase.d.ts @@ -60,6 +60,7 @@ export interface IUnlockedInfo { export interface IInfo { EntryPoint: string; Nickname: string; + MainProfileNickname?: string; LowerNickname: string; Side: string; SquadInviteRestriction: boolean; diff --git a/TypeScript/5ReplaceMethod/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/config/IInventoryConfig.d.ts index af0ec79..00ba5b1 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/config/IInventoryConfig.d.ts @@ -10,6 +10,8 @@ export interface IInventoryConfig extends IBaseConfig { customMoneyTpls: string[]; /** Multipliers for skill gain when inside menus, NOT in-game */ skillGainMultiplers: Record; + /** Container Tpls that shoud be deprioritised when choosing where to take money from for payments */ + deprioritisedMoneyContainers: string[]; } export interface IRewardDetails { rewardCount: number; diff --git a/TypeScript/5ReplaceMethod/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/config/IPmcConfig.d.ts index 2e68219..02c9c5b 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/config/IPmcConfig.d.ts @@ -66,7 +66,9 @@ export interface IPmcTypes { bear: string; } export interface ISlotLootSettings { + /** Item Type whitelist */ whitelist: string[]; + /** item tpl blacklist */ blacklist: string[]; } export interface IMinMaxLootValue extends MinMax { diff --git a/TypeScript/5ReplaceMethod/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/config/IRagfairConfig.d.ts index 36122c5..805a6b2 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/config/IRagfairConfig.d.ts @@ -75,6 +75,8 @@ export interface IDynamic { blacklist: IRagfairBlacklist; /** Dict of price limits keyed by item type */ unreasonableModPrices: Record; + /** Custom rouble prices for items to override values from prices.json */ + itemPriceOverrideRouble: Record; } export interface IPriceRanges { default: MinMax; diff --git a/TypeScript/5ReplaceMethod/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/config/ISeasonalEventConfig.d.ts index 5e119fa..bf93685 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -6,6 +6,8 @@ export interface ISeasonalEventConfig extends IBaseConfig { enableSeasonalEventDetection: boolean; /** event / botType / equipSlot / itemid */ eventGear: Record>>>; + /** event / bot type / equipSlot / itemid */ + eventLoot: Record>>>; events: ISeasonalEvent[]; eventBotMapping: Record; eventBossSpawns: Record>; diff --git a/TypeScript/5ReplaceMethod/types/services/BotNameService.d.ts b/TypeScript/5ReplaceMethod/types/services/BotNameService.d.ts index 056bd0f..349964d 100644 --- a/TypeScript/5ReplaceMethod/types/services/BotNameService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/BotNameService.d.ts @@ -1,5 +1,6 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; @@ -38,10 +39,13 @@ export declare class BotNameService { */ generateUniqueBotNickname(botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails, botRole: string, uniqueRoles?: string[]): string; /** - * Should this bot have a name like "name (Pmc Name)" - * @param botRole Role bot has - * @returns True if name should be simulated pscav + * Add random PMC name to bots MainProfileNickname property + * @param bot Bot to update */ - protected shouldSimulatePlayerScavName(botRole: string): boolean; - protected addPlayerScavNameSimulationSuffix(nickname: string): string; + addRandomPmcNameToBotMainProfileNicknameProperty(bot: IBotBase): void; + /** + * Choose a random PMC name from bear or usec bot jsons + * @returns PMC name as string + */ + protected getRandomPMCName(): string; } diff --git a/TypeScript/5ReplaceMethod/types/services/DatabaseService.d.ts b/TypeScript/5ReplaceMethod/types/services/DatabaseService.d.ts index 934617a..73575b1 100644 --- a/TypeScript/5ReplaceMethod/types/services/DatabaseService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/DatabaseService.d.ts @@ -85,7 +85,7 @@ export declare class DatabaseService { */ getCustomization(): Record; /** - * @returns assets/database/templates/items.json + * @returns assets/database/templates/handbook.json */ getHandbook(): IHandbookBase; /** @@ -101,7 +101,7 @@ export declare class DatabaseService { */ getProfiles(): IProfileTemplates; /** - * @returns assets/database/templates/items.json + * @returns assets/database/templates/quests.json */ getQuests(): Record; /** diff --git a/TypeScript/5ReplaceMethod/types/services/InsuranceService.d.ts b/TypeScript/5ReplaceMethod/types/services/InsuranceService.d.ts index ac9cff5..e52fa59 100644 --- a/TypeScript/5ReplaceMethod/types/services/InsuranceService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/InsuranceService.d.ts @@ -62,14 +62,6 @@ export declare class InsuranceService { * @returns Timestamp to return items to player in seconds */ protected getInsuranceReturnTimestamp(pmcData: IPmcData, trader: ITraderBase): number; - /** - * Take the insurance item packages within a profile session and ensure that each of the items in that package are - * not orphaned from their parent ID. - * - * @param sessionID The session ID to update insurance equipment packages in. - * @returns void - */ - protected adoptOrphanedInsEquipment(sessionID: string): void; protected getMaxInsuranceStorageTime(traderBase: ITraderBase): number; /** * Store lost gear post-raid inside profile, ready for later code to pick it up and mail it @@ -127,10 +119,4 @@ export declare class InsuranceService { * @returns price in roubles */ getRoublePriceToInsureItemWithTrader(pmcData: IPmcData, inventoryItem: IItem, traderId: string): number; - /** - * Returns the ID that should be used for a root-level Item's parentId property value within in the context of insurance. - * @param sessionID Players id - * @returns The root item Id. - */ - getRootItemParentID(sessionID: string): string; } diff --git a/TypeScript/5ReplaceMethod/types/services/PaymentService.d.ts b/TypeScript/5ReplaceMethod/types/services/PaymentService.d.ts index f6ec79d..78fdfb6 100644 --- a/TypeScript/5ReplaceMethod/types/services/PaymentService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/PaymentService.d.ts @@ -8,7 +8,9 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IProcessBuyTradeRequestData } from "@spt/models/eft/trade/IProcessBuyTradeRequestData"; import { IProcessSellTradeRequestData } from "@spt/models/eft/trade/IProcessSellTradeRequestData"; +import { IInventoryConfig } from "@spt/models/spt/config/IInventoryConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { HashUtil } from "@spt/utils/HashUtil"; @@ -24,7 +26,9 @@ export declare class PaymentService { protected inventoryHelper: InventoryHelper; protected localisationService: LocalisationService; protected paymentHelper: PaymentHelper; - constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper); + protected configServer: ConfigServer; + protected inventoryConfig: IInventoryConfig; + constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper, configServer: ConfigServer); /** * Take money and insert items into return to server request * @param pmcData Pmc profile diff --git a/TypeScript/5ReplaceMethod/types/services/PostDbLoadService.d.ts b/TypeScript/5ReplaceMethod/types/services/PostDbLoadService.d.ts index c9e4bbe..cc51311 100644 --- a/TypeScript/5ReplaceMethod/types/services/PostDbLoadService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/PostDbLoadService.d.ts @@ -74,4 +74,6 @@ export declare class PostDbLoadService { */ protected validateQuestAssortUnlocksExist(): void; protected setAllDbItemsAsSellableOnFlea(): void; + protected addMissingTraderBuyRestrictionMaxValue(): void; + protected applyFleaPriceOverrides(): void; } diff --git a/TypeScript/5ReplaceMethod/types/services/ProfileFixerService.d.ts b/TypeScript/5ReplaceMethod/types/services/ProfileFixerService.d.ts index 4a3a5ff..cbbe1d0 100644 --- a/TypeScript/5ReplaceMethod/types/services/ProfileFixerService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/ProfileFixerService.d.ts @@ -47,6 +47,12 @@ export declare class ProfileFixerService { * @param pmcProfile profile to check and fix */ checkForAndFixPmcProfileIssues(pmcProfile: IPmcData): void; + /** + * Resolve any dialogue attachments that were accidentally created using the player's equipment ID as + * the stash root object ID + * @param fullProfile + */ + checkForAndFixDialogueAttachments(fullProfile: ISptProfile): void; /** * Find issues in the scav profile data that may cause issues * @param scavProfile profile to check and fix diff --git a/TypeScript/5ReplaceMethod/types/services/SeasonalEventService.d.ts b/TypeScript/5ReplaceMethod/types/services/SeasonalEventService.d.ts index 446cccc..26b74ef 100644 --- a/TypeScript/5ReplaceMethod/types/services/SeasonalEventService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/SeasonalEventService.d.ts @@ -88,6 +88,12 @@ export declare class SeasonalEventService { * @returns bots with equipment changes */ protected getEventBotGear(eventType: SeasonalEventType): Record>>; + /** + * Get a dictionary of loot changes to apply to bots for a specific event e.g. Christmas/Halloween + * @param eventName Name of event to get gear changes for + * @returns bots with loot changes + */ + protected getEventBotLoot(eventType: SeasonalEventType): Record>>; /** * Get the dates each seasonal event starts and ends at * @returns Record with event name + start/end date @@ -108,7 +114,7 @@ export declare class SeasonalEventService { /** * Store active events inside class array property `currentlyActiveEvents` + set class properties: christmasEventActive/halloweenEventActive */ - protected cacheActiveEvents(): void; + cacheActiveEvents(): void; /** * Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER * @returns Season enum value @@ -171,6 +177,11 @@ export declare class SeasonalEventService { * @param eventName Name of the event to read equipment in from config */ protected addEventGearToBots(eventType: SeasonalEventType): void; + /** + * Read in data from seasonalEvents.json and add found loot items to bots + * @param eventName Name of the event to read loot in from config + */ + protected addEventLootToBots(eventType: SeasonalEventType): void; /** * Add pumpkin loot boxes to scavs */ diff --git a/TypeScript/5ReplaceMethod/types/utils/App.d.ts b/TypeScript/5ReplaceMethod/types/utils/App.d.ts index db46d2c..0e4850e 100644 --- a/TypeScript/5ReplaceMethod/types/utils/App.d.ts +++ b/TypeScript/5ReplaceMethod/types/utils/App.d.ts @@ -4,10 +4,10 @@ import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { HttpServer } from "@spt/servers/HttpServer"; -import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { EncodingUtil } from "@spt/utils/EncodingUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; +import { DatabaseService } from "@spt/services/DatabaseService"; export declare class App { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/5ReplaceMethod/types/utils/ProgressWriter.d.ts b/TypeScript/5ReplaceMethod/types/utils/ProgressWriter.d.ts new file mode 100644 index 0000000..2641d3a --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/utils/ProgressWriter.d.ts @@ -0,0 +1,13 @@ +export declare class ProgressWriter { + private count; + private total?; + private done; + private barFillChar; + private barEmptyChar; + private maxBarLength; + constructor(total: number, maxBarLength?: number, barFillChar?: string, barEmptyChar?: string); + /** + * Increment the progress counter and update the progress bar display. + */ + increment(): void; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/BotGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/BotGenerator.d.ts index 2c7bba6..a2291f4 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/BotGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/BotGenerator.d.ts @@ -5,6 +5,7 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { MinMax } from "@spt/models/common/MinMax"; +import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase"; import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; @@ -47,9 +48,10 @@ export declare class BotGenerator { * @param role e.g. assault / pmcbot * @param difficulty easy/normal/hard/impossible * @param botTemplate base bot template to use (e.g. assault/pmcbot) - * @returns + * profile PMC profile of player generating pscav + * @returns IBotBase */ - generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase; + generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType, profile: IPmcData): IBotBase; /** * Create 1 bot of the type/side/difficulty defined in botGenerationDetails * @param sessionId Session id @@ -79,6 +81,12 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; + /** + * Should this bot have a name like "name (Pmc Name)" and be alterd by client patch to be hostile to player + * @param botRole Role bot has + * @returns True if name should be simulated pscav + */ + protected shouldSimulatePlayerScav(botRole: string): boolean; /** * Get exp for kill by bot difficulty * @param experience Dict of difficulties and experience diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/RagfairOfferHelper.d.ts index 9dd5be3..0ff9c66 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/RagfairOfferHelper.d.ts @@ -91,6 +91,12 @@ export declare class RagfairOfferHelper { * @returns IRagfairOffer array */ getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcData: IPmcData): IRagfairOffer[]; + /** + * Get offers that have not exceeded buy limits + * @param possibleOffers offers to process + * @returns Offers + */ + protected getOffersInsideBuyRestrictionLimits(possibleOffers: IRagfairOffer[]): IRagfairOffer[]; /** * Check if offer is from trader standing the player does not have * @param offer Offer to check @@ -209,4 +215,10 @@ export declare class RagfairOfferHelper { * @returns True if in range */ protected itemQualityInRange(item: IItem, min: number, max: number): boolean; + /** + * Does this offer come from a trader + * @param offer Offer to check + * @returns True = from trader + */ + offerIsFromTrader(offer: IRagfairOffer): boolean; } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/IBotBase.d.ts index d3fd87e..8609573 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/IBotBase.d.ts @@ -60,6 +60,7 @@ export interface IUnlockedInfo { export interface IInfo { EntryPoint: string; Nickname: string; + MainProfileNickname?: string; LowerNickname: string; Side: string; SquadInviteRestriction: boolean; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IInventoryConfig.d.ts index af0ec79..00ba5b1 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IInventoryConfig.d.ts @@ -10,6 +10,8 @@ export interface IInventoryConfig extends IBaseConfig { customMoneyTpls: string[]; /** Multipliers for skill gain when inside menus, NOT in-game */ skillGainMultiplers: Record; + /** Container Tpls that shoud be deprioritised when choosing where to take money from for payments */ + deprioritisedMoneyContainers: string[]; } export interface IRewardDetails { rewardCount: number; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IPmcConfig.d.ts index 2e68219..02c9c5b 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IPmcConfig.d.ts @@ -66,7 +66,9 @@ export interface IPmcTypes { bear: string; } export interface ISlotLootSettings { + /** Item Type whitelist */ whitelist: string[]; + /** item tpl blacklist */ blacklist: string[]; } export interface IMinMaxLootValue extends MinMax { diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IRagfairConfig.d.ts index 36122c5..805a6b2 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IRagfairConfig.d.ts @@ -75,6 +75,8 @@ export interface IDynamic { blacklist: IRagfairBlacklist; /** Dict of price limits keyed by item type */ unreasonableModPrices: Record; + /** Custom rouble prices for items to override values from prices.json */ + itemPriceOverrideRouble: Record; } export interface IPriceRanges { default: MinMax; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ISeasonalEventConfig.d.ts index 5e119fa..bf93685 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -6,6 +6,8 @@ export interface ISeasonalEventConfig extends IBaseConfig { enableSeasonalEventDetection: boolean; /** event / botType / equipSlot / itemid */ eventGear: Record>>>; + /** event / bot type / equipSlot / itemid */ + eventLoot: Record>>>; events: ISeasonalEvent[]; eventBotMapping: Record; eventBossSpawns: Record>; diff --git a/TypeScript/6ReferenceAnotherClass/types/services/BotNameService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/BotNameService.d.ts index 056bd0f..349964d 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/BotNameService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/BotNameService.d.ts @@ -1,5 +1,6 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; @@ -38,10 +39,13 @@ export declare class BotNameService { */ generateUniqueBotNickname(botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails, botRole: string, uniqueRoles?: string[]): string; /** - * Should this bot have a name like "name (Pmc Name)" - * @param botRole Role bot has - * @returns True if name should be simulated pscav + * Add random PMC name to bots MainProfileNickname property + * @param bot Bot to update */ - protected shouldSimulatePlayerScavName(botRole: string): boolean; - protected addPlayerScavNameSimulationSuffix(nickname: string): string; + addRandomPmcNameToBotMainProfileNicknameProperty(bot: IBotBase): void; + /** + * Choose a random PMC name from bear or usec bot jsons + * @returns PMC name as string + */ + protected getRandomPMCName(): string; } diff --git a/TypeScript/6ReferenceAnotherClass/types/services/DatabaseService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/DatabaseService.d.ts index 934617a..73575b1 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/DatabaseService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/DatabaseService.d.ts @@ -85,7 +85,7 @@ export declare class DatabaseService { */ getCustomization(): Record; /** - * @returns assets/database/templates/items.json + * @returns assets/database/templates/handbook.json */ getHandbook(): IHandbookBase; /** @@ -101,7 +101,7 @@ export declare class DatabaseService { */ getProfiles(): IProfileTemplates; /** - * @returns assets/database/templates/items.json + * @returns assets/database/templates/quests.json */ getQuests(): Record; /** diff --git a/TypeScript/6ReferenceAnotherClass/types/services/InsuranceService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/InsuranceService.d.ts index ac9cff5..e52fa59 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/InsuranceService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/InsuranceService.d.ts @@ -62,14 +62,6 @@ export declare class InsuranceService { * @returns Timestamp to return items to player in seconds */ protected getInsuranceReturnTimestamp(pmcData: IPmcData, trader: ITraderBase): number; - /** - * Take the insurance item packages within a profile session and ensure that each of the items in that package are - * not orphaned from their parent ID. - * - * @param sessionID The session ID to update insurance equipment packages in. - * @returns void - */ - protected adoptOrphanedInsEquipment(sessionID: string): void; protected getMaxInsuranceStorageTime(traderBase: ITraderBase): number; /** * Store lost gear post-raid inside profile, ready for later code to pick it up and mail it @@ -127,10 +119,4 @@ export declare class InsuranceService { * @returns price in roubles */ getRoublePriceToInsureItemWithTrader(pmcData: IPmcData, inventoryItem: IItem, traderId: string): number; - /** - * Returns the ID that should be used for a root-level Item's parentId property value within in the context of insurance. - * @param sessionID Players id - * @returns The root item Id. - */ - getRootItemParentID(sessionID: string): string; } diff --git a/TypeScript/6ReferenceAnotherClass/types/services/PaymentService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/PaymentService.d.ts index f6ec79d..78fdfb6 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/PaymentService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/PaymentService.d.ts @@ -8,7 +8,9 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IProcessBuyTradeRequestData } from "@spt/models/eft/trade/IProcessBuyTradeRequestData"; import { IProcessSellTradeRequestData } from "@spt/models/eft/trade/IProcessSellTradeRequestData"; +import { IInventoryConfig } from "@spt/models/spt/config/IInventoryConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { HashUtil } from "@spt/utils/HashUtil"; @@ -24,7 +26,9 @@ export declare class PaymentService { protected inventoryHelper: InventoryHelper; protected localisationService: LocalisationService; protected paymentHelper: PaymentHelper; - constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper); + protected configServer: ConfigServer; + protected inventoryConfig: IInventoryConfig; + constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper, configServer: ConfigServer); /** * Take money and insert items into return to server request * @param pmcData Pmc profile diff --git a/TypeScript/6ReferenceAnotherClass/types/services/PostDbLoadService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/PostDbLoadService.d.ts index c9e4bbe..cc51311 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/PostDbLoadService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/PostDbLoadService.d.ts @@ -74,4 +74,6 @@ export declare class PostDbLoadService { */ protected validateQuestAssortUnlocksExist(): void; protected setAllDbItemsAsSellableOnFlea(): void; + protected addMissingTraderBuyRestrictionMaxValue(): void; + protected applyFleaPriceOverrides(): void; } diff --git a/TypeScript/6ReferenceAnotherClass/types/services/ProfileFixerService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/ProfileFixerService.d.ts index 4a3a5ff..cbbe1d0 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/ProfileFixerService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/ProfileFixerService.d.ts @@ -47,6 +47,12 @@ export declare class ProfileFixerService { * @param pmcProfile profile to check and fix */ checkForAndFixPmcProfileIssues(pmcProfile: IPmcData): void; + /** + * Resolve any dialogue attachments that were accidentally created using the player's equipment ID as + * the stash root object ID + * @param fullProfile + */ + checkForAndFixDialogueAttachments(fullProfile: ISptProfile): void; /** * Find issues in the scav profile data that may cause issues * @param scavProfile profile to check and fix diff --git a/TypeScript/6ReferenceAnotherClass/types/services/SeasonalEventService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/SeasonalEventService.d.ts index 446cccc..26b74ef 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/SeasonalEventService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/SeasonalEventService.d.ts @@ -88,6 +88,12 @@ export declare class SeasonalEventService { * @returns bots with equipment changes */ protected getEventBotGear(eventType: SeasonalEventType): Record>>; + /** + * Get a dictionary of loot changes to apply to bots for a specific event e.g. Christmas/Halloween + * @param eventName Name of event to get gear changes for + * @returns bots with loot changes + */ + protected getEventBotLoot(eventType: SeasonalEventType): Record>>; /** * Get the dates each seasonal event starts and ends at * @returns Record with event name + start/end date @@ -108,7 +114,7 @@ export declare class SeasonalEventService { /** * Store active events inside class array property `currentlyActiveEvents` + set class properties: christmasEventActive/halloweenEventActive */ - protected cacheActiveEvents(): void; + cacheActiveEvents(): void; /** * Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER * @returns Season enum value @@ -171,6 +177,11 @@ export declare class SeasonalEventService { * @param eventName Name of the event to read equipment in from config */ protected addEventGearToBots(eventType: SeasonalEventType): void; + /** + * Read in data from seasonalEvents.json and add found loot items to bots + * @param eventName Name of the event to read loot in from config + */ + protected addEventLootToBots(eventType: SeasonalEventType): void; /** * Add pumpkin loot boxes to scavs */ diff --git a/TypeScript/6ReferenceAnotherClass/types/utils/App.d.ts b/TypeScript/6ReferenceAnotherClass/types/utils/App.d.ts index db46d2c..0e4850e 100644 --- a/TypeScript/6ReferenceAnotherClass/types/utils/App.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/utils/App.d.ts @@ -4,10 +4,10 @@ import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { HttpServer } from "@spt/servers/HttpServer"; -import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { EncodingUtil } from "@spt/utils/EncodingUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; +import { DatabaseService } from "@spt/services/DatabaseService"; export declare class App { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/6ReferenceAnotherClass/types/utils/ProgressWriter.d.ts b/TypeScript/6ReferenceAnotherClass/types/utils/ProgressWriter.d.ts new file mode 100644 index 0000000..2641d3a --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/utils/ProgressWriter.d.ts @@ -0,0 +1,13 @@ +export declare class ProgressWriter { + private count; + private total?; + private done; + private barFillChar; + private barEmptyChar; + private maxBarLength; + constructor(total: number, maxBarLength?: number, barFillChar?: string, barEmptyChar?: string); + /** + * Increment the progress counter and update the progress bar display. + */ + increment(): void; +} diff --git a/TypeScript/7OnLoadHook/types/generators/BotGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/BotGenerator.d.ts index 2c7bba6..a2291f4 100644 --- a/TypeScript/7OnLoadHook/types/generators/BotGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/BotGenerator.d.ts @@ -5,6 +5,7 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { MinMax } from "@spt/models/common/MinMax"; +import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase"; import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; @@ -47,9 +48,10 @@ export declare class BotGenerator { * @param role e.g. assault / pmcbot * @param difficulty easy/normal/hard/impossible * @param botTemplate base bot template to use (e.g. assault/pmcbot) - * @returns + * profile PMC profile of player generating pscav + * @returns IBotBase */ - generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase; + generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType, profile: IPmcData): IBotBase; /** * Create 1 bot of the type/side/difficulty defined in botGenerationDetails * @param sessionId Session id @@ -79,6 +81,12 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; + /** + * Should this bot have a name like "name (Pmc Name)" and be alterd by client patch to be hostile to player + * @param botRole Role bot has + * @returns True if name should be simulated pscav + */ + protected shouldSimulatePlayerScav(botRole: string): boolean; /** * Get exp for kill by bot difficulty * @param experience Dict of difficulties and experience diff --git a/TypeScript/7OnLoadHook/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/RagfairOfferHelper.d.ts index 9dd5be3..0ff9c66 100644 --- a/TypeScript/7OnLoadHook/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/RagfairOfferHelper.d.ts @@ -91,6 +91,12 @@ export declare class RagfairOfferHelper { * @returns IRagfairOffer array */ getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcData: IPmcData): IRagfairOffer[]; + /** + * Get offers that have not exceeded buy limits + * @param possibleOffers offers to process + * @returns Offers + */ + protected getOffersInsideBuyRestrictionLimits(possibleOffers: IRagfairOffer[]): IRagfairOffer[]; /** * Check if offer is from trader standing the player does not have * @param offer Offer to check @@ -209,4 +215,10 @@ export declare class RagfairOfferHelper { * @returns True if in range */ protected itemQualityInRange(item: IItem, min: number, max: number): boolean; + /** + * Does this offer come from a trader + * @param offer Offer to check + * @returns True = from trader + */ + offerIsFromTrader(offer: IRagfairOffer): boolean; } diff --git a/TypeScript/7OnLoadHook/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/7OnLoadHook/types/models/eft/common/tables/IBotBase.d.ts index d3fd87e..8609573 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/common/tables/IBotBase.d.ts @@ -60,6 +60,7 @@ export interface IUnlockedInfo { export interface IInfo { EntryPoint: string; Nickname: string; + MainProfileNickname?: string; LowerNickname: string; Side: string; SquadInviteRestriction: boolean; diff --git a/TypeScript/7OnLoadHook/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/7OnLoadHook/types/models/spt/config/IInventoryConfig.d.ts index af0ec79..00ba5b1 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/config/IInventoryConfig.d.ts @@ -10,6 +10,8 @@ export interface IInventoryConfig extends IBaseConfig { customMoneyTpls: string[]; /** Multipliers for skill gain when inside menus, NOT in-game */ skillGainMultiplers: Record; + /** Container Tpls that shoud be deprioritised when choosing where to take money from for payments */ + deprioritisedMoneyContainers: string[]; } export interface IRewardDetails { rewardCount: number; diff --git a/TypeScript/7OnLoadHook/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/7OnLoadHook/types/models/spt/config/IPmcConfig.d.ts index 2e68219..02c9c5b 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/config/IPmcConfig.d.ts @@ -66,7 +66,9 @@ export interface IPmcTypes { bear: string; } export interface ISlotLootSettings { + /** Item Type whitelist */ whitelist: string[]; + /** item tpl blacklist */ blacklist: string[]; } export interface IMinMaxLootValue extends MinMax { diff --git a/TypeScript/7OnLoadHook/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/7OnLoadHook/types/models/spt/config/IRagfairConfig.d.ts index 36122c5..805a6b2 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/config/IRagfairConfig.d.ts @@ -75,6 +75,8 @@ export interface IDynamic { blacklist: IRagfairBlacklist; /** Dict of price limits keyed by item type */ unreasonableModPrices: Record; + /** Custom rouble prices for items to override values from prices.json */ + itemPriceOverrideRouble: Record; } export interface IPriceRanges { default: MinMax; diff --git a/TypeScript/7OnLoadHook/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/7OnLoadHook/types/models/spt/config/ISeasonalEventConfig.d.ts index 5e119fa..bf93685 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -6,6 +6,8 @@ export interface ISeasonalEventConfig extends IBaseConfig { enableSeasonalEventDetection: boolean; /** event / botType / equipSlot / itemid */ eventGear: Record>>>; + /** event / bot type / equipSlot / itemid */ + eventLoot: Record>>>; events: ISeasonalEvent[]; eventBotMapping: Record; eventBossSpawns: Record>; diff --git a/TypeScript/7OnLoadHook/types/services/BotNameService.d.ts b/TypeScript/7OnLoadHook/types/services/BotNameService.d.ts index 056bd0f..349964d 100644 --- a/TypeScript/7OnLoadHook/types/services/BotNameService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/BotNameService.d.ts @@ -1,5 +1,6 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; @@ -38,10 +39,13 @@ export declare class BotNameService { */ generateUniqueBotNickname(botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails, botRole: string, uniqueRoles?: string[]): string; /** - * Should this bot have a name like "name (Pmc Name)" - * @param botRole Role bot has - * @returns True if name should be simulated pscav + * Add random PMC name to bots MainProfileNickname property + * @param bot Bot to update */ - protected shouldSimulatePlayerScavName(botRole: string): boolean; - protected addPlayerScavNameSimulationSuffix(nickname: string): string; + addRandomPmcNameToBotMainProfileNicknameProperty(bot: IBotBase): void; + /** + * Choose a random PMC name from bear or usec bot jsons + * @returns PMC name as string + */ + protected getRandomPMCName(): string; } diff --git a/TypeScript/7OnLoadHook/types/services/DatabaseService.d.ts b/TypeScript/7OnLoadHook/types/services/DatabaseService.d.ts index 934617a..73575b1 100644 --- a/TypeScript/7OnLoadHook/types/services/DatabaseService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/DatabaseService.d.ts @@ -85,7 +85,7 @@ export declare class DatabaseService { */ getCustomization(): Record; /** - * @returns assets/database/templates/items.json + * @returns assets/database/templates/handbook.json */ getHandbook(): IHandbookBase; /** @@ -101,7 +101,7 @@ export declare class DatabaseService { */ getProfiles(): IProfileTemplates; /** - * @returns assets/database/templates/items.json + * @returns assets/database/templates/quests.json */ getQuests(): Record; /** diff --git a/TypeScript/7OnLoadHook/types/services/InsuranceService.d.ts b/TypeScript/7OnLoadHook/types/services/InsuranceService.d.ts index ac9cff5..e52fa59 100644 --- a/TypeScript/7OnLoadHook/types/services/InsuranceService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/InsuranceService.d.ts @@ -62,14 +62,6 @@ export declare class InsuranceService { * @returns Timestamp to return items to player in seconds */ protected getInsuranceReturnTimestamp(pmcData: IPmcData, trader: ITraderBase): number; - /** - * Take the insurance item packages within a profile session and ensure that each of the items in that package are - * not orphaned from their parent ID. - * - * @param sessionID The session ID to update insurance equipment packages in. - * @returns void - */ - protected adoptOrphanedInsEquipment(sessionID: string): void; protected getMaxInsuranceStorageTime(traderBase: ITraderBase): number; /** * Store lost gear post-raid inside profile, ready for later code to pick it up and mail it @@ -127,10 +119,4 @@ export declare class InsuranceService { * @returns price in roubles */ getRoublePriceToInsureItemWithTrader(pmcData: IPmcData, inventoryItem: IItem, traderId: string): number; - /** - * Returns the ID that should be used for a root-level Item's parentId property value within in the context of insurance. - * @param sessionID Players id - * @returns The root item Id. - */ - getRootItemParentID(sessionID: string): string; } diff --git a/TypeScript/7OnLoadHook/types/services/PaymentService.d.ts b/TypeScript/7OnLoadHook/types/services/PaymentService.d.ts index f6ec79d..78fdfb6 100644 --- a/TypeScript/7OnLoadHook/types/services/PaymentService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/PaymentService.d.ts @@ -8,7 +8,9 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IProcessBuyTradeRequestData } from "@spt/models/eft/trade/IProcessBuyTradeRequestData"; import { IProcessSellTradeRequestData } from "@spt/models/eft/trade/IProcessSellTradeRequestData"; +import { IInventoryConfig } from "@spt/models/spt/config/IInventoryConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { HashUtil } from "@spt/utils/HashUtil"; @@ -24,7 +26,9 @@ export declare class PaymentService { protected inventoryHelper: InventoryHelper; protected localisationService: LocalisationService; protected paymentHelper: PaymentHelper; - constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper); + protected configServer: ConfigServer; + protected inventoryConfig: IInventoryConfig; + constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper, configServer: ConfigServer); /** * Take money and insert items into return to server request * @param pmcData Pmc profile diff --git a/TypeScript/7OnLoadHook/types/services/PostDbLoadService.d.ts b/TypeScript/7OnLoadHook/types/services/PostDbLoadService.d.ts index c9e4bbe..cc51311 100644 --- a/TypeScript/7OnLoadHook/types/services/PostDbLoadService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/PostDbLoadService.d.ts @@ -74,4 +74,6 @@ export declare class PostDbLoadService { */ protected validateQuestAssortUnlocksExist(): void; protected setAllDbItemsAsSellableOnFlea(): void; + protected addMissingTraderBuyRestrictionMaxValue(): void; + protected applyFleaPriceOverrides(): void; } diff --git a/TypeScript/7OnLoadHook/types/services/ProfileFixerService.d.ts b/TypeScript/7OnLoadHook/types/services/ProfileFixerService.d.ts index 4a3a5ff..cbbe1d0 100644 --- a/TypeScript/7OnLoadHook/types/services/ProfileFixerService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/ProfileFixerService.d.ts @@ -47,6 +47,12 @@ export declare class ProfileFixerService { * @param pmcProfile profile to check and fix */ checkForAndFixPmcProfileIssues(pmcProfile: IPmcData): void; + /** + * Resolve any dialogue attachments that were accidentally created using the player's equipment ID as + * the stash root object ID + * @param fullProfile + */ + checkForAndFixDialogueAttachments(fullProfile: ISptProfile): void; /** * Find issues in the scav profile data that may cause issues * @param scavProfile profile to check and fix diff --git a/TypeScript/7OnLoadHook/types/services/SeasonalEventService.d.ts b/TypeScript/7OnLoadHook/types/services/SeasonalEventService.d.ts index 446cccc..26b74ef 100644 --- a/TypeScript/7OnLoadHook/types/services/SeasonalEventService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/SeasonalEventService.d.ts @@ -88,6 +88,12 @@ export declare class SeasonalEventService { * @returns bots with equipment changes */ protected getEventBotGear(eventType: SeasonalEventType): Record>>; + /** + * Get a dictionary of loot changes to apply to bots for a specific event e.g. Christmas/Halloween + * @param eventName Name of event to get gear changes for + * @returns bots with loot changes + */ + protected getEventBotLoot(eventType: SeasonalEventType): Record>>; /** * Get the dates each seasonal event starts and ends at * @returns Record with event name + start/end date @@ -108,7 +114,7 @@ export declare class SeasonalEventService { /** * Store active events inside class array property `currentlyActiveEvents` + set class properties: christmasEventActive/halloweenEventActive */ - protected cacheActiveEvents(): void; + cacheActiveEvents(): void; /** * Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER * @returns Season enum value @@ -171,6 +177,11 @@ export declare class SeasonalEventService { * @param eventName Name of the event to read equipment in from config */ protected addEventGearToBots(eventType: SeasonalEventType): void; + /** + * Read in data from seasonalEvents.json and add found loot items to bots + * @param eventName Name of the event to read loot in from config + */ + protected addEventLootToBots(eventType: SeasonalEventType): void; /** * Add pumpkin loot boxes to scavs */ diff --git a/TypeScript/7OnLoadHook/types/utils/App.d.ts b/TypeScript/7OnLoadHook/types/utils/App.d.ts index db46d2c..0e4850e 100644 --- a/TypeScript/7OnLoadHook/types/utils/App.d.ts +++ b/TypeScript/7OnLoadHook/types/utils/App.d.ts @@ -4,10 +4,10 @@ import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { HttpServer } from "@spt/servers/HttpServer"; -import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { EncodingUtil } from "@spt/utils/EncodingUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; +import { DatabaseService } from "@spt/services/DatabaseService"; export declare class App { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/7OnLoadHook/types/utils/ProgressWriter.d.ts b/TypeScript/7OnLoadHook/types/utils/ProgressWriter.d.ts new file mode 100644 index 0000000..2641d3a --- /dev/null +++ b/TypeScript/7OnLoadHook/types/utils/ProgressWriter.d.ts @@ -0,0 +1,13 @@ +export declare class ProgressWriter { + private count; + private total?; + private done; + private barFillChar; + private barEmptyChar; + private maxBarLength; + constructor(total: number, maxBarLength?: number, barFillChar?: string, barEmptyChar?: string); + /** + * Increment the progress counter and update the progress bar display. + */ + increment(): void; +} diff --git a/TypeScript/8OnUpdateHook/types/generators/BotGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/BotGenerator.d.ts index 2c7bba6..a2291f4 100644 --- a/TypeScript/8OnUpdateHook/types/generators/BotGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/BotGenerator.d.ts @@ -5,6 +5,7 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { MinMax } from "@spt/models/common/MinMax"; +import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase"; import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; @@ -47,9 +48,10 @@ export declare class BotGenerator { * @param role e.g. assault / pmcbot * @param difficulty easy/normal/hard/impossible * @param botTemplate base bot template to use (e.g. assault/pmcbot) - * @returns + * profile PMC profile of player generating pscav + * @returns IBotBase */ - generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase; + generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType, profile: IPmcData): IBotBase; /** * Create 1 bot of the type/side/difficulty defined in botGenerationDetails * @param sessionId Session id @@ -79,6 +81,12 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; + /** + * Should this bot have a name like "name (Pmc Name)" and be alterd by client patch to be hostile to player + * @param botRole Role bot has + * @returns True if name should be simulated pscav + */ + protected shouldSimulatePlayerScav(botRole: string): boolean; /** * Get exp for kill by bot difficulty * @param experience Dict of difficulties and experience diff --git a/TypeScript/8OnUpdateHook/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/RagfairOfferHelper.d.ts index 9dd5be3..0ff9c66 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/RagfairOfferHelper.d.ts @@ -91,6 +91,12 @@ export declare class RagfairOfferHelper { * @returns IRagfairOffer array */ getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcData: IPmcData): IRagfairOffer[]; + /** + * Get offers that have not exceeded buy limits + * @param possibleOffers offers to process + * @returns Offers + */ + protected getOffersInsideBuyRestrictionLimits(possibleOffers: IRagfairOffer[]): IRagfairOffer[]; /** * Check if offer is from trader standing the player does not have * @param offer Offer to check @@ -209,4 +215,10 @@ export declare class RagfairOfferHelper { * @returns True if in range */ protected itemQualityInRange(item: IItem, min: number, max: number): boolean; + /** + * Does this offer come from a trader + * @param offer Offer to check + * @returns True = from trader + */ + offerIsFromTrader(offer: IRagfairOffer): boolean; } diff --git a/TypeScript/8OnUpdateHook/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/common/tables/IBotBase.d.ts index d3fd87e..8609573 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/common/tables/IBotBase.d.ts @@ -60,6 +60,7 @@ export interface IUnlockedInfo { export interface IInfo { EntryPoint: string; Nickname: string; + MainProfileNickname?: string; LowerNickname: string; Side: string; SquadInviteRestriction: boolean; diff --git a/TypeScript/8OnUpdateHook/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/config/IInventoryConfig.d.ts index af0ec79..00ba5b1 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/config/IInventoryConfig.d.ts @@ -10,6 +10,8 @@ export interface IInventoryConfig extends IBaseConfig { customMoneyTpls: string[]; /** Multipliers for skill gain when inside menus, NOT in-game */ skillGainMultiplers: Record; + /** Container Tpls that shoud be deprioritised when choosing where to take money from for payments */ + deprioritisedMoneyContainers: string[]; } export interface IRewardDetails { rewardCount: number; diff --git a/TypeScript/8OnUpdateHook/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/config/IPmcConfig.d.ts index 2e68219..02c9c5b 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/config/IPmcConfig.d.ts @@ -66,7 +66,9 @@ export interface IPmcTypes { bear: string; } export interface ISlotLootSettings { + /** Item Type whitelist */ whitelist: string[]; + /** item tpl blacklist */ blacklist: string[]; } export interface IMinMaxLootValue extends MinMax { diff --git a/TypeScript/8OnUpdateHook/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/config/IRagfairConfig.d.ts index 36122c5..805a6b2 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/config/IRagfairConfig.d.ts @@ -75,6 +75,8 @@ export interface IDynamic { blacklist: IRagfairBlacklist; /** Dict of price limits keyed by item type */ unreasonableModPrices: Record; + /** Custom rouble prices for items to override values from prices.json */ + itemPriceOverrideRouble: Record; } export interface IPriceRanges { default: MinMax; diff --git a/TypeScript/8OnUpdateHook/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/config/ISeasonalEventConfig.d.ts index 5e119fa..bf93685 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -6,6 +6,8 @@ export interface ISeasonalEventConfig extends IBaseConfig { enableSeasonalEventDetection: boolean; /** event / botType / equipSlot / itemid */ eventGear: Record>>>; + /** event / bot type / equipSlot / itemid */ + eventLoot: Record>>>; events: ISeasonalEvent[]; eventBotMapping: Record; eventBossSpawns: Record>; diff --git a/TypeScript/8OnUpdateHook/types/services/BotNameService.d.ts b/TypeScript/8OnUpdateHook/types/services/BotNameService.d.ts index 056bd0f..349964d 100644 --- a/TypeScript/8OnUpdateHook/types/services/BotNameService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/BotNameService.d.ts @@ -1,5 +1,6 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; @@ -38,10 +39,13 @@ export declare class BotNameService { */ generateUniqueBotNickname(botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails, botRole: string, uniqueRoles?: string[]): string; /** - * Should this bot have a name like "name (Pmc Name)" - * @param botRole Role bot has - * @returns True if name should be simulated pscav + * Add random PMC name to bots MainProfileNickname property + * @param bot Bot to update */ - protected shouldSimulatePlayerScavName(botRole: string): boolean; - protected addPlayerScavNameSimulationSuffix(nickname: string): string; + addRandomPmcNameToBotMainProfileNicknameProperty(bot: IBotBase): void; + /** + * Choose a random PMC name from bear or usec bot jsons + * @returns PMC name as string + */ + protected getRandomPMCName(): string; } diff --git a/TypeScript/8OnUpdateHook/types/services/DatabaseService.d.ts b/TypeScript/8OnUpdateHook/types/services/DatabaseService.d.ts index 934617a..73575b1 100644 --- a/TypeScript/8OnUpdateHook/types/services/DatabaseService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/DatabaseService.d.ts @@ -85,7 +85,7 @@ export declare class DatabaseService { */ getCustomization(): Record; /** - * @returns assets/database/templates/items.json + * @returns assets/database/templates/handbook.json */ getHandbook(): IHandbookBase; /** @@ -101,7 +101,7 @@ export declare class DatabaseService { */ getProfiles(): IProfileTemplates; /** - * @returns assets/database/templates/items.json + * @returns assets/database/templates/quests.json */ getQuests(): Record; /** diff --git a/TypeScript/8OnUpdateHook/types/services/InsuranceService.d.ts b/TypeScript/8OnUpdateHook/types/services/InsuranceService.d.ts index ac9cff5..e52fa59 100644 --- a/TypeScript/8OnUpdateHook/types/services/InsuranceService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/InsuranceService.d.ts @@ -62,14 +62,6 @@ export declare class InsuranceService { * @returns Timestamp to return items to player in seconds */ protected getInsuranceReturnTimestamp(pmcData: IPmcData, trader: ITraderBase): number; - /** - * Take the insurance item packages within a profile session and ensure that each of the items in that package are - * not orphaned from their parent ID. - * - * @param sessionID The session ID to update insurance equipment packages in. - * @returns void - */ - protected adoptOrphanedInsEquipment(sessionID: string): void; protected getMaxInsuranceStorageTime(traderBase: ITraderBase): number; /** * Store lost gear post-raid inside profile, ready for later code to pick it up and mail it @@ -127,10 +119,4 @@ export declare class InsuranceService { * @returns price in roubles */ getRoublePriceToInsureItemWithTrader(pmcData: IPmcData, inventoryItem: IItem, traderId: string): number; - /** - * Returns the ID that should be used for a root-level Item's parentId property value within in the context of insurance. - * @param sessionID Players id - * @returns The root item Id. - */ - getRootItemParentID(sessionID: string): string; } diff --git a/TypeScript/8OnUpdateHook/types/services/PaymentService.d.ts b/TypeScript/8OnUpdateHook/types/services/PaymentService.d.ts index f6ec79d..78fdfb6 100644 --- a/TypeScript/8OnUpdateHook/types/services/PaymentService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/PaymentService.d.ts @@ -8,7 +8,9 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IProcessBuyTradeRequestData } from "@spt/models/eft/trade/IProcessBuyTradeRequestData"; import { IProcessSellTradeRequestData } from "@spt/models/eft/trade/IProcessSellTradeRequestData"; +import { IInventoryConfig } from "@spt/models/spt/config/IInventoryConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { HashUtil } from "@spt/utils/HashUtil"; @@ -24,7 +26,9 @@ export declare class PaymentService { protected inventoryHelper: InventoryHelper; protected localisationService: LocalisationService; protected paymentHelper: PaymentHelper; - constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper); + protected configServer: ConfigServer; + protected inventoryConfig: IInventoryConfig; + constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper, configServer: ConfigServer); /** * Take money and insert items into return to server request * @param pmcData Pmc profile diff --git a/TypeScript/8OnUpdateHook/types/services/PostDbLoadService.d.ts b/TypeScript/8OnUpdateHook/types/services/PostDbLoadService.d.ts index c9e4bbe..cc51311 100644 --- a/TypeScript/8OnUpdateHook/types/services/PostDbLoadService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/PostDbLoadService.d.ts @@ -74,4 +74,6 @@ export declare class PostDbLoadService { */ protected validateQuestAssortUnlocksExist(): void; protected setAllDbItemsAsSellableOnFlea(): void; + protected addMissingTraderBuyRestrictionMaxValue(): void; + protected applyFleaPriceOverrides(): void; } diff --git a/TypeScript/8OnUpdateHook/types/services/ProfileFixerService.d.ts b/TypeScript/8OnUpdateHook/types/services/ProfileFixerService.d.ts index 4a3a5ff..cbbe1d0 100644 --- a/TypeScript/8OnUpdateHook/types/services/ProfileFixerService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/ProfileFixerService.d.ts @@ -47,6 +47,12 @@ export declare class ProfileFixerService { * @param pmcProfile profile to check and fix */ checkForAndFixPmcProfileIssues(pmcProfile: IPmcData): void; + /** + * Resolve any dialogue attachments that were accidentally created using the player's equipment ID as + * the stash root object ID + * @param fullProfile + */ + checkForAndFixDialogueAttachments(fullProfile: ISptProfile): void; /** * Find issues in the scav profile data that may cause issues * @param scavProfile profile to check and fix diff --git a/TypeScript/8OnUpdateHook/types/services/SeasonalEventService.d.ts b/TypeScript/8OnUpdateHook/types/services/SeasonalEventService.d.ts index 446cccc..26b74ef 100644 --- a/TypeScript/8OnUpdateHook/types/services/SeasonalEventService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/SeasonalEventService.d.ts @@ -88,6 +88,12 @@ export declare class SeasonalEventService { * @returns bots with equipment changes */ protected getEventBotGear(eventType: SeasonalEventType): Record>>; + /** + * Get a dictionary of loot changes to apply to bots for a specific event e.g. Christmas/Halloween + * @param eventName Name of event to get gear changes for + * @returns bots with loot changes + */ + protected getEventBotLoot(eventType: SeasonalEventType): Record>>; /** * Get the dates each seasonal event starts and ends at * @returns Record with event name + start/end date @@ -108,7 +114,7 @@ export declare class SeasonalEventService { /** * Store active events inside class array property `currentlyActiveEvents` + set class properties: christmasEventActive/halloweenEventActive */ - protected cacheActiveEvents(): void; + cacheActiveEvents(): void; /** * Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER * @returns Season enum value @@ -171,6 +177,11 @@ export declare class SeasonalEventService { * @param eventName Name of the event to read equipment in from config */ protected addEventGearToBots(eventType: SeasonalEventType): void; + /** + * Read in data from seasonalEvents.json and add found loot items to bots + * @param eventName Name of the event to read loot in from config + */ + protected addEventLootToBots(eventType: SeasonalEventType): void; /** * Add pumpkin loot boxes to scavs */ diff --git a/TypeScript/8OnUpdateHook/types/utils/App.d.ts b/TypeScript/8OnUpdateHook/types/utils/App.d.ts index db46d2c..0e4850e 100644 --- a/TypeScript/8OnUpdateHook/types/utils/App.d.ts +++ b/TypeScript/8OnUpdateHook/types/utils/App.d.ts @@ -4,10 +4,10 @@ import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { HttpServer } from "@spt/servers/HttpServer"; -import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { EncodingUtil } from "@spt/utils/EncodingUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; +import { DatabaseService } from "@spt/services/DatabaseService"; export declare class App { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/8OnUpdateHook/types/utils/ProgressWriter.d.ts b/TypeScript/8OnUpdateHook/types/utils/ProgressWriter.d.ts new file mode 100644 index 0000000..2641d3a --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/utils/ProgressWriter.d.ts @@ -0,0 +1,13 @@ +export declare class ProgressWriter { + private count; + private total?; + private done; + private barFillChar; + private barEmptyChar; + private maxBarLength; + constructor(total: number, maxBarLength?: number, barFillChar?: string, barEmptyChar?: string); + /** + * Increment the progress counter and update the progress bar display. + */ + increment(): void; +} diff --git a/TypeScript/9RouterHooks/types/generators/BotGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/BotGenerator.d.ts index 2c7bba6..a2291f4 100644 --- a/TypeScript/9RouterHooks/types/generators/BotGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/BotGenerator.d.ts @@ -5,6 +5,7 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; import { WeightedRandomHelper } from "@spt/helpers/WeightedRandomHelper"; import { MinMax } from "@spt/models/common/MinMax"; +import { IPmcData } from "@spt/models/eft/common/IPmcData"; import { IBaseJsonSkills, IBaseSkill, IBotBase, IInfo, IHealth as PmcHealth, ISkills as botSkills } from "@spt/models/eft/common/tables/IBotBase"; import { IAppearance, IBodyPart, IBotType, IHealth, IInventory } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; @@ -47,9 +48,10 @@ export declare class BotGenerator { * @param role e.g. assault / pmcbot * @param difficulty easy/normal/hard/impossible * @param botTemplate base bot template to use (e.g. assault/pmcbot) - * @returns + * profile PMC profile of player generating pscav + * @returns IBotBase */ - generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase; + generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType, profile: IPmcData): IBotBase; /** * Create 1 bot of the type/side/difficulty defined in botGenerationDetails * @param sessionId Session id @@ -79,6 +81,12 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails): IBotBase; + /** + * Should this bot have a name like "name (Pmc Name)" and be alterd by client patch to be hostile to player + * @param botRole Role bot has + * @returns True if name should be simulated pscav + */ + protected shouldSimulatePlayerScav(botRole: string): boolean; /** * Get exp for kill by bot difficulty * @param experience Dict of difficulties and experience diff --git a/TypeScript/9RouterHooks/types/helpers/RagfairOfferHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/RagfairOfferHelper.d.ts index 9dd5be3..0ff9c66 100644 --- a/TypeScript/9RouterHooks/types/helpers/RagfairOfferHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/RagfairOfferHelper.d.ts @@ -91,6 +91,12 @@ export declare class RagfairOfferHelper { * @returns IRagfairOffer array */ getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record, pmcData: IPmcData): IRagfairOffer[]; + /** + * Get offers that have not exceeded buy limits + * @param possibleOffers offers to process + * @returns Offers + */ + protected getOffersInsideBuyRestrictionLimits(possibleOffers: IRagfairOffer[]): IRagfairOffer[]; /** * Check if offer is from trader standing the player does not have * @param offer Offer to check @@ -209,4 +215,10 @@ export declare class RagfairOfferHelper { * @returns True if in range */ protected itemQualityInRange(item: IItem, min: number, max: number): boolean; + /** + * Does this offer come from a trader + * @param offer Offer to check + * @returns True = from trader + */ + offerIsFromTrader(offer: IRagfairOffer): boolean; } diff --git a/TypeScript/9RouterHooks/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/9RouterHooks/types/models/eft/common/tables/IBotBase.d.ts index d3fd87e..8609573 100644 --- a/TypeScript/9RouterHooks/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/common/tables/IBotBase.d.ts @@ -60,6 +60,7 @@ export interface IUnlockedInfo { export interface IInfo { EntryPoint: string; Nickname: string; + MainProfileNickname?: string; LowerNickname: string; Side: string; SquadInviteRestriction: boolean; diff --git a/TypeScript/9RouterHooks/types/models/spt/config/IInventoryConfig.d.ts b/TypeScript/9RouterHooks/types/models/spt/config/IInventoryConfig.d.ts index af0ec79..00ba5b1 100644 --- a/TypeScript/9RouterHooks/types/models/spt/config/IInventoryConfig.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/config/IInventoryConfig.d.ts @@ -10,6 +10,8 @@ export interface IInventoryConfig extends IBaseConfig { customMoneyTpls: string[]; /** Multipliers for skill gain when inside menus, NOT in-game */ skillGainMultiplers: Record; + /** Container Tpls that shoud be deprioritised when choosing where to take money from for payments */ + deprioritisedMoneyContainers: string[]; } export interface IRewardDetails { rewardCount: number; diff --git a/TypeScript/9RouterHooks/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/9RouterHooks/types/models/spt/config/IPmcConfig.d.ts index 2e68219..02c9c5b 100644 --- a/TypeScript/9RouterHooks/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/config/IPmcConfig.d.ts @@ -66,7 +66,9 @@ export interface IPmcTypes { bear: string; } export interface ISlotLootSettings { + /** Item Type whitelist */ whitelist: string[]; + /** item tpl blacklist */ blacklist: string[]; } export interface IMinMaxLootValue extends MinMax { diff --git a/TypeScript/9RouterHooks/types/models/spt/config/IRagfairConfig.d.ts b/TypeScript/9RouterHooks/types/models/spt/config/IRagfairConfig.d.ts index 36122c5..805a6b2 100644 --- a/TypeScript/9RouterHooks/types/models/spt/config/IRagfairConfig.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/config/IRagfairConfig.d.ts @@ -75,6 +75,8 @@ export interface IDynamic { blacklist: IRagfairBlacklist; /** Dict of price limits keyed by item type */ unreasonableModPrices: Record; + /** Custom rouble prices for items to override values from prices.json */ + itemPriceOverrideRouble: Record; } export interface IPriceRanges { default: MinMax; diff --git a/TypeScript/9RouterHooks/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/9RouterHooks/types/models/spt/config/ISeasonalEventConfig.d.ts index 5e119fa..bf93685 100644 --- a/TypeScript/9RouterHooks/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -6,6 +6,8 @@ export interface ISeasonalEventConfig extends IBaseConfig { enableSeasonalEventDetection: boolean; /** event / botType / equipSlot / itemid */ eventGear: Record>>>; + /** event / bot type / equipSlot / itemid */ + eventLoot: Record>>>; events: ISeasonalEvent[]; eventBotMapping: Record; eventBossSpawns: Record>; diff --git a/TypeScript/9RouterHooks/types/services/BotNameService.d.ts b/TypeScript/9RouterHooks/types/services/BotNameService.d.ts index 056bd0f..349964d 100644 --- a/TypeScript/9RouterHooks/types/services/BotNameService.d.ts +++ b/TypeScript/9RouterHooks/types/services/BotNameService.d.ts @@ -1,5 +1,6 @@ import { BotHelper } from "@spt/helpers/BotHelper"; import { ProfileHelper } from "@spt/helpers/ProfileHelper"; +import { IBotBase } from "@spt/models/eft/common/tables/IBotBase"; import { IBotType } from "@spt/models/eft/common/tables/IBotType"; import { IBotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; @@ -38,10 +39,13 @@ export declare class BotNameService { */ generateUniqueBotNickname(botJsonTemplate: IBotType, botGenerationDetails: IBotGenerationDetails, botRole: string, uniqueRoles?: string[]): string; /** - * Should this bot have a name like "name (Pmc Name)" - * @param botRole Role bot has - * @returns True if name should be simulated pscav + * Add random PMC name to bots MainProfileNickname property + * @param bot Bot to update */ - protected shouldSimulatePlayerScavName(botRole: string): boolean; - protected addPlayerScavNameSimulationSuffix(nickname: string): string; + addRandomPmcNameToBotMainProfileNicknameProperty(bot: IBotBase): void; + /** + * Choose a random PMC name from bear or usec bot jsons + * @returns PMC name as string + */ + protected getRandomPMCName(): string; } diff --git a/TypeScript/9RouterHooks/types/services/DatabaseService.d.ts b/TypeScript/9RouterHooks/types/services/DatabaseService.d.ts index 934617a..73575b1 100644 --- a/TypeScript/9RouterHooks/types/services/DatabaseService.d.ts +++ b/TypeScript/9RouterHooks/types/services/DatabaseService.d.ts @@ -85,7 +85,7 @@ export declare class DatabaseService { */ getCustomization(): Record; /** - * @returns assets/database/templates/items.json + * @returns assets/database/templates/handbook.json */ getHandbook(): IHandbookBase; /** @@ -101,7 +101,7 @@ export declare class DatabaseService { */ getProfiles(): IProfileTemplates; /** - * @returns assets/database/templates/items.json + * @returns assets/database/templates/quests.json */ getQuests(): Record; /** diff --git a/TypeScript/9RouterHooks/types/services/InsuranceService.d.ts b/TypeScript/9RouterHooks/types/services/InsuranceService.d.ts index ac9cff5..e52fa59 100644 --- a/TypeScript/9RouterHooks/types/services/InsuranceService.d.ts +++ b/TypeScript/9RouterHooks/types/services/InsuranceService.d.ts @@ -62,14 +62,6 @@ export declare class InsuranceService { * @returns Timestamp to return items to player in seconds */ protected getInsuranceReturnTimestamp(pmcData: IPmcData, trader: ITraderBase): number; - /** - * Take the insurance item packages within a profile session and ensure that each of the items in that package are - * not orphaned from their parent ID. - * - * @param sessionID The session ID to update insurance equipment packages in. - * @returns void - */ - protected adoptOrphanedInsEquipment(sessionID: string): void; protected getMaxInsuranceStorageTime(traderBase: ITraderBase): number; /** * Store lost gear post-raid inside profile, ready for later code to pick it up and mail it @@ -127,10 +119,4 @@ export declare class InsuranceService { * @returns price in roubles */ getRoublePriceToInsureItemWithTrader(pmcData: IPmcData, inventoryItem: IItem, traderId: string): number; - /** - * Returns the ID that should be used for a root-level Item's parentId property value within in the context of insurance. - * @param sessionID Players id - * @returns The root item Id. - */ - getRootItemParentID(sessionID: string): string; } diff --git a/TypeScript/9RouterHooks/types/services/PaymentService.d.ts b/TypeScript/9RouterHooks/types/services/PaymentService.d.ts index f6ec79d..78fdfb6 100644 --- a/TypeScript/9RouterHooks/types/services/PaymentService.d.ts +++ b/TypeScript/9RouterHooks/types/services/PaymentService.d.ts @@ -8,7 +8,9 @@ import { IItem } from "@spt/models/eft/common/tables/IItem"; import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse"; import { IProcessBuyTradeRequestData } from "@spt/models/eft/trade/IProcessBuyTradeRequestData"; import { IProcessSellTradeRequestData } from "@spt/models/eft/trade/IProcessSellTradeRequestData"; +import { IInventoryConfig } from "@spt/models/spt/config/IInventoryConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt/servers/ConfigServer"; import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { HashUtil } from "@spt/utils/HashUtil"; @@ -24,7 +26,9 @@ export declare class PaymentService { protected inventoryHelper: InventoryHelper; protected localisationService: LocalisationService; protected paymentHelper: PaymentHelper; - constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper); + protected configServer: ConfigServer; + protected inventoryConfig: IInventoryConfig; + constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseService: DatabaseService, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper, configServer: ConfigServer); /** * Take money and insert items into return to server request * @param pmcData Pmc profile diff --git a/TypeScript/9RouterHooks/types/services/PostDbLoadService.d.ts b/TypeScript/9RouterHooks/types/services/PostDbLoadService.d.ts index c9e4bbe..cc51311 100644 --- a/TypeScript/9RouterHooks/types/services/PostDbLoadService.d.ts +++ b/TypeScript/9RouterHooks/types/services/PostDbLoadService.d.ts @@ -74,4 +74,6 @@ export declare class PostDbLoadService { */ protected validateQuestAssortUnlocksExist(): void; protected setAllDbItemsAsSellableOnFlea(): void; + protected addMissingTraderBuyRestrictionMaxValue(): void; + protected applyFleaPriceOverrides(): void; } diff --git a/TypeScript/9RouterHooks/types/services/ProfileFixerService.d.ts b/TypeScript/9RouterHooks/types/services/ProfileFixerService.d.ts index 4a3a5ff..cbbe1d0 100644 --- a/TypeScript/9RouterHooks/types/services/ProfileFixerService.d.ts +++ b/TypeScript/9RouterHooks/types/services/ProfileFixerService.d.ts @@ -47,6 +47,12 @@ export declare class ProfileFixerService { * @param pmcProfile profile to check and fix */ checkForAndFixPmcProfileIssues(pmcProfile: IPmcData): void; + /** + * Resolve any dialogue attachments that were accidentally created using the player's equipment ID as + * the stash root object ID + * @param fullProfile + */ + checkForAndFixDialogueAttachments(fullProfile: ISptProfile): void; /** * Find issues in the scav profile data that may cause issues * @param scavProfile profile to check and fix diff --git a/TypeScript/9RouterHooks/types/services/SeasonalEventService.d.ts b/TypeScript/9RouterHooks/types/services/SeasonalEventService.d.ts index 446cccc..26b74ef 100644 --- a/TypeScript/9RouterHooks/types/services/SeasonalEventService.d.ts +++ b/TypeScript/9RouterHooks/types/services/SeasonalEventService.d.ts @@ -88,6 +88,12 @@ export declare class SeasonalEventService { * @returns bots with equipment changes */ protected getEventBotGear(eventType: SeasonalEventType): Record>>; + /** + * Get a dictionary of loot changes to apply to bots for a specific event e.g. Christmas/Halloween + * @param eventName Name of event to get gear changes for + * @returns bots with loot changes + */ + protected getEventBotLoot(eventType: SeasonalEventType): Record>>; /** * Get the dates each seasonal event starts and ends at * @returns Record with event name + start/end date @@ -108,7 +114,7 @@ export declare class SeasonalEventService { /** * Store active events inside class array property `currentlyActiveEvents` + set class properties: christmasEventActive/halloweenEventActive */ - protected cacheActiveEvents(): void; + cacheActiveEvents(): void; /** * Get the currently active weather season e.g. SUMMER/AUTUMN/WINTER * @returns Season enum value @@ -171,6 +177,11 @@ export declare class SeasonalEventService { * @param eventName Name of the event to read equipment in from config */ protected addEventGearToBots(eventType: SeasonalEventType): void; + /** + * Read in data from seasonalEvents.json and add found loot items to bots + * @param eventName Name of the event to read loot in from config + */ + protected addEventLootToBots(eventType: SeasonalEventType): void; /** * Add pumpkin loot boxes to scavs */ diff --git a/TypeScript/9RouterHooks/types/utils/App.d.ts b/TypeScript/9RouterHooks/types/utils/App.d.ts index db46d2c..0e4850e 100644 --- a/TypeScript/9RouterHooks/types/utils/App.d.ts +++ b/TypeScript/9RouterHooks/types/utils/App.d.ts @@ -4,10 +4,10 @@ import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig"; import { ILogger } from "@spt/models/spt/utils/ILogger"; import { ConfigServer } from "@spt/servers/ConfigServer"; import { HttpServer } from "@spt/servers/HttpServer"; -import { DatabaseService } from "@spt/services/DatabaseService"; import { LocalisationService } from "@spt/services/LocalisationService"; import { EncodingUtil } from "@spt/utils/EncodingUtil"; import { TimeUtil } from "@spt/utils/TimeUtil"; +import { DatabaseService } from "@spt/services/DatabaseService"; export declare class App { protected logger: ILogger; protected timeUtil: TimeUtil; diff --git a/TypeScript/9RouterHooks/types/utils/ProgressWriter.d.ts b/TypeScript/9RouterHooks/types/utils/ProgressWriter.d.ts new file mode 100644 index 0000000..2641d3a --- /dev/null +++ b/TypeScript/9RouterHooks/types/utils/ProgressWriter.d.ts @@ -0,0 +1,13 @@ +export declare class ProgressWriter { + private count; + private total?; + private done; + private barFillChar; + private barEmptyChar; + private maxBarLength; + constructor(total: number, maxBarLength?: number, barFillChar?: string, barEmptyChar?: string); + /** + * Increment the progress counter and update the progress bar display. + */ + increment(): void; +}